feat: implement useAppControl composable for app hiding functionality and refactor index.vue to utilize it

This commit is contained in:
pandadev 2025-03-16 21:32:44 +01:00
parent 409e10a8fd
commit b828daff08
No known key found for this signature in database
GPG key ID: C39629DACB8E762F
2 changed files with 17 additions and 8 deletions

View file

@ -0,0 +1,12 @@
import { app, window } from "@tauri-apps/api";
export function useAppControl() {
const hideApp = async (): Promise<void> => {
await app.hide();
await window.getCurrentWindow().hide();
};
return {
hideApp
};
}