mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-23 12:35:44 +08:00
19 lines
443 B
TypeScript
19 lines
443 B
TypeScript
import BasicWidget from "../basic_widget.js";
|
|
|
|
const TPL = /*html*/`
|
|
<button type="button" class="action-button bx bx-sidebar"></button>`;
|
|
|
|
class ToggleSidebarButtonWidget extends BasicWidget {
|
|
doRender() {
|
|
this.$widget = $(TPL);
|
|
|
|
this.$widget.on("click", () =>
|
|
this.triggerCommand("setActiveScreen", {
|
|
screen: "tree"
|
|
})
|
|
);
|
|
}
|
|
}
|
|
|
|
export default ToggleSidebarButtonWidget;
|