diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index 937a3695..5504befb 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -28,7 +28,7 @@ fn main() {
let main_window = app.get_window("main").unwrap();
#[cfg(target_os = "macos")]
- main_window.position_traffic_lights(8.0, 16.0); // set inset for traffic lights (macos)
+ main_window.position_traffic_lights(13.0, 17.0); // set inset for traffic lights (macos)
Ok(())
})
@@ -37,7 +37,7 @@ fn main() {
let apply_offset = || {
let win = e.window();
// keep inset for traffic lights when window resize (macos)
- win.position_traffic_lights(8.0, 16.0);
+ win.position_traffic_lights(13.0, 17.0);
};
#[cfg(target_os = "macos")]
match e.event() {
diff --git a/src/app/channel/_default.page.tsx b/src/app/channel/_default.page.tsx
index 0501c518..0edbf920 100644
--- a/src/app/channel/_default.page.tsx
+++ b/src/app/channel/_default.page.tsx
@@ -1 +1 @@
-export { LayoutChannel as Layout } from "./layout";
+export { DefaultLayout as Layout } from "@shared/layout";
diff --git a/src/app/channel/layout.tsx b/src/app/channel/layout.tsx
deleted file mode 100644
index 55294342..00000000
--- a/src/app/channel/layout.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { MultiAccounts } from "@shared/multiAccounts";
-import { Navigation } from "@shared/navigation";
-
-export function LayoutChannel({ children }: { children: React.ReactNode }) {
- return (
-
- );
-}
diff --git a/src/app/chat/_default.page.tsx b/src/app/chat/_default.page.tsx
index db91ccb7..0edbf920 100644
--- a/src/app/chat/_default.page.tsx
+++ b/src/app/chat/_default.page.tsx
@@ -1 +1 @@
-export { LayoutChat as Layout } from "./layout";
+export { DefaultLayout as Layout } from "@shared/layout";
diff --git a/src/app/chat/layout.tsx b/src/app/chat/layout.tsx
deleted file mode 100644
index 39b21ecb..00000000
--- a/src/app/chat/layout.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { MultiAccounts } from "@shared/multiAccounts";
-import { Navigation } from "@shared/navigation";
-
-export function LayoutChat({ children }: { children: React.ReactNode }) {
- return (
-
- );
-}
diff --git a/src/app/space/_default.page.tsx b/src/app/space/_default.page.tsx
index a737ae55..0edbf920 100644
--- a/src/app/space/_default.page.tsx
+++ b/src/app/space/_default.page.tsx
@@ -1 +1 @@
-export { LayoutSpace as Layout } from "./layout";
+export { DefaultLayout as Layout } from "@shared/layout";
diff --git a/src/app/space/layout.tsx b/src/app/space/layout.tsx
deleted file mode 100644
index 4a2b0a6d..00000000
--- a/src/app/space/layout.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { MultiAccounts } from "@shared/multiAccounts";
-import { Navigation } from "@shared/navigation";
-
-export function LayoutSpace({ children }: { children: React.ReactNode }) {
- return (
-
- );
-}
diff --git a/src/app/trending/_default.page.tsx b/src/app/trending/_default.page.tsx
index 39399c7d..0edbf920 100644
--- a/src/app/trending/_default.page.tsx
+++ b/src/app/trending/_default.page.tsx
@@ -1 +1 @@
-export { LayoutTrending as Layout } from "./layout";
+export { DefaultLayout as Layout } from "@shared/layout";
diff --git a/src/app/trending/layout.tsx b/src/app/trending/layout.tsx
deleted file mode 100644
index 7b41b1c9..00000000
--- a/src/app/trending/layout.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { MultiAccounts } from "@shared/multiAccounts";
-import { Navigation } from "@shared/navigation";
-
-export function LayoutTrending({ children }: { children: React.ReactNode }) {
- return (
-
- );
-}
diff --git a/src/app/user/_default.page.tsx b/src/app/user/_default.page.tsx
index e4596971..0edbf920 100644
--- a/src/app/user/_default.page.tsx
+++ b/src/app/user/_default.page.tsx
@@ -1 +1 @@
-export { LayoutUser as Layout } from "./layout";
+export { DefaultLayout as Layout } from "@shared/layout";
diff --git a/src/app/user/layout.tsx b/src/app/user/layout.tsx
deleted file mode 100644
index 90a31e26..00000000
--- a/src/app/user/layout.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { MultiAccounts } from "@shared/multiAccounts";
-import { Navigation } from "@shared/navigation";
-
-export function LayoutUser({ children }: { children: React.ReactNode }) {
- return (
-
- );
-}
diff --git a/src/shared/appHeader.tsx b/src/shared/appHeader.tsx
index bb7911f2..3e745a3d 100644
--- a/src/shared/appHeader.tsx
+++ b/src/shared/appHeader.tsx
@@ -1,6 +1,17 @@
import { ArrowLeftIcon, ArrowRightIcon } from "@shared/icons";
+import useSWR from "swr";
+
+const fetcher = async () => {
+ const { platform } = await import("@tauri-apps/api/os");
+ return platform();
+};
export function AppHeader() {
+ const { data: platform } = useSWR(
+ typeof window !== "undefined" ? "platform" : null,
+ fetcher,
+ );
+
const goBack = () => {
window.history.back();
};
@@ -12,7 +23,9 @@ export function AppHeader() {
return (