From ca1b183b6b1ba7eaf167bc60dc5480e24eba4127 Mon Sep 17 00:00:00 2001 From: Esurio Date: Sat, 20 Jul 2024 01:20:58 +0000 Subject: [PATCH] Remove(frontend): Bye Advanced search --- .../frontend/src/pages/messaging/index.vue | 1 - packages/frontend/src/pages/search.note.vue | 80 ++----------------- 2 files changed, 8 insertions(+), 73 deletions(-) diff --git a/packages/frontend/src/pages/messaging/index.vue b/packages/frontend/src/pages/messaging/index.vue index 299fd47bba..688ae51941 100644 --- a/packages/frontend/src/pages/messaging/index.vue +++ b/packages/frontend/src/pages/messaging/index.vue @@ -8,7 +8,6 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts.search }}
diff --git a/packages/frontend/src/pages/search.note.vue b/packages/frontend/src/pages/search.note.vue index de6d825939..bc66c06b9c 100644 --- a/packages/frontend/src/pages/search.note.vue +++ b/packages/frontend/src/pages/search.note.vue @@ -31,44 +31,6 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts._advancedSearch._searchOption.toggleAdvancedSearch }} - - - - - -
- - - - - -
-
- - - -
- - - - - - -
-
- - - - - -
- {{ i18n.ts._advancedSearch._searchOption.toggleReply }} - {{ i18n.ts._advancedSearch._searchOption.toggleCW }} - {{ i18n.ts._advancedSearch._searchOption.toggleQuote }} -
-
-
@@ -87,7 +49,6 @@ import { ref } from 'vue'; import MkNotes from '@/components/MkNotes.vue'; import MkRadios from '@/components/MkRadios.vue'; import MkButton from '@/components/MkButton.vue'; -import MkSwitch from '@/components/MkSwitch.vue'; import { i18n } from '@/i18n.js'; import * as os from '@/os.js'; import { misskeyApi } from '@/scripts/misskey-api.js'; @@ -107,14 +68,6 @@ const searchOrigin = ref('combined'); const notePagination = ref(); const user = ref(null); const isLocalOnly = ref(false); -const isfileOnly = ref('combined'); -const advancedSearch = ref(false); -const excludeCW = ref(false); -const excludeReply = ref(false); -const excludeQuote = ref(false); -const sensitiveFilter = ref('combined'); - -const isAdvancedSearchAvailable = ($i != null && instance.policies.canAdvancedSearchNotes ) || ($i != null && $i.policies.canAdvancedSearchNotes ); function selectUser() { os.selectUser({ includeSelf: true }).then(_user => { @@ -154,31 +107,14 @@ async function search() { } } - if (isAdvancedSearchAvailable === true && advancedSearch.value === true) { - notePagination.value = { - endpoint: 'notes/advanced-search', - limit: 10, - params: { - query: searchQuery.value, - userId: user.value ? user.value.id : null, - origin: searchOrigin.value, - fileOption: isfileOnly.value, - excludeCW: excludeCW.value, - excludeReply: excludeReply.value, - excludeQuote: excludeQuote.value, - sensitiveFilter: sensitiveFilter.value, - }, - }; - } else { - notePagination.value = { - endpoint: 'notes/search', - limit: 10, - params: { - query: searchQuery.value, - userId: user.value ? user.value.id : null, - origin: searchOrigin.value, - }, - }; + notePagination.value = { + endpoint: 'notes/search', + limit: 10, + params: { + query: searchQuery.value, + userId: user.value ? user.value.id : null, + origin: searchOrigin.value, + } } if (isLocalOnly.value) notePagination.value.params.host = '.';