1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00
This commit is contained in:
Andrew Simachev 2021-04-16 10:53:13 +03:00
parent 49e87c68c4
commit f762846e69

View file

@ -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);
};