fix(editor): prompt before closing unsaved SQL tabs
Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>
This commit is contained in:
1 parent
23b9228f82
commit
4efff9a190
26 files changed
+1273
-100
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { ref, onMounted, onUnmounted } from "vue";
|
||||
import { isTauriRuntime } from "@/lib/tauriRuntime";
|
||||
import { isMacOS } from "@/lib/platform";
|
||||
import * as api from "@/lib/api";
|
||||
|
||||
export function shouldReserveMacTrafficLightInset(isMac: boolean, isFullscreen: boolean, isDesktop = true): boolean {
|
||||
return isDesktop && isMac && !isFullscreen;
|
||||
@@ -40,8 +41,8 @@ export function useWindowControls() {
|
||||
}
|
||||
|
||||
async function close() {
|
||||
const { getCurrentWindow } = await import("@tauri-apps/api/window");
|
||||
await getCurrentWindow().close();
|
||||
if (!isDesktop) return;
|
||||
await api.requestAppClose();
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
|
||||
Reference in new issue
Block a user