Newer
Older
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
/**
* Handle all asynchronous messages from renderer to main.
*/
Luke Schoen
committed
export default async (fetherAppWindow, event, action, ...args) => {
Luke Schoen
committed
const [width] = fetherAppWindow.getContentSize();
Luke Schoen
committed
const feedbackButtonHeight = 20;
const resizeHeight = newHeight + 2;
const height =
process.platform === 'win32' && fetherAppWindow.isMenuBarVisible()
? resizeHeight + feedbackButtonHeight
: resizeHeight;
fetherAppWindow.setContentSize(width, height);
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);