mirror of
https://github.com/zadam/trilium.git
synced 2025-11-15 01:35:51 +01:00
chore(monorepo/client): move client source files
This commit is contained in:
21
apps/client/src/widgets/floating_buttons/refresh_button.ts
Normal file
21
apps/client/src/widgets/floating_buttons/refresh_button.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import appContext from "../../components/app_context.js";
|
||||
import { t } from "../../services/i18n.js";
|
||||
import OnClickButtonWidget from "../buttons/onclick_button.js";
|
||||
|
||||
export default class RefreshButton extends OnClickButtonWidget {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this
|
||||
.title(t("backend_log.refresh"))
|
||||
.icon("bx-refresh")
|
||||
.onClick(() => this.triggerEvent("refreshData", { ntxId: this.noteContext?.ntxId }))
|
||||
}
|
||||
|
||||
isEnabled(): boolean | null | undefined {
|
||||
return super.isEnabled()
|
||||
&& this.note?.noteId === "_backendLog"
|
||||
&& this.noteContext?.viewScope?.viewMode === "default";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user