From d1018ba8d189c1bdcde3d25176d0b50167ae66c1 Mon Sep 17 00:00:00 2001 From: reya Date: Sat, 2 Nov 2024 13:43:13 +0700 Subject: [PATCH] feat: remove mica effect and support windows 10 --- src-tauri/src/commands/window.rs | 6 ------ src-tauri/tauri.windows.conf.json | 7 +------ src/routes/__root.tsx | 14 ++++++++++++-- src/routes/_app.lazy.tsx | 11 ++++++++++- src/routes/new.lazy.tsx | 10 +++++++++- 5 files changed, 32 insertions(+), 16 deletions(-) diff --git a/src-tauri/src/commands/window.rs b/src-tauri/src/commands/window.rs index c034a162..85a55703 100644 --- a/src-tauri/src/commands/window.rs +++ b/src-tauri/src/commands/window.rs @@ -228,12 +228,6 @@ pub fn open_window(window: NewWindow, app_handle: tauri::AppHandle) -> Result()({ }); function Screen() { - const { queryClient } = Route.useRouteContext(); + const { queryClient, platform } = Route.useRouteContext(); useEffect(() => { const unlisten = getCurrentWindow().listen( @@ -60,7 +61,16 @@ function Screen() { }; }, []); - return ; + return ( +
+ +
+ ); } function Pending() { diff --git a/src/routes/_app.lazy.tsx b/src/routes/_app.lazy.tsx index 6471b709..2d389a09 100644 --- a/src/routes/_app.lazy.tsx +++ b/src/routes/_app.lazy.tsx @@ -22,10 +22,19 @@ export const Route = createLazyFileRoute("/_app")({ }); function Layout() { + const { platform } = Route.useRouteContext(); + return (
-
+
diff --git a/src/routes/new.lazy.tsx b/src/routes/new.lazy.tsx index 7b6d84dd..41f4cfa6 100644 --- a/src/routes/new.lazy.tsx +++ b/src/routes/new.lazy.tsx @@ -1,3 +1,4 @@ +import { cn } from "@/commons"; import { createLazyFileRoute } from "@tanstack/react-router"; export const Route = createLazyFileRoute("/new")({ @@ -5,10 +6,17 @@ export const Route = createLazyFileRoute("/new")({ }); function Screen() { + const { platform } = Route.useRouteContext(); + return (