refactor(options): remove unnecessary ribbon activation option

This commit is contained in:
Elian Doran 2025-11-30 10:41:26 +02:00
parent fa224e46bc
commit d9e8f8e69b
No known key found for this signature in database
4 changed files with 1 additions and 4 deletions

View File

@ -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"),

View File

@ -80,7 +80,6 @@ const ALLOWED_OPTIONS = new Set<OptionNames>([
"disableTray",
"customSearchEngineName",
"customSearchEngineUrl",
"promotedAttributesOpenInRibbon",
"editedNotesOpenInRibbon",
"locale",
"formattingLocale",

View File

@ -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 },

View File

@ -121,7 +121,6 @@ export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActi
downloadImagesAutomatically: boolean;
checkForUpdates: boolean;
disableTray: boolean;
promotedAttributesOpenInRibbon: boolean;
editedNotesOpenInRibbon: boolean;
codeBlockWordWrap: boolean;
textNoteEditorMultilineToolbar: boolean;