added workflow and package updates

This commit is contained in:
pandadev 2024-07-11 00:46:09 +02:00
parent e46319a3a5
commit 5d67412650
No known key found for this signature in database
GPG key ID: C39629DACB8E762F
3 changed files with 104 additions and 1 deletions

18
app.vue
View file

@ -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();