feat: add search button to sidebar with Ctrl+K shortcut hint
Compact search bar button between sidebar header and nav. Shows magnifying glass icon + placeholder text + ⌘K kbd hint when expanded, just the icon when collapsed. Clicking opens the search palette.
This commit is contained in:
@@ -17,12 +17,17 @@
|
||||
commandTrackersCache,
|
||||
} from '$lib/stores/caches.svelte';
|
||||
|
||||
let { onopen = undefined }: { onopen?: (opener: () => void) => void } = $props();
|
||||
|
||||
let open = $state(false);
|
||||
let query = $state('');
|
||||
let activeIndex = $state(0);
|
||||
let loading = $state(false);
|
||||
let inputEl: HTMLInputElement;
|
||||
|
||||
// Expose openPalette to parent via callback
|
||||
$effect(() => { onopen?.(openPalette); });
|
||||
|
||||
interface SearchResult {
|
||||
id: number;
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user