From 2e921311074f95e49976070bba2d337d6f56f73a Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Sun, 9 Jul 2023 17:28:12 +0800 Subject: [PATCH] feat: add menu bar item to clear data --- src/main/mainWindow.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index 65f2c46..3c6aa2a 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -123,6 +123,17 @@ function initMenuBar(win: BrowserWindow) { }, toolTip: "Vencord Desktop will automatically restart after this operation" }, + { + label: "Clear data", + async click() { + await win.webContents.session.clearStorageData(); + await win.webContents.session.clearCache(); + await win.webContents.session.clearCodeCaches({}); + app.relaunch(); + app.quit(); + }, + toolTip: "Vencord Desktop will automatically restart after this operation" + }, { label: "Relaunch", accelerator: "CmdOrCtrl+Shift+R",