diff options
author | 2022-12-17 01:30:02 +0100 | |
---|---|---|
committer | 2022-12-17 01:30:02 +0100 | |
commit | 4cd809bd0c94836532f58a2ec6aa131694cce10d (patch) | |
tree | 7a2f5f61c3101a3c0761cc32b67a7f9ad67222e5 /src/components/SearchBar.vue | |
parent | 8d09086e78b6de1eb7108b8d3ba08fcca2c5d577 (diff) | |
download | it-tools-4cd809bd0c94836532f58a2ec6aa131694cce10d.tar.gz it-tools-4cd809bd0c94836532f58a2ec6aa131694cce10d.tar.zst it-tools-4cd809bd0c94836532f58a2ec6aa131694cce10d.zip |
feat(tools): added favorite tool handling
Diffstat (limited to 'src/components/SearchBar.vue')
-rw-r--r-- | src/components/SearchBar.vue | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/SearchBar.vue b/src/components/SearchBar.vue index bdb8eb2..95919d5 100644 --- a/src/components/SearchBar.vue +++ b/src/components/SearchBar.vue @@ -1,7 +1,7 @@ <script lang="ts" setup> import { useFuzzySearch } from '@/composable/fuzzySearch'; import { tools } from '@/tools'; -import type { ITool } from '@/tools/tool'; +import type { Tool } from '@/tools/tools.types'; import { SearchRound } from '@vicons/material'; import { useMagicKeys, whenever } from '@vueuse/core'; import { computed, h, ref } from 'vue'; @@ -17,7 +17,7 @@ const { searchResult } = useFuzzySearch({ options: { keys: [{ name: 'name', weight: 2 }, 'description', 'keywords'] }, }); -const toolToOption = (tool: ITool) => ({ label: tool.name, value: tool.path, tool }); +const toolToOption = (tool: Tool) => ({ label: tool.name, value: tool.path, tool }); const options = computed(() => { if (queryString.value === '') { @@ -47,7 +47,7 @@ whenever(keys.ctrl_k, () => { focusTarget.value.focus(); }); -function renderOption({ tool }: { tool: ITool }) { +function renderOption({ tool }: { tool: Tool }) { return h(SearchBarItem, { tool }); } </script> |