diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 7dc19cb..5a3a681 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -17,7 +17,7 @@ tauri-build = { version = "2.0.0-rc", features = [] } [dependencies] serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "2.0.0-rc", features = [ +tauri = { version = "2.0.0-rc", features = [ "macos-private-api", "tray-icon" ] } window-vibrancy = "0.5.2" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 1aa674d..5388f13 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -46,6 +46,7 @@ "identifier": "upup.cool", "plugins": {}, "app": { + "macOSPrivateApi": true, "windows": [ { "fullscreen": false, @@ -61,7 +62,7 @@ "transparent": true, "theme": "Light", "hiddenTitle": true, - "titleBarStyle": "Overlay" + "titleBarStyle": "Transparent" } ], "security": { diff --git a/src/app/(main)/layout.tsx b/src/app/(main)/layout.tsx index da3724e..c7d1a88 100644 --- a/src/app/(main)/layout.tsx +++ b/src/app/(main)/layout.tsx @@ -1,6 +1,9 @@ +"use client" import Header from "@/components/window/Header"; import Nav from "@/components/window/Nav"; import SideBar from "@/components/window/SideBar"; +import clsx from "clsx"; +// import { platform } from "@tauri-apps/plugin-os" export default function BaseLayout({ children, @@ -8,18 +11,24 @@ export default function BaseLayout({ children: React.ReactNode; }) { return ( -
+
+ {/* bg-[#f1f0f2] */}
- ); + ) } diff --git a/src/app/globals.css b/src/app/globals.css index c30f0ad..bbcafe6 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -10,7 +10,9 @@ body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; - background: transparent; + /* background: transparent; */ + background: rgba(242, 241, 243, 0.3); + border-radius: 10px; } a { diff --git a/src/app/page.tsx b/src/app/page.tsx index 199c9dc..6d995d1 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -6,7 +6,7 @@ const Home = () => { const router = useRouter(); return (

CS 工具箱

diff --git a/src/app/prepare/layout.tsx b/src/app/prepare/layout.tsx index dd995fa..c94cc93 100644 --- a/src/app/prepare/layout.tsx +++ b/src/app/prepare/layout.tsx @@ -2,12 +2,12 @@ import Nav from "@/components/window/Nav" export default function BaseLayout({ children }: { children: React.ReactNode }) { return ( -
+
) } diff --git a/src/components/window/SideBar.tsx b/src/components/window/SideBar.tsx index ba9919a..b122955 100644 --- a/src/components/window/SideBar.tsx +++ b/src/components/window/SideBar.tsx @@ -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 (
@@ -74,7 +78,7 @@ const SideBar = () => {

版本号

-

setVersion("x.y.z")}>{version}

+

setVersion("x.y.z")}>{version}

)