[feat] better store saving logic + more launch options
This commit is contained in:
@@ -16,19 +16,19 @@ import { /* relaunch, */ exit } from "@tauri-apps/plugin-process"
|
||||
import { useTheme } from "next-themes"
|
||||
// import { platform } from "@tauri-apps/plugin-os"
|
||||
import { usePathname, useRouter } from "next/navigation"
|
||||
import { saveAll } from "tauri-plugin-valtio"
|
||||
import { saveAllNow } from "tauri-plugin-valtio"
|
||||
|
||||
const Nav = () => {
|
||||
const { theme, setTheme } = useTheme()
|
||||
|
||||
const close = async () => {
|
||||
// (await window.hideOnClose) ? getCurrent().hide() : exit();
|
||||
await saveAll()
|
||||
await saveAllNow()
|
||||
await exit()
|
||||
}
|
||||
|
||||
const minimize = async () => {
|
||||
await saveAll()
|
||||
await saveAllNow()
|
||||
await getCurrentWindow().minimize()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user