From 325d3ca5c30110d0b01542463944fbb4ce4b8118 Mon Sep 17 00:00:00 2001 From: codytseng Date: Sun, 19 Oct 2025 21:42:01 +0800 Subject: [PATCH] feat: improve single-column layout --- src/PageManager.tsx | 10 +++---- src/components/Sidebar/index.tsx | 50 +++++++++++++++----------------- 2 files changed, 28 insertions(+), 32 deletions(-) diff --git a/src/PageManager.tsx b/src/PageManager.tsx index 4078f6ed..25c31ead 100644 --- a/src/PageManager.tsx +++ b/src/PageManager.tsx @@ -361,16 +361,15 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) { > -
-
+
+
-
+
{!!secondaryStack.length && secondaryStack.map((item, index) => (
(
))}
-
+
diff --git a/src/components/Sidebar/index.tsx b/src/components/Sidebar/index.tsx index b3f6fa9f..68a70ced 100644 --- a/src/components/Sidebar/index.tsx +++ b/src/components/Sidebar/index.tsx @@ -19,7 +19,7 @@ import SettingsButton from './SettingsButton' export default function PrimaryPageSidebar() { const { isSmallScreen } = useScreenSize() const { themeSetting } = useTheme() - const { sidebarCollapse, updateSidebarCollapse, enableSingleColumnLayout } = useUserPreferences() + const { sidebarCollapse, updateSidebarCollapse } = useUserPreferences() const { pubkey } = useNostr() if (isSmallScreen) return null @@ -28,11 +28,11 @@ export default function PrimaryPageSidebar() {
- {sidebarCollapse && !enableSingleColumnLayout ? ( + {sidebarCollapse ? (
@@ -41,30 +41,28 @@ export default function PrimaryPageSidebar() {
)} - - - - - - {pubkey && } - - + + + + + + {pubkey && } + +
- - {!enableSingleColumnLayout && ( - - )} + +
) }