🌐 Search engine custom button

This commit is contained in:
Tagaishi
2023-08-24 00:21:02 +02:00
parent 8d2aa51f2b
commit 5ccc094ad1
2 changed files with 8 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
{
"title": "Search engine",
"configurationName": "Search engine configuration",
"custom": "Custom",
"tips": {
"generalTip": "There are multiple prefixes you can use! Adding these in front of your query will filter the results. !s (Web), !t (Torrents), !y (YouTube), and !m (Media).",
"placeholderTip": "%s can be used as a placeholder for the query."

View File

@@ -35,6 +35,13 @@ export const SearchEngineSelector = ({ searchEngine }: Props) => {
updateSearchEngineConfig(engine, url);
};
const searchEngineOptions: { label: string; value: EngineType }[] = [
{ label: 'Google', value: 'google' },
{ label: 'DuckDuckGo', value: 'duckDuckGo' },
{ label: 'Bing', value: 'bing' },
{ label: t('custom'), value: 'custom' },
];
return (
<Stack spacing={0} mt="xs">
<Title order={5} mb="xs">
@@ -77,13 +84,6 @@ export const SearchEngineSelector = ({ searchEngine }: Props) => {
);
};
const searchEngineOptions: { label: string; value: EngineType }[] = [
{ label: 'Google', value: 'google' },
{ label: 'DuckDuckGo', value: 'duckDuckGo' },
{ label: 'Bing', value: 'bing' },
{ label: 'Custom', value: 'custom' },
];
export const searchUrls: { [key in CommonSearchEngineCommonSettingsType['type']]: string } = {
google: 'https://google.com/search?q=',
duckDuckGo: 'https://duckduckgo.com/?q=',