mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
moved protected note switch to "note actions", added shadow to protected note title
This commit is contained in:
@@ -17,6 +17,10 @@ const TPL = `
|
||||
min-width: 5em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.note-title-container input.note-title.protected {
|
||||
text-shadow: 4px 4px 4px var(--muted-text-color);
|
||||
}
|
||||
</style>
|
||||
|
||||
<input autocomplete="off" value="" class="note-title" tabindex="1">
|
||||
@@ -52,6 +56,8 @@ export default class NoteTitleWidget extends TabAwareWidget {
|
||||
this.$noteTitle.val(note.title);
|
||||
|
||||
this.$noteTitle.prop("readonly", note.isProtected && !protectedSessionHolder.isProtectedSessionAvailable());
|
||||
console.trace("Refreshing - isProtected: ", !!note.isProtected);
|
||||
this.$noteTitle.toggleClass("protected", !!note.isProtected);
|
||||
}
|
||||
|
||||
async beforeNoteSwitchEvent({tabContext}) {
|
||||
@@ -80,6 +86,12 @@ export default class NoteTitleWidget extends TabAwareWidget {
|
||||
}
|
||||
}
|
||||
|
||||
entitiesReloadedEvent({loadResults}) {
|
||||
if (loadResults.isNoteReloaded(this.noteId)) {
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
beforeUnloadEvent() {
|
||||
this.spacedUpdate.updateNowIfNecessary();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user