From 565da11aa60673947f5a6355aff9f279e34fb364 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sun, 17 Dec 2017 13:50:37 +0000 Subject: [PATCH] feat: add 'close station' on start screen --- src/index.js | 5 ++++- src/js/screens/menu/start.js | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index c447beccb..336e2a111 100644 --- a/src/index.js +++ b/src/index.js @@ -165,7 +165,10 @@ function onWillQuit (node, event) { logger.info('Shutting down application') event.preventDefault() - if (IPFS == null) return + if (IPFS == null) { + mb.app.quit() + return + } onStopDaemon(node, mb.app.quit.bind(mb.app)) } diff --git a/src/js/screens/menu/start.js b/src/js/screens/menu/start.js index 28506ef51..6de9def95 100644 --- a/src/js/screens/menu/start.js +++ b/src/js/screens/menu/start.js @@ -7,7 +7,17 @@ function startDaemon () { ipcRenderer.send('start-daemon') } +function close () { + ipcRenderer.send('close') +} + const styles = { + a: { + fontSize: '0.8em', + margin: '1em 0 0 0', + color: 'rgba(255,255,255,0.5)', + cursor: 'pointer' + }, wrapper: { display: 'flex', width: '100%', @@ -47,6 +57,7 @@ export default function StartScreen () { + Close Station ) }