1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

move new window under sudo

This commit is contained in:
Andrew Simachev 2022-07-11 19:49:17 +03:00
parent 544d17c3a6
commit cc22d3389c
2 changed files with 15 additions and 3 deletions

View file

@ -4,9 +4,6 @@ const { is, fixPathForAsarUnpack } = require('electron-util');
const path = require('path');
const os = require('os');
const storage = require('electron-json-storage');
const fs = require('fs');
const readChunk = require('read-chunk');
const fileType = require('file-type');
const port = process.env.SERVER_PORT;
const protocol = 'anytype';
const remote = require('@electron/remote/main');

View file

@ -56,12 +56,14 @@ class MenuManager {
{
role: 'fileMenu',
submenu: [
/*
{
label: 'New window', accelerator: 'CmdOrCtrl+Shift+N',
click: () => { WindowManager.createMain({ isChild: true }); }
},
Separator,
*/
{ label: 'Show work directory', click: () => { shell.openPath(app.getPath('userData')); } },
{
@ -211,6 +213,13 @@ class MenuManager {
const menuSudo = {
label: 'Sudo',
submenu: [
{
label: 'New window', accelerator: 'CmdOrCtrl+Shift+N',
click: () => { WindowManager.createMain({ isChild: true }); }
},
Separator,
{ label: 'Version', submenu: channels },
{
label: 'Experimental', type: 'checkbox', checked: config.experimental,
@ -219,6 +228,9 @@ class MenuManager {
this.win.reload();
}
},
Separator,
{
label: 'Export templates',
click: () => { Util.send(this.win, 'command', 'exportTemplates'); }
@ -231,6 +243,9 @@ class MenuManager {
label: 'Export localstore',
click: () => { Util.send(this.win, 'command', 'exportLocalstore'); }
},
Separator,
{
label: 'Create workspace',
click: () => { Util.send(this.win, 'commandGlobal', 'workspace'); }