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] */}
-
+
{children}
- );
+ )
}
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 (
-
+
{children}
diff --git a/src/app/prepare/page.tsx b/src/app/prepare/page.tsx
index 71e39aa..dc30391 100644
--- a/src/app/prepare/page.tsx
+++ b/src/app/prepare/page.tsx
@@ -5,7 +5,7 @@ export default function Page() {
const { dir, updateDir, csDir, updateCsDir, currentUser } = useSteamStore()
return (
CS工具箱
diff --git a/src/components/cstb/CommonDir.tsx b/src/components/cstb/CommonDir.tsx
index 7cae790..6e010aa 100644
--- a/src/components/cstb/CommonDir.tsx
+++ b/src/components/cstb/CommonDir.tsx
@@ -22,7 +22,7 @@ const CommonDir = () => {
-
+
Steam安装位置
CS2游戏目录
地图文件
diff --git a/src/components/window/Card.tsx b/src/components/window/Card.tsx
index 2027f08..4e152cb 100644
--- a/src/components/window/Card.tsx
+++ b/src/components/window/Card.tsx
@@ -8,7 +8,7 @@ interface CardProps {
const Card = ({ children }: CardProps) => {
return (
{children}
diff --git a/src/components/window/Nav.tsx b/src/components/window/Nav.tsx
index 5aa1c52..d08d9fd 100644
--- a/src/components/window/Nav.tsx
+++ b/src/components/window/Nav.tsx
@@ -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 = () => {
>
-
-
-
+
+ {/* { platform() === "windows" && ( */}
+ <>
+
+
+
+ >
+ {/* )} */}
)
}
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}
)