Disable alerts on logout

This commit is contained in:
Jon Staab
2026-01-26 10:08:43 -08:00
parent 646b8f8736
commit 9b3a8258ce
8 changed files with 52 additions and 71 deletions
+8 -2
View File
@@ -6,7 +6,8 @@
import Spinner from "@lib/components/Spinner.svelte"
import ModalHeader from "@lib/components/ModalHeader.svelte"
import ModalFooter from "@lib/components/ModalFooter.svelte"
import {logout} from "@app/core/commands"
import {Push} from "@app/util/notifications"
import {kv, db} from "@app/core/storage"
const back = () => history.back()
@@ -14,7 +15,12 @@
loading = true
try {
await logout()
await Push.disable()
await kv.clear()
await db.clear()
localStorage.clear()
window.location.href = "/"
} catch (e) {
console.error(e)
+8 -3
View File
@@ -18,9 +18,10 @@
import Spinner from "@lib/components/Spinner.svelte"
import ModalHeader from "@lib/components/ModalHeader.svelte"
import ModalFooter from "@lib/components/ModalFooter.svelte"
import {pushToast} from "@app/util/toast"
import {logout} from "@app/core/commands"
import {INDEXER_RELAYS, PLATFORM_NAME, userSpaceUrls} from "@app/core/state"
import {kv, db} from "@app/core/storage"
import {pushToast} from "@app/util/toast"
import {Push} from "@app/util/notifications"
let progress: number | undefined = $state(undefined)
let confirmText = $state("")
@@ -83,7 +84,11 @@
await sleep(2000)
// Goodbye forever!
await logout()
await Push.disable()
await kv.clear()
await db.clear()
localStorage.clear()
window.location.href = "/"
}