forked from GitHubMirrors/silverbullet-icalendar
Add version command
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import { system } from "@silverbulletmd/silverbullet/syscalls";
|
||||
import { editor, system } from "@silverbulletmd/silverbullet/syscalls";
|
||||
import { QueryProviderEvent } from "@silverbulletmd/silverbullet/types";
|
||||
import { applyQuery } from "@silverbulletmd/silverbullet/lib/query";
|
||||
import { parseIcsCalendar, type VCalendar } from "ts-ics";
|
||||
|
||||
const VERSION = "0.1.0";
|
||||
|
||||
// Try to match SilverBullet properties where possible.
|
||||
// Timestamps should be strings formatted with `localDateString`
|
||||
interface Event {
|
||||
@@ -119,3 +121,7 @@ export function localDateString(d: Date): string {
|
||||
":" + String(d.getSeconds()).padStart(2, "0") +
|
||||
"." + String(d.getMilliseconds()).padStart(3, "0");
|
||||
}
|
||||
|
||||
export async function showVersion() {
|
||||
await editor.flashNotification(`iCalendar Plug ${VERSION}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user