mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-31 02:22:32 +00:00
Finder
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user