mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	chore(react/settings): remove unnecessary ribbon settings
This commit is contained in:
		| @@ -23,7 +23,6 @@ import NetworkConnectionsOptions from "./options/other/network_connections.js"; | |||||||
| import HtmlImportTagsOptions from "./options/other/html_import_tags.js"; | import HtmlImportTagsOptions from "./options/other/html_import_tags.js"; | ||||||
| import BackendLogWidget from "./content/backend_log.js"; | import BackendLogWidget from "./content/backend_log.js"; | ||||||
| import AttachmentErasureTimeoutOptions from "./options/other/attachment_erasure_timeout.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 MultiFactorAuthenticationOptions from './options/multi_factor_authentication.js'; | ||||||
| import LocalizationOptions from "./options/i18n/i18n.js"; | import LocalizationOptions from "./options/i18n/i18n.js"; | ||||||
| import CodeBlockOptions from "./options/text_notes/code_block.js"; | import CodeBlockOptions from "./options/text_notes/code_block.js"; | ||||||
|   | |||||||
| @@ -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*/` |  | ||||||
| <div class="options-section"> |  | ||||||
|     <h4>${t("ribbon.widgets")}</h4> |  | ||||||
|     <div> |  | ||||||
|         <label class="tn-checkbox"> |  | ||||||
|             <input type="checkbox" class="promoted-attributes-open-in-ribbon form-check-input"> |  | ||||||
|             ${t("ribbon.promoted_attributes_message")} |  | ||||||
|         </label> |  | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     <div> |  | ||||||
|         <label class="tn-checkbox"> |  | ||||||
|             <input type="checkbox" class="edited-notes-open-in-ribbon form-check-input"> |  | ||||||
|             ${t("ribbon.edited_notes_message")} |  | ||||||
|         </label> |  | ||||||
|     </div> |  | ||||||
| </div>`; |  | ||||||
|  |  | ||||||
| export default class RibbonOptions extends OptionsWidget { |  | ||||||
|  |  | ||||||
|     private $promotedAttributesOpenInRibbon!: JQuery<HTMLElement>; |  | ||||||
|     private $editedNotesOpenInRibbon!: JQuery<HTMLElement>; |  | ||||||
|  |  | ||||||
|     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); |  | ||||||
|     } |  | ||||||
| } |  | ||||||
		Reference in New Issue
	
	Block a user