mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-21 13:14:04 +02:00
added workflow and package updates
This commit is contained in:
parent
e46319a3a5
commit
5d67412650
3 changed files with 104 additions and 1 deletions
18
app.vue
18
app.vue
|
@ -59,6 +59,7 @@ import { platform } from '@tauri-apps/plugin-os';
|
|||
import { invoke } from '@tauri-apps/api/core';
|
||||
import { enable, isEnabled } from "@tauri-apps/plugin-autostart";
|
||||
import { listen } from '@tauri-apps/api/event';
|
||||
import { register, unregister, isRegistered } from '@tauri-apps/plugin-global-shortcut';
|
||||
|
||||
const db = ref(null);
|
||||
const history = ref([]);
|
||||
|
@ -213,6 +214,23 @@ onMounted(async () => {
|
|||
await enable()
|
||||
}
|
||||
|
||||
if (await isRegistered("MetaLeft+V")) {
|
||||
await unregister("MetaLeft+V")
|
||||
}
|
||||
|
||||
await register('MetaLeft+V', (event) => {
|
||||
if (event.state === "MetaLeft+V") {
|
||||
if (isVisible.value == true) {
|
||||
app.hide()
|
||||
isVisible.value = false;
|
||||
} else {
|
||||
app.show()
|
||||
isVisible.value = true;
|
||||
selectedIndex.value = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
await listen('tauri://blur', hideApp);
|
||||
await listen('tauri://focus', focusSearchInput);
|
||||
focusSearchInput();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue