From 096237a9ada2786f81c54c5593293c778d74ab79 Mon Sep 17 00:00:00 2001 From: SrGooglo Date: Mon, 21 Nov 2022 12:01:46 +0000 Subject: [PATCH] added `app.clearInternalStorage` event --- packages/app/src/App.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/app/src/App.jsx b/packages/app/src/App.jsx index 2ee176f9..ebb3059b 100755 --- a/packages/app/src/App.jsx +++ b/packages/app/src/App.jsx @@ -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() },