From 8d1352d9447259f1d32409baab364aa45b4adc49 Mon Sep 17 00:00:00 2001 From: Parth Jadhav Date: Thu, 19 Jan 2023 13:39:26 +0530 Subject: [PATCH] feat: show result path & refactor result component (#38) --- src/routes/App/App.svelte | 12 +-- src/routes/App/lib/FileSearchResult.svelte | 105 ++++++++++++++++++++ src/routes/App/lib/SearchResult.svelte | 106 ++++----------------- src/utils/icon.ts | 38 ++++++++ src/utils/path.ts | 13 +++ 5 files changed, 173 insertions(+), 101 deletions(-) create mode 100644 src/routes/App/lib/FileSearchResult.svelte create mode 100644 src/utils/icon.ts create mode 100644 src/utils/path.ts diff --git a/src/routes/App/App.svelte b/src/routes/App/App.svelte index c47078b..9fb4495 100644 --- a/src/routes/App/App.svelte +++ b/src/routes/App/App.svelte @@ -28,16 +28,6 @@ appState.settings = false; }; - const searchResultClicked = async (event: any) => { - await invoke('open_command', { path: event.target.id }); - const searchBarInput = document.getElementById( - 'searchBarInput' - ) as HTMLInputElement; - results = []; - searchBarInput.value = ''; - await appWindow.hide(); - }; - const search = async (searchPrompt: string) => { footerText = 'Loading...'; [results, executionTime, resultType] = await invoke('handle_input', { @@ -85,7 +75,7 @@ {#await appWindow.setSize(new LogicalSize(750, 100))}{/await} - +