diff options
| author | dakkar <dakkar@thenautilus.net> | 2023-12-29 14:54:01 +0000 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2023-12-29 14:54:37 +0000 |
| commit | cd8ba4b634cbaf1656a2631eaf02f0e5dcdf397d (patch) | |
| tree | e3468274cef8e9b508811662c50da61185670f90 | |
| parent | special-case full usernames is search #264 (diff) | |
| download | sharkey-cd8ba4b634cbaf1656a2631eaf02f0e5dcdf397d.tar.gz sharkey-cd8ba4b634cbaf1656a2631eaf02f0e5dcdf397d.tar.bz2 sharkey-cd8ba4b634cbaf1656a2631eaf02f0e5dcdf397d.zip | |
always go to tag page from widget #264
| -rw-r--r-- | packages/frontend/src/widgets/WidgetSearch.vue | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/packages/frontend/src/widgets/WidgetSearch.vue b/packages/frontend/src/widgets/WidgetSearch.vue index 0106df9c49..9999139776 100644 --- a/packages/frontend/src/widgets/WidgetSearch.vue +++ b/packages/frontend/src/widgets/WidgetSearch.vue @@ -23,8 +23,6 @@ import { i18n } from '@/i18n.js'; import * as os from '@/os.js'; import { useRouter } from '@/router.js'; import { GetFormResultType } from '@/scripts/form.js'; -import { $i } from '@/account.js'; -import { instance } from '@/instance.js'; const name = 'search'; @@ -62,7 +60,6 @@ let notePagination = ref(); let isLocalOnly = ref(false); let order = ref(true); let filetype = ref<null | string>(null); -const notesSearchAvailable = (($i == null && instance.policies.canSearchNotes) || ($i != null && $i.policies.canSearchNotes)); function options(ev) { os.popupMenu([{ @@ -125,14 +122,11 @@ async function search() { return; } - if (!notesSearchAvailable && query.startsWith('#')) { - // can't really search, at least try handling hashtags + if (query.startsWith('#')) { router.push(`/tags/${encodeURIComponent(query.substring(1))}`); return; } - // TODO: if !notesSearchAvailable pop up an error message - notePagination.value = { endpoint: 'notes/search', limit: 10, |