diff --git a/src/plugins/built-in/globalSearch/SearchBar.svelte b/src/plugins/built-in/globalSearch/SearchBar.svelte index 55e2d383..bd2a31bf 100644 --- a/src/plugins/built-in/globalSearch/SearchBar.svelte +++ b/src/plugins/built-in/globalSearch/SearchBar.svelte @@ -266,11 +266,46 @@ {/if} {/if} +
+ {#if combinedResults.length > 0 || calculatorResult} +
+
+ {#if !calculatorResult} + {#if selectedIndex >= 0 && selectedIndex < combinedResults.length} + {@const item = combinedResults[selectedIndex].item} + {#if 'keybind' in item && item.keybind} + {@render Shortcut({ text: 'Shortcut', keybind: item.keybindLabel })} + {/if} + {/if} + {/if} +
+
+ {@render Shortcut({ text: 'Navigate', keybind: ['↑', '↓']})} + {#if calculatorResult && selectedIndex === 0} + {@render Shortcut({ text: 'Copy result', keybind: ['↵']})} + {:else} + {@render Shortcut({ text: 'Select', keybind: ['↵']})} + {/if} +
+
+ {/if} +
{/if} +{#snippet Shortcut({ text, keybind }: { text: string, keybind: string[] }) } +
+
+ {#each keybind as key} + {key} + {/each} +
+ {text} +
+{/snippet} +