2022-12-02 16:46:14 +01:00
|
|
|
import CommandButtonWidget from "./command_button.js";
|
2022-08-06 23:49:25 +02:00
|
|
|
|
2023-06-04 23:01:40 +02:00
|
|
|
export default class RevisionsButton extends CommandButtonWidget {
|
2022-08-06 23:49:25 +02:00
|
|
|
constructor() {
|
|
|
|
super();
|
|
|
|
|
|
|
|
this.icon('bx-history')
|
|
|
|
.title("Note Revisions")
|
2023-06-04 23:01:40 +02:00
|
|
|
.command("showRevisions")
|
2022-12-11 13:20:37 +01:00
|
|
|
.titlePlacement("bottom")
|
|
|
|
.class("icon-action");
|
2022-08-06 23:49:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
isEnabled() {
|
2022-12-01 10:16:57 +01:00
|
|
|
return super.isEnabled() && !['launcher', 'doc'].includes(this.note?.type);
|
2022-08-06 23:49:25 +02:00
|
|
|
}
|
2022-12-01 10:16:57 +01:00
|
|
|
}
|