From 62f54713bc7debb154178c5f8ae84931018bfb3e Mon Sep 17 00:00:00 2001 From: KevinWh0 <45321184+ChaoticLeah@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:46:20 +0200 Subject: [PATCH] fixing some things --- packages/frontend/src/pages/settings/general.vue | 9 ++++++--- packages/frontend/src/scripts/search-engine-map.ts | 14 +++++++------- packages/frontend/src/store.ts | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index c589a29001..a1cb992dda 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -71,13 +71,14 @@ SPDX-License-Identifier: AGPL-3.0-only {{ value }} - - + + -
+
@@ -568,4 +569,6 @@ definePageMetadata(() => ({ title: i18n.ts.general, icon: 'ph-faders ph-bold ph-lg', })); + +const useCustomSearchEngine = computed(() => !Object.keys(searchEngineMap).includes(searchEngine.value)); diff --git a/packages/frontend/src/scripts/search-engine-map.ts b/packages/frontend/src/scripts/search-engine-map.ts index 925d16aafe..3e0594f0c5 100644 --- a/packages/frontend/src/scripts/search-engine-map.ts +++ b/packages/frontend/src/scripts/search-engine-map.ts @@ -1,12 +1,12 @@ //store the URL and if its none of these its a custom one export const searchEngineMap = { //The first one is the default search engine - 'https://www.google.com/search?q={query}': 'Google', - 'https://duckduckgo.com?q={query}': 'Duckduckgo', - 'https://www.bing.com/search?q={query}': 'Bing', - 'https://search.yahoo.com/search?p={query}': 'Yahoo', - 'https://www.ecosia.org/search?q={query}': 'Ecosia', - 'https://www.qwant.com?q={query}': 'Qwant', - 'https://search.aol.com/aol/search?q={query}': 'AOL', + 'https://www.google.com/search/?q={query}': 'Google', + 'https://duckduckgo.com/?q={query}': 'Duckduckgo', + 'https://www.bing.com/search/?q={query}': 'Bing', + 'https://search.yahoo.com/search/?p={query}': 'Yahoo', + 'https://www.ecosia.org/search/?q={query}': 'Ecosia', + 'https://www.qwant.com/?q={query}': 'Qwant', + 'https://search.aol.com/aol/search/?q={query}': 'AOL', 'https://yandex.com/search/?text={query}': 'Yandex', }; diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index ffd63f71fc..f753b2c3e8 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -306,7 +306,7 @@ export const defaultStore = markRaw(new Storage('base', { default: false, }, searchEngine: { - where: 'device', + where: 'account', default: Object.keys(searchEngineMap)[0], }, noteDesign: {