update dep + preference styles setup

This commit is contained in:
Purp1e
2024-10-28 10:42:42 +08:00
parent c0c34180ae
commit 3d027ec05f
13 changed files with 1737 additions and 1160 deletions

View File

@@ -3,7 +3,7 @@ import { RocketOne, Minus, Close, Square } from "@icon-park/react"
import { /* relaunch, */ exit } from "@tauri-apps/plugin-process"
import { getCurrentWindow } from "@tauri-apps/api/window"
// import { platform } from "@tauri-apps/plugin-os"
import { useRouter } from "next/navigation"
import { useRouter, usePathname } from "next/navigation"
const Nav = () => {
const close = async () => {
@@ -32,12 +32,13 @@ const Nav = () => {
// await relaunch()
// }
const router = useRouter()
const pathname = usePathname()
return (
<nav className="absolute top-0 right-0 flex flex-row h-16 gap-0.5 p-4" data-tauri-drag-region>
<button
className="px-2 py-0 transition rounded hover:bg-zinc-200/80 active:scale-95"
onClick={() => router.push("/prepare")}
onClick={() => pathname !== "/prepare" ? router.push("/prepare") : router.back()}
>
<RocketOne size={16} />
</button>