diff --git a/src/public/app/services/frontend_script_api.ts b/src/public/app/services/frontend_script_api.ts index 178b0aa59..86a793c9f 100644 --- a/src/public/app/services/frontend_script_api.ts +++ b/src/public/app/services/frontend_script_api.ts @@ -17,6 +17,7 @@ import shortcutService from "./shortcuts.js"; import dialogService from "./dialog.js"; import type FNote from "../entities/fnote.js"; import { t } from "./i18n.js"; +import dayjs from "dayjs"; import type NoteContext from "../components/note_context.js"; import type NoteDetailWidget from "../widgets/note_detail.js"; import type Component from "../components/component.js"; @@ -84,7 +85,7 @@ interface Api { * See {@link https://day.js.org} for documentation * @see https://day.js.org */ - dayjs: typeof window.dayjs; + dayjs: typeof dayjs; RightPanelWidget: typeof RightPanelWidget; NoteContextAwareWidget: typeof NoteContextAwareWidget; diff --git a/src/public/app/types.d.ts b/src/public/app/types.d.ts index 1ef429650..2a11f30e5 100644 --- a/src/public/app/types.d.ts +++ b/src/public/app/types.d.ts @@ -123,7 +123,6 @@ declare global { language: string }); }; - var dayjs: {}; var Split: (selectors: string[], config: { sizes: [ number, number ]; gutterSize: number; diff --git a/src/public/app/widgets/watched_file_update_status.js b/src/public/app/widgets/watched_file_update_status.js index 6f3ee4e3d..d73746b86 100644 --- a/src/public/app/widgets/watched_file_update_status.js +++ b/src/public/app/widgets/watched_file_update_status.js @@ -2,6 +2,7 @@ import { t } from "../services/i18n.js"; import NoteContextAwareWidget from "./note_context_aware_widget.js"; import server from "../services/server.js"; import fileWatcher from "../services/file_watcher.js"; +import dayjs from "dayjs"; const TPL = `