Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(options/other): improve desktop-specific options
Elian Doran266f542028f1
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex dad15c29f6..44eaa8a246 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -1360,16 +1360,17 @@},"search_engine": {"title": "Search Engine",- "custom_search_engine_info": "Custom search engine requires both a name and a URL to be set. If either of these is not set, DuckDuckGo will be used as the default search engine.",- "predefined_templates_label": "Predefined search engine templates",+ "custom_search_engine_info": "If either the name or URL is not set, DuckDuckGo will be used as the default.",+ "predefined_templates_label": "Predefined templates","bing": "Bing","baidu": "Baidu","duckduckgo": "DuckDuckGo","google": "Google",- "custom_name_label": "Custom search engine name",- "custom_name_placeholder": "Customize search engine name",- "custom_url_label": "Custom search engine URL should include {keyword} as a placeholder for the search term.",- "custom_url_placeholder": "Customize search engine URL",+ "custom_name_label": "Name",+ "custom_name_placeholder": "Search engine name",+ "custom_url_label": "URL",+ "custom_url_description": "Use {keyword} as a placeholder for the search term.",+ "custom_url_placeholder": "Search engine URL","save_button": "Save"},"tray": {diff --git a/apps/client/src/widgets/type_widgets/options/other.tsx b/apps/client/src/widgets/type_widgets/options/other.tsxindex 9b96db4e09..91273fbe5c 100644--- a/apps/client/src/widgets/type_widgets/options/other.tsx+++ b/apps/client/src/widgets/type_widgets/options/other.tsx@@ -7,8 +7,6 @@ import server from "../../../services/server";import toast from "../../../services/toast";import { isElectron } from "../../../services/utils";import Button from "../../react/Button";-import FormCheckbox from "../../react/FormCheckbox";-import FormGroup from "../../react/FormGroup";import FormSelect from "../../react/FormSelect";import FormText from "../../react/FormText";import FormTextBox, { FormTextBoxWithUnit } from "../../react/FormTextBox";@@ -74,10 +72,8 @@ function SearchEngineSettings() {}, []);return (- <OptionsSection title={t("search_engine.title")}>- <FormText>{t("search_engine.custom_search_engine_info")}</FormText>-- <FormGroup name="predefined-search-engine" label={t("search_engine.predefined_templates_label")}>+ <OptionsSection title={t("search_engine.title")} description={t("search_engine.custom_search_engine_info")}>+ <OptionsRow name="predefined-search-engine" label={t("search_engine.predefined_templates_label")}><FormSelectvalues={searchEngines}currentValue={customSearchEngineUrl}@@ -92,21 +88,21 @@ function SearchEngineSettings() {setCustomSearchEngineUrl(searchEngine.url);}}/>- </FormGroup>+ </OptionsRow>- <FormGroup name="custom-name" label={t("search_engine.custom_name_label")}>+ <OptionsRow name="custom-name" label={t("search_engine.custom_name_label")}><FormTextBox- currentValue={customSearchEngineName} onChange={setCustomSearchEngineName}+ currentValue={customSearchEngineName} onBlur={setCustomSearchEngineName}placeholder={t("search_engine.custom_name_placeholder")}/>- </FormGroup>+ </OptionsRow>- <FormGroup name="custom-url" label={t("search_engine.custom_url_label")}>+ <OptionsRow name="custom-url" label={t("search_engine.custom_url_label")} description={t("search_engine.custom_url_description")} stacked><FormTextBox- currentValue={customSearchEngineUrl} onChange={setCustomSearchEngineUrl}+ currentValue={customSearchEngineUrl} onBlur={setCustomSearchEngineUrl}placeholder={t("search_engine.custom_url_placeholder")}/>- </FormGroup>+ </OptionsRow></OptionsSection>);}@@ -116,7 +112,7 @@ function TrayOptionsSettings() {return (<OptionsSection title={t("tray.title")}>- <FormCheckbox+ <OptionsRowWithTogglename="tray-enabled"label={t("tray.enable_tray")}currentValue={!disableTray}