Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/lib/components/app-sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
);

let commandInput = $state('');
let commandPlaceholder = $state('Search...');
</script>

<svelte:document onkeydown={handleKeydown} />
Expand Down Expand Up @@ -309,10 +310,18 @@
<Command.Dialog
bind:open={commandOpen.current}
onOpenChangeComplete={(state) => {
if (!state) commandInput = '';
if (!state) {
commandInput = '';
// 100% not an easter egg
if (Math.random() > 0.05) {
commandPlaceholder = 'Search...';
} else {
commandPlaceholder = "The search begins, I'm back, so enjoy the trip, huh"; // https://share.google/zDleRaqsFgtSUx2l3
}
}
}}
>
<Command.Input bind:value={commandInput} placeholder="Type a command or search..." />
<Command.Input bind:value={commandInput} placeholder={commandPlaceholder} />
<Command.List>
<Command.Empty>No results found.</Command.Empty>
{#each filteredMainNavigation as groupItem (groupItem.title)}
Expand Down