diff --git a/src/app/d/[slug]/page.tsx b/src/app/d/[slug]/page.tsx index 86b27d4..ca0d84e 100644 --- a/src/app/d/[slug]/page.tsx +++ b/src/app/d/[slug]/page.tsx @@ -93,7 +93,7 @@ export default async function DashboardPage({ return (
- {userDashboards.length > 1 && ( + {userDashboards.length >= 1 && (
{userDashboards.map((d) => ( diff --git a/src/app/globals.css b/src/app/globals.css index 57970f7..e89de07 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -490,6 +490,8 @@ body { margin: 0; padding: 0; + height: 100%; + overflow: hidden; } body { @apply bg-background text-foreground; @@ -521,6 +523,7 @@ display: grid; grid-template-columns: 232px 1fr; height: 100vh; + height: 100dvh; background: var(--paper); } :where(html[data-nav="rail"]) .app { diff --git a/src/components/quick-add-sheet.tsx b/src/components/quick-add-sheet.tsx index 0a1fe0d..37392de 100644 --- a/src/components/quick-add-sheet.tsx +++ b/src/components/quick-add-sheet.tsx @@ -29,8 +29,14 @@ const QUICK_ADD_ICON: Record = { "file-plus": "note", }; +function useShortcutLabel() { + if (typeof navigator === "undefined") return "⌘K"; + return /Mac|iPhone|iPad|iPod/.test(navigator.platform) ? "⌘K" : "Ctrl+K"; +} + export function QuickAddSheet() { const { sheetOpen, closeSheet, actions } = useQuickAdd(); + const shortcut = useShortcutLabel(); const router = useRouter(); const backdropRef = useRef(null); @@ -110,7 +116,7 @@ export function QuickAddSheet() { }} > - Pick what to add — or use ⌘K to search. + Pick what to add — or use {shortcut} to search.
diff --git a/src/components/topbar-search.tsx b/src/components/topbar-search.tsx index 1a53290..f19f7fa 100644 --- a/src/components/topbar-search.tsx +++ b/src/components/topbar-search.tsx @@ -3,25 +3,45 @@ import { useQuickAdd } from "@/components/quick-add-provider"; import { NavIcon } from "@/components/nav-icon"; +function useShortcutLabel() { + if (typeof navigator === "undefined") return "⌘K"; + return /Mac|iPhone|iPad|iPod/.test(navigator.platform) ? "⌘K" : "Ctrl+K"; +} + export function TopbarSearch() { const { openPalette } = useQuickAdd(); + const shortcut = useShortcutLabel(); return ( - + <> + {/* Desktop: pill with shortcut hint */} + + + {/* Mobile: icon-only */} + + ); }