mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-12 12:04:16 +00:00
added app.clearInternalStorage
event
This commit is contained in:
parent
53b5b37a26
commit
096237a9ad
@ -58,6 +58,7 @@ import { Translation } from "react-i18next"
|
|||||||
|
|
||||||
import { Session, User } from "models"
|
import { Session, User } from "models"
|
||||||
import config from "config"
|
import config from "config"
|
||||||
|
import * as Utils from "./utils"
|
||||||
|
|
||||||
import { NotFound, RenderError, Crash, Settings, Navigation, Login, UserRegister, Creator, Searcher, NotificationsCenter } from "components"
|
import { NotFound, RenderError, Crash, Settings, Navigation, Login, UserRegister, Creator, Searcher, NotificationsCenter } from "components"
|
||||||
import { DOMWindow } from "components/RenderWindow"
|
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 () => {
|
"session.logout": async () => {
|
||||||
await this.sessionController.logout()
|
await this.sessionController.logout()
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user