copy sharkey settings into new frontend preferences model

This commit is contained in:
Hazelnoot 2025-03-31 14:53:02 -04:00
parent 59ce4d6c28
commit c371af34e8
50 changed files with 468 additions and 425 deletions

View file

@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { ref } from 'vue';
import { i18n } from '@/i18n.js';
import { defaultStore } from '@/store';
import { prefer } from '@/preferences.js';
const props = defineProps<{
q: string;
@ -23,7 +23,7 @@ const query = ref(props.q);
const search = () => {
const searchQuery = encodeURIComponent(query.value);
const searchUrl = defaultStore.state.searchEngine.replace(/{query}|%s\b/g, searchQuery);
const searchUrl = prefer.s.searchEngine.replace(/{query}|%s\b/g, searchQuery);
window.open(searchUrl, '_blank', 'noopener');
};