added app.clearInternalStorage event

This commit is contained in:
SrGooglo 2022-11-21 12:01:46 +00:00
parent 53b5b37a26
commit 096237a9ad

View File

@ -58,6 +58,7 @@ import { Translation } from "react-i18next"
import { Session, User } from "models"
import config from "config"
import * as Utils from "./utils"
import { NotFound, RenderError, Crash, Settings, Navigation, Login, UserRegister, Creator, Searcher, NotificationsCenter } from "components"
import { DOMWindow } from "components/RenderWindow"
@ -165,6 +166,15 @@ class App extends React.Component {
})
}
},
"app.clearInternalStorage": async () => {
antd.Modal.confirm({
title: "Clear internal storage",
content: "Are you sure you want to clear all internal storage? This will remove all your data from the app, including your session.",
onOk: async () => {
Utils.deleteInternalStorage()
}
})
},
"session.logout": async () => {
await this.sessionController.logout()
},