Skip to content

Commit

Permalink
feat: add 'close station' on start screen
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Dec 17, 2017
1 parent dd3b109 commit 565da11
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down
11 changes: 11 additions & 0 deletions src/js/screens/menu/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -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%',
Expand Down Expand Up @@ -47,6 +57,7 @@ export default function StartScreen () {
</div>
</div>
<TextButton text='Start Node' onClick={startDaemon} />
<a style={styles.a} onClick={close}>Close Station</a>
</div>
)
}

0 comments on commit 565da11

Please sign in to comment.