add to tray
This commit is contained in:
parent
e240342c20
commit
aa9e7cad9e
1 changed files with 31 additions and 21 deletions
|
@ -80,6 +80,12 @@ function initTray(win: BrowserWindow) {
|
|||
app.quit();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Reset app",
|
||||
async click() {
|
||||
await clearData(win);
|
||||
}
|
||||
},
|
||||
{
|
||||
type: "separator"
|
||||
},
|
||||
|
@ -113,28 +119,7 @@ function initTray(win: BrowserWindow) {
|
|||
});
|
||||
}
|
||||
|
||||
function initMenuBar(win: BrowserWindow) {
|
||||
const isWindows = process.platform === "win32";
|
||||
const isDarwin = process.platform === "darwin";
|
||||
const wantCtrlQ = !isWindows || VencordSettings.store.winCtrlQ;
|
||||
|
||||
const subMenu = [
|
||||
{
|
||||
label: "About Vencord Desktop",
|
||||
click: createAboutWindow
|
||||
},
|
||||
{
|
||||
label: "Force Update Vencord",
|
||||
async click() {
|
||||
await downloadVencordFiles();
|
||||
app.relaunch();
|
||||
app.quit();
|
||||
},
|
||||
toolTip: "Vencord Desktop will automatically restart after this operation"
|
||||
},
|
||||
{
|
||||
label: "Clear data",
|
||||
async click() {
|
||||
async function clearData(win: BrowserWindow) {
|
||||
const { response } = await dialog.showMessageBox(win, {
|
||||
message: "Are you sure you want to reset Vencord Desktop?",
|
||||
detail: "Vencord Desktop will automatically restart after this operation.",
|
||||
|
@ -155,6 +140,31 @@ function initMenuBar(win: BrowserWindow) {
|
|||
|
||||
app.relaunch();
|
||||
app.quit();
|
||||
}
|
||||
|
||||
function initMenuBar(win: BrowserWindow) {
|
||||
const isWindows = process.platform === "win32";
|
||||
const isDarwin = process.platform === "darwin";
|
||||
const wantCtrlQ = !isWindows || VencordSettings.store.winCtrlQ;
|
||||
|
||||
const subMenu = [
|
||||
{
|
||||
label: "About Vencord Desktop",
|
||||
click: createAboutWindow
|
||||
},
|
||||
{
|
||||
label: "Force Update Vencord",
|
||||
async click() {
|
||||
await downloadVencordFiles();
|
||||
app.relaunch();
|
||||
app.quit();
|
||||
},
|
||||
toolTip: "Vencord Desktop will automatically restart after this operation"
|
||||
},
|
||||
{
|
||||
label: "Reset app",
|
||||
async click() {
|
||||
await clearData(win);
|
||||
},
|
||||
toolTip: "Vencord Desktop will automatically restart after this operation"
|
||||
},
|
||||
|
|
Reference in a new issue