mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-22 16:30:13 +00:00
fixing some things
This commit is contained in:
parent
c87ed51311
commit
62f54713bc
3 changed files with 14 additions and 11 deletions
|
@ -71,13 +71,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
{{ value }}
|
{{ value }}
|
||||||
</option>
|
</option>
|
||||||
<!-- If the user is on Other and enters a domain add this one so that the dropdown doesnt go blank -->
|
<!-- If the user is on Other and enters a domain add this one so that the dropdown doesnt go blank -->
|
||||||
<option v-if="!Object.keys(searchEngineMap).includes(searchEngine)" :value="searchEngine">
|
<option v-if="useCustomSearchEngine" :value="searchEngine">
|
||||||
{{ i18n.ts.searchEngineOther }}
|
{{ i18n.ts.searchEngineOther }}
|
||||||
</option>
|
</option>
|
||||||
<!-- If one of the other options is selected show this as a blank other --> <option v-if="Object.keys(searchEngineMap).includes(searchEngine)" value="">{{ i18n.ts.searchEngineOther }}</option>
|
<!-- If one of the other options is selected show this as a blank other -->
|
||||||
|
<option v-if="!useCustomSearchEngine" value="">{{ i18n.ts.searchEngineOther }}</option>
|
||||||
</MkSelect>
|
</MkSelect>
|
||||||
|
|
||||||
<div v-if="!Object.keys(searchEngineMap).includes(searchEngine)">
|
<div v-if="useCustomSearchEngine">
|
||||||
<MkInput v-model="searchEngine" :max="300">
|
<MkInput v-model="searchEngine" :max="300">
|
||||||
<template #label>{{ i18n.ts.searchEngineCusomURI }}</template>
|
<template #label>{{ i18n.ts.searchEngineCusomURI }}</template>
|
||||||
<template #caption>{{ i18n.ts.searchEngineCustomURIDescription }}</template>
|
<template #caption>{{ i18n.ts.searchEngineCustomURIDescription }}</template>
|
||||||
|
@ -568,4 +569,6 @@ definePageMetadata(() => ({
|
||||||
title: i18n.ts.general,
|
title: i18n.ts.general,
|
||||||
icon: 'ph-faders ph-bold ph-lg',
|
icon: 'ph-faders ph-bold ph-lg',
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
const useCustomSearchEngine = computed(() => !Object.keys(searchEngineMap).includes(searchEngine.value));
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//store the URL and if its none of these its a custom one
|
//store the URL and if its none of these its a custom one
|
||||||
export const searchEngineMap = {
|
export const searchEngineMap = {
|
||||||
//The first one is the default search engine
|
//The first one is the default search engine
|
||||||
'https://www.google.com/search?q={query}': 'Google',
|
'https://www.google.com/search/?q={query}': 'Google',
|
||||||
'https://duckduckgo.com?q={query}': 'Duckduckgo',
|
'https://duckduckgo.com/?q={query}': 'Duckduckgo',
|
||||||
'https://www.bing.com/search?q={query}': 'Bing',
|
'https://www.bing.com/search/?q={query}': 'Bing',
|
||||||
'https://search.yahoo.com/search?p={query}': 'Yahoo',
|
'https://search.yahoo.com/search/?p={query}': 'Yahoo',
|
||||||
'https://www.ecosia.org/search?q={query}': 'Ecosia',
|
'https://www.ecosia.org/search/?q={query}': 'Ecosia',
|
||||||
'https://www.qwant.com?q={query}': 'Qwant',
|
'https://www.qwant.com/?q={query}': 'Qwant',
|
||||||
'https://search.aol.com/aol/search?q={query}': 'AOL',
|
'https://search.aol.com/aol/search/?q={query}': 'AOL',
|
||||||
'https://yandex.com/search/?text={query}': 'Yandex',
|
'https://yandex.com/search/?text={query}': 'Yandex',
|
||||||
};
|
};
|
||||||
|
|
|
@ -306,7 +306,7 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
searchEngine: {
|
searchEngine: {
|
||||||
where: 'device',
|
where: 'account',
|
||||||
default: Object.keys(searchEngineMap)[0],
|
default: Object.keys(searchEngineMap)[0],
|
||||||
},
|
},
|
||||||
noteDesign: {
|
noteDesign: {
|
||||||
|
|
Loading…
Reference in a new issue