diff --git a/src/app/pages/home/home-page.component.ts b/src/app/pages/home/home-page.component.ts index b443c34..ed8e25e 100644 --- a/src/app/pages/home/home-page.component.ts +++ b/src/app/pages/home/home-page.component.ts @@ -10,7 +10,6 @@ import { ConfirmationService } from 'primeng/primeng'; import { Zone, Host, Port, Service, DiscoverHost } from '@overflow/model/discovery'; import { RPCSubscriber } from '@overflow/commons/ui/decorator/RPCSubscriber'; -import { TypeUtil } from '@overflow/core-js'; import { RPCError } from '@overflow/rpc-js'; import { toMetaIPType, MetaIPTypeEnum, toMetaCryptoType, MetaCryptoTypeEnum, toMetaPortType, MetaPortTypeEnum } from '@overflow/model/meta'; import { DiscoveryModeType } from '@overflow/model/discovery/discovery'; diff --git a/src/commons/service/electron-proxy.service.ts b/src/commons/service/electron-proxy.service.ts index b6b19e3..20550c0 100644 --- a/src/commons/service/electron-proxy.service.ts +++ b/src/commons/service/electron-proxy.service.ts @@ -22,7 +22,9 @@ export class ElectronProxyService { private bindIpcEventHandlers(): void { ipcRenderer.on( 'menu-event', - (event: Electron.IpcMessageEvent, { name }: { name: MenuEvent }) => {} + (event: Electron.IpcMessageEvent, { name }: { name: MenuEvent }) => { + console.log(`menu: ${name}`); + } ); ipcRenderer.on( @@ -35,7 +37,7 @@ export class ElectronProxyService { this.launchService .save(state) .pipe( - map((id: number) => {}), + map((id: number) => { }), catchError(error => { return of(); }), diff --git a/src/commons/type/menu-event.ts b/src/commons/type/menu-event.ts index c98e7ed..2826672 100644 --- a/src/commons/type/menu-event.ts +++ b/src/commons/type/menu-event.ts @@ -2,9 +2,9 @@ export type MenuEvent = | 'save' | 'show-preferences' | 'show-about' - | 'export-csv' - | 'print' - | 'language-english' - | 'language-korean' + | 'show-export-csv' + | 'show-print' + | 'change-language-english' + | 'change-language-korean' ; diff --git a/src/electron/menu/build-default.ts b/src/electron/menu/build-default.ts index 755db30..da9f8d3 100644 --- a/src/electron/menu/build-default.ts +++ b/src/electron/menu/build-default.ts @@ -58,7 +58,7 @@ export function buildDefaultMenu( { label: __DARWIN__ ? 'CSV…' : 'CSV…', id: 'export-csv', - click: emit('export-csv'), + click: emit('show-export-csv'), }, ], }, @@ -66,7 +66,7 @@ export function buildDefaultMenu( { label: __DARWIN__ ? 'Print…' : 'Print…', id: 'print', - click: emit('print'), + click: emit('show-print'), }, ], }; @@ -157,12 +157,12 @@ export function buildDefaultMenu( { label: __DARWIN__ ? 'English…' : 'English…', id: 'language-english', - click: emit('language-english'), + click: emit('change-language-english'), }, { label: __DARWIN__ ? 'Korean…' : 'Korean…', id: 'language-korean', - click: emit('language-korean'), + click: emit('change-language-korean'), }, ], },