2024-08-07 02:11:38 +08:00
|
|
|
import { debug, editor } from "@silverbulletmd/silverbullet/syscalls";
|
2024-01-27 00:05:10 +08:00
|
|
|
|
|
|
|
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();
|
2024-06-22 18:45:23 +08:00
|
|
|
await editor.openUrl("/.logout", true);
|
2024-01-27 00:05:10 +08:00
|
|
|
}
|