mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 03:00:41 +01:00
button tweaks
This commit is contained in:
16
src/public/app/widgets/buttons/show_note_source.js
Normal file
16
src/public/app/widgets/buttons/show_note_source.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import ButtonWidget from "./button_widget.js";
|
||||
|
||||
export default class ShowNoteSourceButton extends ButtonWidget {
|
||||
isEnabled() {
|
||||
return super.isEnabled() && this.note && ['text', 'relation-map'].includes(this.note.type);
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.icon('bx bx-code')
|
||||
.title("Show Note Source")
|
||||
.command("showNoteSource")
|
||||
.titlePlacement("bottom");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user