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): show an empty-state when a page-wide toggle is off
Elian Doran57492ffe1930
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex e6a1c2b28d..b1eb6947d1 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -1784,6 +1784,7 @@"title": "Spell Check","description": "These options apply only for desktop builds, browsers will use their own native spell check.","enable": "Check spelling",+ "disabled_placeholder": "Spell check is turned off. Enable it to choose languages and manage the custom dictionary.","language_code_label": "Spell Check Languages","custom_dictionary_title": "Custom Dictionary","custom_dictionary_description": "Words added to the dictionary are synced across all your devices.",@@ -2793,6 +2794,7 @@"summary": "Summary"},"llm": {+ "disabled_placeholder": "AI features are turned off. Enable them to configure providers and MCP.","not_available_in_standalone": "AI/LLM features are not available in the standalone version of Trilium, as LLM providers do not allow direct access from a browser.","feature_not_enabled": "Enable the LLM experimental feature in Settings → Advanced → Experimental features to use AI integrations.","add_provider": "Add Provider",diff --git a/apps/client/src/widgets/type_widgets/options/llm.tsx b/apps/client/src/widgets/type_widgets/options/llm.tsxindex 2009bc2c89..6b4fe38e2d 100644--- a/apps/client/src/widgets/type_widgets/options/llm.tsx+++ b/apps/client/src/widgets/type_widgets/options/llm.tsx@@ -43,11 +43,15 @@ export default function LlmSettings() {}/>- {aiEnabled && (+ {aiEnabled ? (<><ProviderSettings /><McpSettings /></>+ ) : (+ <OptionsSection>+ <NoItems icon="bx bx-bot" text={t("llm.disabled_placeholder")} />+ </OptionsSection>)}</>);diff --git a/apps/client/src/widgets/type_widgets/options/spellcheck.tsx b/apps/client/src/widgets/type_widgets/options/spellcheck.tsxindex a8f8a15ee9..1a050f542c 100644--- a/apps/client/src/widgets/type_widgets/options/spellcheck.tsx+++ b/apps/client/src/widgets/type_widgets/options/spellcheck.tsx@@ -52,8 +52,16 @@ function ElectronSpellcheckSettings() {/>} />- {spellCheckEnabled && <SpellcheckLanguages />}- {spellCheckEnabled && <CustomDictionary />}+ {spellCheckEnabled ? (+ <>+ <SpellcheckLanguages />+ <CustomDictionary />+ </>+ ) : (+ <OptionsSection>+ <NoItems icon="bx bx-check-double" text={t("spellcheck.disabled_placeholder")} />+ </OptionsSection>+ )}</>);}