mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-22 05:34:04 +02:00
feat: implement useAppControl composable for app hiding functionality and refactor index.vue to utilize it
This commit is contained in:
parent
409e10a8fd
commit
b828daff08
2 changed files with 17 additions and 8 deletions
12
composables/useAppControl.ts
Normal file
12
composables/useAppControl.ts
Normal 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
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue