mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix options
This commit is contained in:
parent
a882ad41c5
commit
46f40ee534
@ -89,7 +89,7 @@ export default class RootCommandExecutor extends Component {
|
||||
}
|
||||
|
||||
async showOptionsCommand() {
|
||||
await this.showAndHoistSubtree('options');
|
||||
await this.showAndHoistSubtree('_options');
|
||||
}
|
||||
|
||||
async showSQLConsoleHistoryCommand() {
|
||||
|
@ -369,17 +369,18 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
beforeActivate: (event, data) => {
|
||||
beforeActivate: (event, {node}) => {
|
||||
// hidden subtree is hidden hackily, prevent activating it e.g. by keyboard
|
||||
|
||||
if (hoistedNoteService.getHoistedNoteId() === '_hidden') {
|
||||
// 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)
|
||||
return data.node.data.noteId === '_hidden' || data.node.getParent().data.noteId !== 'root';
|
||||
// which could happen via UP key from hidden 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
|
||||
return data.node.data.noteId !== '_hidden';
|
||||
return node.data.noteId !== '_hidden';
|
||||
},
|
||||
activate: async (event, data) => {
|
||||
// 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>`;
|
||||
|
||||
export default class ContentLogWidget extends NoteContextAwareWidget {
|
||||
export default class BackendLogWidget extends NoteContextAwareWidget {
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
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 VacuumDatabaseOptions from "./options/advanced/vacuum_database.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">
|
||||
<style>
|
||||
@ -49,45 +49,45 @@ const TPL = `<div class="note-detail-content-widget note-detail-printable">
|
||||
</div>`;
|
||||
|
||||
const CONTENT_WIDGETS = {
|
||||
optionsAppearance: [
|
||||
_optionsAppearance: [
|
||||
ZoomFactorOptions,
|
||||
NativeTitleBarOptions,
|
||||
ThemeOptions,
|
||||
FontsOptions,
|
||||
MaxContentWidthOptions
|
||||
],
|
||||
optionsShortcuts: [ KeyboardShortcutsOptions ],
|
||||
optionsTextNotes: [
|
||||
_optionsShortcuts: [ KeyboardShortcutsOptions ],
|
||||
_optionsTextNotes: [
|
||||
HeadingStyleOptions,
|
||||
TableOfContentsOptions,
|
||||
TextAutoReadOnlySizeOptions
|
||||
],
|
||||
optionsCodeNotes: [
|
||||
_optionsCodeNotes: [
|
||||
VimKeyBindingsOptions,
|
||||
WrapLinesOptions,
|
||||
CodeAutoReadOnlySizeOptions,
|
||||
CodeMimeTypesOptions
|
||||
],
|
||||
optionsImages: [ ImageOptions ],
|
||||
optionsSpellcheck: [ SpellcheckOptions ],
|
||||
optionsPassword: [ PasswordOptions ],
|
||||
optionsEtapi: [ EtapiOptions ],
|
||||
optionsBackup: [ BackupOptions ],
|
||||
optionsSync: [ SyncOptions ],
|
||||
optionsOther: [
|
||||
_optionsImages: [ ImageOptions ],
|
||||
_optionsSpellcheck: [ SpellcheckOptions ],
|
||||
_optionsPassword: [ PasswordOptions ],
|
||||
_optionsEtapi: [ EtapiOptions ],
|
||||
_optionsBackup: [ BackupOptions ],
|
||||
_optionsSync: [ SyncOptions ],
|
||||
_optionsOther: [
|
||||
TrayOptions,
|
||||
NoteErasureTimeoutOptions,
|
||||
NoteRevisionsSnapshotIntervalOptions,
|
||||
NetworkConnectionsOptions
|
||||
],
|
||||
optionsAdvanced: [
|
||||
_optionsAdvanced: [
|
||||
DatabaseIntegrityCheckOptions,
|
||||
ConsistencyChecksOptions,
|
||||
DatabaseAnonymizationOptions,
|
||||
AdvancedSyncOptions,
|
||||
VacuumDatabaseOptions
|
||||
],
|
||||
backendLog: [ ContentLogWidget ]
|
||||
_backendLog: [ BackendLogWidget ]
|
||||
};
|
||||
|
||||
export default class ContentWidgetTypeWidget extends TypeWidget {
|
||||
|
Loading…
x
Reference in New Issue
Block a user