Files
plainleaf/plugs/editor/clean.ts
T
Zef HemelandGitHub 6b69449d05 More JSR (#1027)
* Move all syscalls to JSR-style package naming
* Eliminating some prefixes in import maps
2024-08-06 20:11:38 +02:00

15 lines
416 B
TypeScript

import { debug, editor } from "@silverbulletmd/silverbullet/syscalls";
export async function cleanCommand() {
if (
!await editor.confirm(
"This will remove all your locally cached data and authentication cookies. Are you sure?",
)
) {
return;
}
await editor.flashNotification("Now wiping all state and logging out...");
await debug.cleanup();
await editor.openUrl("/.logout", true);
}