Newer
Older
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
/**
* Handle all asynchronous messages from renderer to main.
*/
export default async (fetherApp, event, action, ...args) => {
Luke Schoen
committed
return;
}
const [width] = fetherApp.win.getContentSize();
Luke Schoen
committed
// Conversion to integer is required to pass as argument to setContentSize.
// Reference: https://electronjs.org/docs/all#winsetcontentsizewidth-height-animate
const newHeight = parseInt(args[0]);
fetherApp.win.setContentSize(width, Math.round(newHeight) + 2);
break;
}
case 'app-right-click': {
if (!fetherApp.win) {
return;
}
Luke Schoen
committed
fetherApp.contextWindowMenu.getMenu().popup({ window: fetherApp.win });
case 'check-clock-sync': {
checkClockSync().then(t => {
event.sender.send('check-clock-sync-reply', t);
case 'signer-new-token': {
const token = await signerNewToken();
// Send back the token to the renderer process
event.sender.send('signer-new-token-reply', token);