Disable alerts on logout
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 = "/"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user