mirror of https://github.com/TriliumNext/Notes
Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop
commit
adc9172681
@ -1,27 +0,0 @@
|
|||||||
import { t } from "../../services/i18n.js";
|
|
||||||
import options from "../../services/options.js";
|
|
||||||
import CommandButtonWidget from "./command_button.js";
|
|
||||||
|
|
||||||
export default class CreateAiChatButton extends CommandButtonWidget {
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
|
|
||||||
this.icon("bx bx-bot")
|
|
||||||
.title(t("ai.create_new_ai_chat"))
|
|
||||||
.titlePlacement("bottom")
|
|
||||||
.command("createAiChat")
|
|
||||||
.class("icon-action");
|
|
||||||
}
|
|
||||||
|
|
||||||
isEnabled() {
|
|
||||||
return options.get("aiEnabled") === "true";
|
|
||||||
}
|
|
||||||
|
|
||||||
async refreshWithNote() {
|
|
||||||
if (this.isEnabled()) {
|
|
||||||
this.$widget.show();
|
|
||||||
} else {
|
|
||||||
this.$widget.hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue