mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 18:39:22 +08:00
fix(build): build errors
This commit is contained in:
parent
dafebc4aae
commit
c1ea1fd608
@ -1,4 +1,4 @@
|
||||
import AbstractButtonWidget, { AbstractButtonWidgetSettings, type AuxClickHandler, type ClickHandler } from "./abstract_button.js";
|
||||
import AbstractButtonWidget, { AbstractButtonWidgetSettings } from "./abstract_button.js";
|
||||
import { t } from "../../services/i18n.js";
|
||||
|
||||
export type ClickHandler = (widget: OnClickButtonWidget, e: JQuery.ClickEvent<any, any, any, any>) => void;
|
||||
|
@ -12,6 +12,7 @@ import TodayLauncher from "../buttons/launcher/today_launcher.js";
|
||||
import HistoryNavigationButton from "../buttons/history_navigation.js";
|
||||
import QuickSearchLauncherWidget from "../quick_search_launcher.js";
|
||||
import FNote from "../../entities/fnote.js";
|
||||
import { CommandNames } from "../../components/app_context.js";
|
||||
|
||||
interface InnerWidget extends BasicWidget {
|
||||
settings?: {
|
||||
@ -88,7 +89,7 @@ export default class LauncherWidget extends BasicWidget {
|
||||
return new CommandButtonWidget()
|
||||
.title(() => note.title)
|
||||
.icon(() => note.getIcon())
|
||||
.command(() => note.getLabelValue("command"));
|
||||
.command(() => note.getLabelValue("command") as CommandNames);
|
||||
}
|
||||
|
||||
async initCustomWidget(note: FNote) {
|
||||
|
@ -11,7 +11,7 @@ class NoteContextAwareWidget extends BasicWidget {
|
||||
|
||||
protected noteContext?: NoteContext;
|
||||
|
||||
isNoteContext(ntxId: string) {
|
||||
isNoteContext(ntxId: string | null | undefined) {
|
||||
if (Array.isArray(ntxId)) {
|
||||
return this.noteContext && ntxId.includes(this.noteContext.ntxId);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ export default class OptionsWidget extends NoteContextAwareWidget
|
||||
}
|
||||
}
|
||||
|
||||
async refreshWithNote(note: FNote) {
|
||||
async refreshWithNote(note: FNote | null | undefined) {
|
||||
const options = await server.get<OptionMap>('options');
|
||||
|
||||
if (options) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user