update: macos blurred window and radius setup

This commit is contained in:
Purp1e
2024-09-27 11:20:48 +08:00
parent 46c6dbfa61
commit a70bf60ed5
11 changed files with 54 additions and 33 deletions

View File

@@ -8,7 +8,7 @@ interface CardProps {
const Card = ({ children }: CardProps) => {
return (
<div
className="dark:from-black/10 dark:to-black/5 dark:border-white/[6%] px-4 pt-3 pb-4 flex flex-col gap-2 border w-full rounded-lg bg-gradient-to-br from-white/90 to-white/80 border-black/[6%]"
className="dark:from-black/10 dark:to-black/5 dark:border-white/[6%] px-4 pt-3 pb-4 flex flex-col gap-2 border w-full rounded-lg bg-gradient-to-br from-white/80 to-white/70 border-black/[6%]"
data-tauri-drag-region
>
{children}

View File

@@ -2,7 +2,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 { invoke } from "@tauri-apps/api/core";
import { platform } from "@tauri-apps/plugin-os"
import { useRouter } from "next/navigation"
const Nav = () => {
@@ -41,24 +41,29 @@ const Nav = () => {
>
<RocketOne size={16} />
</button>
<button
className="px-2 py-0 transition rounded hover:bg-zinc-200/80 active:scale-95"
onClick={minimize}
>
<Minus size={16} />
</button>
<button
className="px-2 py-0 transition rounded hover:bg-zinc-200/80 active:scale-95"
onClick={toggleMaximize}
>
<Square size={16} />
</button>
<button
className="px-2 py-0 transition rounded hover:bg-zinc-200/80 active:scale-95"
onClick={close}
>
<Close size={16} />
</button>
{/* { platform() === "windows" && ( */}
<>
<button
className="px-2 py-0 transition rounded hover:bg-zinc-200/80 active:scale-95"
onClick={minimize}
>
<Minus size={16} />
</button>
<button
className="px-2 py-0 transition rounded hover:bg-zinc-200/80 active:scale-95"
onClick={toggleMaximize}
>
<Square size={16} />
</button>
<button
className="px-2 py-0 transition rounded hover:bg-zinc-200/80 active:scale-95"
onClick={close}
>
<Close size={16} />
</button>
</>
{/* )} */}
</nav>
)
}

View File

@@ -3,6 +3,7 @@ import { ReactNode } from "react"
import clsx from "clsx"
import { Home, MonitorOne, Movie, Setting, Terminal, Toolkit } from "@icon-park/react"
import { useRouter } from "next/navigation"
// import { platform } from "@tauri-apps/plugin-os"
import useAppStore from "@/store/app"
interface SideButtonProps {
@@ -41,7 +42,10 @@ const SideBar = () => {
return (
<div
className="absolute left-0 flex flex-col w-20 h-full select-none py-7"
className={clsx(
"absolute left-0 flex flex-col h-full select-none w-20 py-7",
// platform() === "windows" ? "w-20" : "w-[4.25rem]"
)}
data-tauri-drag-region
>
<section className="mx-auto">
@@ -74,7 +78,7 @@ const SideBar = () => {
<div className="mx-auto text-sm text-center text-zinc-500" data-tauri-drag-region>
<p></p>
<p onClick={()=> setVersion("x.y.z")}>{version}</p>
<p onClick={() => setVersion("x.y.z")}>{version}</p>
</div>
</div>
)