mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 14:07:01 +09:00
JS-5542: electron menu update
This commit is contained in:
parent
21ba22ecaf
commit
3ac5820977
2 changed files with 9 additions and 15 deletions
|
@ -58,8 +58,8 @@ class MenuManager {
|
|||
|
||||
Separator,
|
||||
|
||||
{ label: Util.translate('electronMenuImport'), click: () => this.openSettings('importIndex', { data: { isSpace: true }, className: 'isSpace' }) },
|
||||
{ label: Util.translate('electronMenuExport'), click: () => this.openSettings('exportIndex', { data: { isSpace: true }, className: 'isSpace' }) },
|
||||
{ label: Util.translate('electronMenuImport'), click: () => this.openSettings('importIndex') },
|
||||
{ label: Util.translate('electronMenuExport'), click: () => this.openSettings('exportIndex') },
|
||||
{ label: Util.translate('electronMenuSaveAs'), click: () => Util.send(this.win, 'commandGlobal', 'save') },
|
||||
|
||||
Separator,
|
||||
|
@ -408,7 +408,7 @@ class MenuManager {
|
|||
{
|
||||
label: Util.translate('electronMenuSpaceSettings'), click: () => {
|
||||
this.winShow();
|
||||
this.openSettings('spaceIndex', { data: { isSpace: true }, className: 'isSpace' });
|
||||
this.openSettings('spaceIndex');
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -417,13 +417,13 @@ class MenuManager {
|
|||
{
|
||||
label: Util.translate('electronMenuImport'), click: () => {
|
||||
this.winShow();
|
||||
this.openSettings('importIndex', { data: { isSpace: true }, className: 'isSpace' });
|
||||
this.openSettings('importIndex');
|
||||
}
|
||||
},
|
||||
{
|
||||
label: Util.translate('electronMenuExport'), click: () => {
|
||||
this.winShow();
|
||||
this.openSettings('exportIndex', { data: { isSpace: true }, className: 'isSpace' });
|
||||
this.openSettings('exportIndex');
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -456,17 +456,11 @@ class MenuManager {
|
|||
].filter(it => it);
|
||||
};
|
||||
|
||||
openSettings (page, param) {
|
||||
param = param || {};
|
||||
param.data = param.data || {};
|
||||
|
||||
openSettings (page) {
|
||||
const Api = require('./api.js');
|
||||
|
||||
if (Api.isPinChecked) {
|
||||
const popupParam = Object.assign({}, param);
|
||||
popupParam.data = Object.assign({ page }, param.data);
|
||||
|
||||
Util.send(this.win, 'popup', 'settings', popupParam, true);
|
||||
Util.send(this.win, 'route', '/main/settings/' + page);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue