bookmarking should be available for all note types

This commit is contained in:
zadam
2021-10-08 16:18:00 +02:00
parent fa40a5f496
commit eecba725b0
2 changed files with 9 additions and 5 deletions

View File

@@ -64,7 +64,7 @@ export default class BasicPropertiesWidget extends NoteContextAwareWidget {
}
isEnabled() {
return this.note && (this.note.type === 'text' || this.note.type === 'code' || this.note.type === 'mermaid');
return this.note;
}
getTitle() {
@@ -84,4 +84,10 @@ export default class BasicPropertiesWidget extends NoteContextAwareWidget {
this.$widget.find(".editability-select-container").append(this.editabilitySelectWidget.render());
this.$widget.find(".bookmark-switch-container").append(this.bookmarkSwitchWidget.render());
}
async refreshWithNote(note) {
await super.refreshWithNote(note);
this.$widget.find(".editability-select-container").toggle(this.note && ['text', 'code'].includes(this.note.type))
}
}