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
refactor(options): remove unnecessary ribbon activation option
Elian Dorand9e8f8e69b15
diff --git a/apps/client/src/widgets/ribbon/RibbonDefinition.ts b/apps/client/src/widgets/ribbon/RibbonDefinition.tsindex 9f19707cbb..8117c511a9 100644--- a/apps/client/src/widgets/ribbon/RibbonDefinition.ts+++ b/apps/client/src/widgets/ribbon/RibbonDefinition.ts@@ -50,7 +50,7 @@ export const RIBBON_TAB_DEFINITIONS: TabConfiguration[] = [icon: "bx bx-calendar-edit",content: EditedNotesTab,show: ({ note }) => note?.hasOwnedLabel("dateNote"),- activate: ({ note }) => (note?.getPromotedDefinitionAttributes().length === 0 || !options.is("promotedAttributesOpenInRibbon")) && options.is("editedNotesOpenInRibbon")+ activate: () => options.is("editedNotesOpenInRibbon")},{title: t("book_properties.book_properties"),diff --git a/apps/server/src/routes/api/options.ts b/apps/server/src/routes/api/options.tsindex 05f659db84..503447fa10 100644--- a/apps/server/src/routes/api/options.ts+++ b/apps/server/src/routes/api/options.ts@@ -80,7 +80,6 @@ const ALLOWED_OPTIONS = new Set<OptionNames>(["disableTray","customSearchEngineName","customSearchEngineUrl",- "promotedAttributesOpenInRibbon","editedNotesOpenInRibbon","locale","formattingLocale",diff --git a/apps/server/src/services/options_init.ts b/apps/server/src/services/options_init.tsindex e170b347cf..c93fbd0f01 100644--- a/apps/server/src/services/options_init.ts+++ b/apps/server/src/services/options_init.ts@@ -129,7 +129,6 @@ const defaultOptions: DefaultOption[] = [{ name: "logRetentionDays", value: "90", isSynced: false }, // default 90 days{ name: "customSearchEngineName", value: "DuckDuckGo", isSynced: true },{ name: "customSearchEngineUrl", value: "https://duckduckgo.com/?q={keyword}", isSynced: true },- { name: "promotedAttributesOpenInRibbon", value: "true", isSynced: true },{ name: "editedNotesOpenInRibbon", value: "true", isSynced: true },{ name: "mfaEnabled", value: "false", isSynced: false },{ name: "mfaMethod", value: "totp", isSynced: false },diff --git a/packages/commons/src/lib/options_interface.ts b/packages/commons/src/lib/options_interface.tsindex 0e044d37c7..bdc223c1f6 100644--- a/packages/commons/src/lib/options_interface.ts+++ b/packages/commons/src/lib/options_interface.ts@@ -121,7 +121,6 @@ export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActidownloadImagesAutomatically: boolean;checkForUpdates: boolean;disableTray: boolean;- promotedAttributesOpenInRibbon: boolean;editedNotesOpenInRibbon: boolean;codeBlockWordWrap: boolean;textNoteEditorMultilineToolbar: boolean;