mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
sudo
This commit is contained in:
parent
49e87c68c4
commit
f762846e69
1 changed files with 16 additions and 1 deletions
17
electron.js
17
electron.js
|
@ -330,7 +330,7 @@ function createWindow () {
|
|||
};
|
||||
});
|
||||
|
||||
storage.get('config', (error, data) => {
|
||||
storage.get('devconfig', (error, data) => {
|
||||
config = data || {};
|
||||
config.channel = String(config.channel || defaultChannel);
|
||||
|
||||
|
@ -539,6 +539,21 @@ function menuInit () {
|
|||
});
|
||||
};
|
||||
|
||||
if (config.sudo) {
|
||||
menuParam.push({
|
||||
label: 'Sudo',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Dataview', type: 'checkbox', checked: config.allowDataview,
|
||||
click: () => {
|
||||
setConfig({ allowDataview: !config.allowDataview });
|
||||
win.reload();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
menu = Menu.buildFromTemplate(menuParam);
|
||||
Menu.setApplicationMenu(menu);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue