1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-31 02:22:32 +00:00
This commit is contained in:
Dick Choi
2016-08-14 01:34:32 +09:00
parent 6bb78d3216
commit 2cbe07b373
34 changed files with 1482 additions and 765 deletions

View File

@@ -27,7 +27,6 @@
position absolute
right 60px
height 24px
width 125px
border-width 0 0 0 1px
border-style solid
border-color $ui-borderColor

View File

@@ -15,13 +15,17 @@ class StatusBar extends React.Component {
super(props)
this.state = {
updateAvailable: false
updateReady: false
}
}
componentDidMount () {
ipc.on('update-available', function (message) {
this.setState({updateAvailable: true})
ipc.on('update-ready', function (message) {
this.setState({
updateReady: true
}, () => {
this.updateApp()
})
}.bind(this))
}
@@ -34,7 +38,7 @@ class StatusBar extends React.Component {
})
if (index === 0) {
ipc.send('update-app', 'Deal with it.')
remote.getCurrentWindow().webContents.send('update-app')
}
}
@@ -68,9 +72,9 @@ class StatusBar extends React.Component {
styleName='root'
>
<div styleName='pathname'>{location.pathname + location.search}</div>
{this.state.updateAvailable
{this.state.updateReady
? <button onClick={this.updateApp} styleName='update'>
<i styleName='update-icon' className='fa fa-cloud-download'/> Update is available!
<i styleName='update-icon' className='fa fa-cloud-download'/> Update is ready!
</button>
: null
}