feat: daily notes (dev only) (#1894)

This commit is contained in:
Mo
2022-10-27 17:21:31 -05:00
committed by GitHub
parent 064e054587
commit 69c3f2be83
47 changed files with 1535 additions and 158 deletions

View File

@@ -122,6 +122,9 @@ class NoteView extends PureComponent<NoteViewProps, State> {
this.controller = props.controller
this.onEditorComponentLoad = () => {
if (!this.controller || this.controller.dealloced) {
return
}
this.application.getDesktopService()?.redoSearch()
}
@@ -233,7 +236,11 @@ class NoteView extends PureComponent<NoteViewProps, State> {
if (this.controller.isTemplateNote) {
setTimeout(() => {
this.focusTitle()
if (this.controller.templateNoteOptions?.autofocusBehavior === 'editor') {
this.focusEditor()
} else {
this.focusTitle()
}
})
}
}
@@ -920,6 +927,10 @@ class NoteView extends PureComponent<NoteViewProps, State> {
}
override render() {
if (this.controller.dealloced) {
return null
}
if (this.state.showProtectedWarning || !this.application.isAuthorizedToRenderItem(this.note)) {
return (
<ProtectedItemOverlay