This commit is contained in:
crusader 2018-09-19 19:48:48 +09:00
parent 6845e1653e
commit 4bfb51926a
4 changed files with 12 additions and 11 deletions

View File

@ -10,7 +10,6 @@ import { ConfirmationService } from 'primeng/primeng';
import { Zone, Host, Port, Service, DiscoverHost } from '@overflow/model/discovery'; import { Zone, Host, Port, Service, DiscoverHost } from '@overflow/model/discovery';
import { RPCSubscriber } from '@overflow/commons/ui/decorator/RPCSubscriber'; import { RPCSubscriber } from '@overflow/commons/ui/decorator/RPCSubscriber';
import { TypeUtil } from '@overflow/core-js';
import { RPCError } from '@overflow/rpc-js'; import { RPCError } from '@overflow/rpc-js';
import { toMetaIPType, MetaIPTypeEnum, toMetaCryptoType, MetaCryptoTypeEnum, toMetaPortType, MetaPortTypeEnum } from '@overflow/model/meta'; import { toMetaIPType, MetaIPTypeEnum, toMetaCryptoType, MetaCryptoTypeEnum, toMetaPortType, MetaPortTypeEnum } from '@overflow/model/meta';
import { DiscoveryModeType } from '@overflow/model/discovery/discovery'; import { DiscoveryModeType } from '@overflow/model/discovery/discovery';

View File

@ -22,7 +22,9 @@ export class ElectronProxyService {
private bindIpcEventHandlers(): void { private bindIpcEventHandlers(): void {
ipcRenderer.on( ipcRenderer.on(
'menu-event', 'menu-event',
(event: Electron.IpcMessageEvent, { name }: { name: MenuEvent }) => {} (event: Electron.IpcMessageEvent, { name }: { name: MenuEvent }) => {
console.log(`menu: ${name}`);
}
); );
ipcRenderer.on( ipcRenderer.on(

View File

@ -2,9 +2,9 @@ export type MenuEvent =
| 'save' | 'save'
| 'show-preferences' | 'show-preferences'
| 'show-about' | 'show-about'
| 'export-csv' | 'show-export-csv'
| 'print' | 'show-print'
| 'language-english' | 'change-language-english'
| 'language-korean' | 'change-language-korean'
; ;

View File

@ -58,7 +58,7 @@ export function buildDefaultMenu(
{ {
label: __DARWIN__ ? 'CSV…' : 'CSV…', label: __DARWIN__ ? 'CSV…' : 'CSV…',
id: 'export-csv', id: 'export-csv',
click: emit('export-csv'), click: emit('show-export-csv'),
}, },
], ],
}, },
@ -66,7 +66,7 @@ export function buildDefaultMenu(
{ {
label: __DARWIN__ ? 'Print…' : 'Print…', label: __DARWIN__ ? 'Print…' : 'Print…',
id: 'print', id: 'print',
click: emit('print'), click: emit('show-print'),
}, },
], ],
}; };
@ -157,12 +157,12 @@ export function buildDefaultMenu(
{ {
label: __DARWIN__ ? 'English…' : 'English…', label: __DARWIN__ ? 'English…' : 'English…',
id: 'language-english', id: 'language-english',
click: emit('language-english'), click: emit('change-language-english'),
}, },
{ {
label: __DARWIN__ ? 'Korean…' : 'Korean…', label: __DARWIN__ ? 'Korean…' : 'Korean…',
id: 'language-korean', id: 'language-korean',
click: emit('language-korean'), click: emit('change-language-korean'),
}, },
], ],
}, },