diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2021-01-03 23:58:24 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2021-01-03 23:58:24 +0900 |
| commit | e3e5a4272bf4374174a276b478a9ace269fdf9e9 (patch) | |
| tree | 28ca7c61b89bd244a45178f8ae0b0afaf6e2a88b /src/client/scripts | |
| parent | Improve usability (diff) | |
| download | sharkey-e3e5a4272bf4374174a276b478a9ace269fdf9e9.tar.gz sharkey-e3e5a4272bf4374174a276b478a9ace269fdf9e9.tar.bz2 sharkey-e3e5a4272bf4374174a276b478a9ace269fdf9e9.zip | |
Fix search.ts
Diffstat (limited to 'src/client/scripts')
| -rw-r--r-- | src/client/scripts/search.ts | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/client/scripts/search.ts b/src/client/scripts/search.ts index 9607003715..3e442cb94d 100644 --- a/src/client/scripts/search.ts +++ b/src/client/scripts/search.ts @@ -3,19 +3,14 @@ import * as os from '@/os'; import { i18n } from '@/i18n'; import { router } from '@/router'; -export async function search(q?: string | null | undefined) { - if (q == null) { - const { canceled, result: query } = await os.dialog({ - title: i18n.locale.search, - input: true - }); - - if (canceled || query == null || query === '') return; - - q = query; - } +export async function search() { + const { canceled, result: query } = await os.dialog({ + title: i18n.locale.search, + input: true + }); + if (canceled || query == null || query === '') return; - q = q.trim(); + const q = query.trim(); if (q.startsWith('@') && !q.includes(' ')) { router.push(`/${q}`); @@ -39,7 +34,8 @@ export async function search(q?: string | null | undefined) { date.setHours(23, 59, 59, 999); } - v.$root.$emit('warp', date); + // TODO + //v.$root.$emit('warp', date); os.dialog({ icon: faHistory, iconOnly: true, autoClose: true |