mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	fix options
This commit is contained in:
		| @@ -89,7 +89,7 @@ export default class RootCommandExecutor extends Component { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     async showOptionsCommand() { |     async showOptionsCommand() { | ||||||
|         await this.showAndHoistSubtree('options'); |         await this.showAndHoistSubtree('_options'); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async showSQLConsoleHistoryCommand() { |     async showSQLConsoleHistoryCommand() { | ||||||
|   | |||||||
| @@ -369,17 +369,18 @@ export default class NoteTreeWidget extends NoteContextAwareWidget { | |||||||
|                     return false; |                     return false; | ||||||
|                 } |                 } | ||||||
|             }, |             }, | ||||||
|             beforeActivate: (event, data) => { |             beforeActivate: (event, {node}) => { | ||||||
|                 // hidden subtree is hidden hackily, prevent activating it e.g. by keyboard |                 // hidden subtree is hidden hackily, prevent activating it e.g. by keyboard | ||||||
|  |  | ||||||
|                 if (hoistedNoteService.getHoistedNoteId() === '_hidden') { |                 if (hoistedNoteService.getHoistedNoteId() === '_hidden') { | ||||||
|                     // if we're hoisted in hidden subtree, we want to avoid crossing to "visible" tree, |                     // if we're hoisted in hidden subtree, we want to avoid crossing to "visible" tree, | ||||||
|                     // which could happen via UP key from hidden root (to another top level note) |                     // which could happen via UP key from hidden root | ||||||
|                     return data.node.data.noteId === '_hidden' || data.node.getParent().data.noteId !== 'root'; |  | ||||||
|  |                     return node.data.noteId !== 'root'; | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|                 // we're not hoisted to hidden subtree, the only way to cross is via DOWN key to the hidden root |                 // we're not hoisted to hidden subtree, the only way to cross is via DOWN key to the hidden root | ||||||
|                 return data.node.data.noteId !== '_hidden'; |                 return node.data.noteId !== '_hidden'; | ||||||
|             }, |             }, | ||||||
|             activate: async (event, data) => { |             activate: async (event, data) => { | ||||||
|                 // click event won't propagate so let's close context menu manually |                 // click event won't propagate so let's close context menu manually | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ const TPL = `<div style="height: 100%; display: flex; flex-direction: column;"> | |||||||
|     </div> |     </div> | ||||||
| </div>`; | </div>`; | ||||||
|  |  | ||||||
| export default class ContentLogWidget extends NoteContextAwareWidget { | export default class BackendLogWidget extends NoteContextAwareWidget { | ||||||
|     doRender() { |     doRender() { | ||||||
|         this.$widget = $(TPL); |         this.$widget = $(TPL); | ||||||
|         this.$backendLogTextArea = this.$widget.find(".backend-log-textarea"); |         this.$backendLogTextArea = this.$widget.find(".backend-log-textarea"); | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ import DatabaseIntegrityCheckOptions from "./options/advanced/database_integrity | |||||||
| import ConsistencyChecksOptions from "./options/advanced/consistency_checks.js"; | import ConsistencyChecksOptions from "./options/advanced/consistency_checks.js"; | ||||||
| import VacuumDatabaseOptions from "./options/advanced/vacuum_database.js"; | import VacuumDatabaseOptions from "./options/advanced/vacuum_database.js"; | ||||||
| import DatabaseAnonymizationOptions from "./options/advanced/database_anonymization.js"; | import DatabaseAnonymizationOptions from "./options/advanced/database_anonymization.js"; | ||||||
| import ContentLogWidget from "./content/backend_log.js"; | import BackendLogWidget from "./content/backend_log.js"; | ||||||
|  |  | ||||||
| const TPL = `<div class="note-detail-content-widget note-detail-printable"> | const TPL = `<div class="note-detail-content-widget note-detail-printable"> | ||||||
|     <style> |     <style> | ||||||
| @@ -49,45 +49,45 @@ const TPL = `<div class="note-detail-content-widget note-detail-printable"> | |||||||
| </div>`; | </div>`; | ||||||
|  |  | ||||||
| const CONTENT_WIDGETS = { | const CONTENT_WIDGETS = { | ||||||
|     optionsAppearance: [ |     _optionsAppearance: [ | ||||||
|         ZoomFactorOptions, |         ZoomFactorOptions, | ||||||
|         NativeTitleBarOptions, |         NativeTitleBarOptions, | ||||||
|         ThemeOptions, |         ThemeOptions, | ||||||
|         FontsOptions, |         FontsOptions, | ||||||
|         MaxContentWidthOptions |         MaxContentWidthOptions | ||||||
|     ], |     ], | ||||||
|     optionsShortcuts: [ KeyboardShortcutsOptions ], |     _optionsShortcuts: [ KeyboardShortcutsOptions ], | ||||||
|     optionsTextNotes: [ |     _optionsTextNotes: [ | ||||||
|         HeadingStyleOptions, |         HeadingStyleOptions, | ||||||
|         TableOfContentsOptions, |         TableOfContentsOptions, | ||||||
|         TextAutoReadOnlySizeOptions |         TextAutoReadOnlySizeOptions | ||||||
|     ], |     ], | ||||||
|     optionsCodeNotes: [ |     _optionsCodeNotes: [ | ||||||
|         VimKeyBindingsOptions, |         VimKeyBindingsOptions, | ||||||
|         WrapLinesOptions, |         WrapLinesOptions, | ||||||
|         CodeAutoReadOnlySizeOptions, |         CodeAutoReadOnlySizeOptions, | ||||||
|         CodeMimeTypesOptions |         CodeMimeTypesOptions | ||||||
|     ], |     ], | ||||||
|     optionsImages: [ ImageOptions ], |     _optionsImages: [ ImageOptions ], | ||||||
|     optionsSpellcheck: [ SpellcheckOptions ], |     _optionsSpellcheck: [ SpellcheckOptions ], | ||||||
|     optionsPassword: [ PasswordOptions ], |     _optionsPassword: [ PasswordOptions ], | ||||||
|     optionsEtapi: [ EtapiOptions ], |     _optionsEtapi: [ EtapiOptions ], | ||||||
|     optionsBackup: [ BackupOptions ], |     _optionsBackup: [ BackupOptions ], | ||||||
|     optionsSync: [ SyncOptions ], |     _optionsSync: [ SyncOptions ], | ||||||
|     optionsOther: [ |     _optionsOther: [ | ||||||
|         TrayOptions, |         TrayOptions, | ||||||
|         NoteErasureTimeoutOptions, |         NoteErasureTimeoutOptions, | ||||||
|         NoteRevisionsSnapshotIntervalOptions, |         NoteRevisionsSnapshotIntervalOptions, | ||||||
|         NetworkConnectionsOptions |         NetworkConnectionsOptions | ||||||
|     ], |     ], | ||||||
|     optionsAdvanced: [ |     _optionsAdvanced: [ | ||||||
|         DatabaseIntegrityCheckOptions, |         DatabaseIntegrityCheckOptions, | ||||||
|         ConsistencyChecksOptions, |         ConsistencyChecksOptions, | ||||||
|         DatabaseAnonymizationOptions, |         DatabaseAnonymizationOptions, | ||||||
|         AdvancedSyncOptions, |         AdvancedSyncOptions, | ||||||
|         VacuumDatabaseOptions |         VacuumDatabaseOptions | ||||||
|     ], |     ], | ||||||
|     backendLog: [ ContentLogWidget ] |     _backendLog: [ BackendLogWidget ] | ||||||
| }; | }; | ||||||
|  |  | ||||||
| export default class ContentWidgetTypeWidget extends TypeWidget { | export default class ContentWidgetTypeWidget extends TypeWidget { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user