From 48896e67cb65556f06781565537a399f96eec61a Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 14 Aug 2025 23:11:13 +0300 Subject: [PATCH] chore(react/settings): remove unnecessary ribbon settings --- .../widgets/type_widgets/content_widget.tsx | 1 - .../type_widgets/options/appearance/ribbon.ts | 42 ------------------- 2 files changed, 43 deletions(-) delete mode 100644 apps/client/src/widgets/type_widgets/options/appearance/ribbon.ts diff --git a/apps/client/src/widgets/type_widgets/content_widget.tsx b/apps/client/src/widgets/type_widgets/content_widget.tsx index d4f6978b9..571db77f4 100644 --- a/apps/client/src/widgets/type_widgets/content_widget.tsx +++ b/apps/client/src/widgets/type_widgets/content_widget.tsx @@ -23,7 +23,6 @@ import NetworkConnectionsOptions from "./options/other/network_connections.js"; import HtmlImportTagsOptions from "./options/other/html_import_tags.js"; import BackendLogWidget from "./content/backend_log.js"; import AttachmentErasureTimeoutOptions from "./options/other/attachment_erasure_timeout.js"; -import RibbonOptions from "./options/appearance/ribbon.js"; import MultiFactorAuthenticationOptions from './options/multi_factor_authentication.js'; import LocalizationOptions from "./options/i18n/i18n.js"; import CodeBlockOptions from "./options/text_notes/code_block.js"; diff --git a/apps/client/src/widgets/type_widgets/options/appearance/ribbon.ts b/apps/client/src/widgets/type_widgets/options/appearance/ribbon.ts deleted file mode 100644 index 861410790..000000000 --- a/apps/client/src/widgets/type_widgets/options/appearance/ribbon.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { OptionMap } from "@triliumnext/commons"; -import { t } from "../../../../services/i18n.js"; -import OptionsWidget from "../options_widget.js"; - -const TPL = /*html*/` -
-

${t("ribbon.widgets")}

-
- -
- -
- -
-
`; - -export default class RibbonOptions extends OptionsWidget { - - private $promotedAttributesOpenInRibbon!: JQuery; - private $editedNotesOpenInRibbon!: JQuery; - - doRender() { - this.$widget = $(TPL); - - this.$promotedAttributesOpenInRibbon = this.$widget.find(".promoted-attributes-open-in-ribbon"); - this.$promotedAttributesOpenInRibbon.on("change", () => this.updateCheckboxOption("promotedAttributesOpenInRibbon", this.$promotedAttributesOpenInRibbon)); - - this.$editedNotesOpenInRibbon = this.$widget.find(".edited-notes-open-in-ribbon"); - this.$editedNotesOpenInRibbon.on("change", () => this.updateCheckboxOption("editedNotesOpenInRibbon", this.$editedNotesOpenInRibbon)); - } - - async optionsLoaded(options: OptionMap) { - this.setCheckboxState(this.$promotedAttributesOpenInRibbon, options.promotedAttributesOpenInRibbon); - this.setCheckboxState(this.$editedNotesOpenInRibbon, options.editedNotesOpenInRibbon); - } -}