fix: dashboard switcher, platform-aware search shortcut, mobile search, static topbar
- Always show dashboard tab strip + add button (was gated behind length > 1) - Search shortcut now shows Ctrl+K on Windows/Linux, ⌘K on Mac - Add icon-only search button in topbar for mobile viewports - Lock html/body overflow and use 100dvh to prevent topbar scrolling off-screen on mobile
This commit is contained in:
@@ -29,8 +29,14 @@ const QUICK_ADD_ICON: Record<string, string> = {
|
||||
"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<HTMLDivElement>(null);
|
||||
|
||||
@@ -110,7 +116,7 @@ export function QuickAddSheet() {
|
||||
}}
|
||||
>
|
||||
<Sparkles className="size-3" />
|
||||
<span>Pick what to add — or use ⌘K to search.</span>
|
||||
<span>Pick what to add — or use {shortcut} to search.</span>
|
||||
</div>
|
||||
|
||||
<div className="max-h-[60vh] overflow-y-auto">
|
||||
|
||||
Reference in New Issue
Block a user