From 1da580c20dc5ec017d7146080283ff79c7da9ddd Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Wed, 26 Mar 2025 10:54:28 -0400 Subject: [PATCH] restore sharkey-specific settings --- .../src/pages/settings/preferences.vue | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) diff --git a/packages/frontend/src/pages/settings/preferences.vue b/packages/frontend/src/pages/settings/preferences.vue index 816f8d7435..ac1f860d59 100644 --- a/packages/frontend/src/pages/settings/preferences.vue +++ b/packages/frontend/src/pages/settings/preferences.vue @@ -165,6 +165,24 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + + + + + + + + + + + + + @@ -180,6 +198,43 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -287,6 +342,13 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + + @@ -368,6 +430,27 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + + + + + + + + + {{ i18n.ts.verifyNotificationDotWorkingButton }} + @@ -491,6 +574,26 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + + + + + + + + + + + + + + + @@ -528,6 +631,26 @@ SPDX-License-Identifier: AGPL-3.0-only + + +
+ + + + + + + + + + + + + + +
+
+ @@ -536,6 +659,12 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + @@ -602,6 +731,11 @@ import MkFeatureBanner from '@/components/MkFeatureBanner.vue'; import { globalEvents } from '@/events.js'; import { claimAchievement } from '@/utility/achievements.js'; import { instance } from '@/instance.js'; +import Search from '@/pages/search.vue'; + +// Sharkey imports +import { searchEngineMap } from '@/utility/search-engine-map.js'; +import { worksOnInstance } from '@/utility/favicon-dot.js'; const lang = ref(miLocalStorage.getItem('lang')); const dataSaver = ref(prefer.s.dataSaver); @@ -651,6 +785,26 @@ const defaultFollowWithReplies = prefer.model('defaultFollowWithReplies'); const chatShowSenderName = prefer.model('chat.showSenderName'); const chatSendOnEnter = prefer.model('chat.sendOnEnter'); +// Sharkey options +const collapseNotesRepliedTo = prefer.model('collapseNotesRepliedTo'); +const showTickerOnReplies = prefer.model('showTickerOnReplies'); +const searchEngine = prefer.model('searchEngine'); +const noteDesign = prefer.model('noteDesign'); +const uncollapseCW = prefer.model('uncollapseCW'); +const expandLongNote = prefer.model('expandLongNote'); +const disableCatSpeak = prefer.model('disableCatSpeak'); +const enableFaviconNotificationDot = prefer.model('enableFaviconNotificationDot'); +const warnMissingAltText = prefer.model('warnMissingAltText'); +const notificationClickable = prefer.model('notificationClickable'); +const warnExternalUrl = prefer.model('warnExternalUrl'); +const showVisibilitySelectorOnBoost = prefer.model('showVisibilitySelectorOnBoost'); +const visibilityOnBoost = prefer.model('visibilityOnBoost'); +const cornerRadius = prefer.model('cornerRadius'); +const oneko = prefer.model('oneko'); +const numberOfReplies = prefer.model('numberOfReplies'); + +const useCustomSearchEngine = computed(() => !Object.keys(searchEngineMap).includes(searchEngine.value)); + watch(lang, () => { miLocalStorage.setItem('lang', lang.value as string); miLocalStorage.removeItem('locale'); @@ -793,6 +947,16 @@ function testNotification(): void { }, 300); } +async function testNotificationDot() { + const success = await worksOnInstance(); + + if (success) { + os.toast(i18n.ts.notificationDotWorking); + } else { + os.toast(i18n.ts.notificationDotNotWorking); + } +} + const headerActions = computed(() => []); const headerTabs = computed(() => []);