Linux updater: better message
This commit is contained in:
@@ -45,8 +45,6 @@ function checkForUpdates () {
|
||||
if (res.statusCode !== 200) return
|
||||
|
||||
var obj = JSON.parse(data)
|
||||
// TODO: version should be included in the response object, we shouldn'v have to parse obj.name
|
||||
var version = obj.name.slice(obj.name.lastIndexOf('v') + 1)
|
||||
windows.main.send('dispatch', 'updateAvailable', version)
|
||||
windows.main.send('dispatch', 'updateAvailable', obj.version)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -12,18 +12,13 @@ function UpdateAvailableModal (state) {
|
||||
return hx`
|
||||
<div class='update-available-modal'>
|
||||
<p><strong>A new version of WebTorrent is available: v${state.modal.version}</strong></p>
|
||||
<p>We have an auto-updater for Windows and Mac, but not yet for Linux, so you'll have to download it manually. Sorry.</p>
|
||||
<p>We have an auto-updater for Windows and Mac. We don't have one for Linux yet, so you'll have to download the new version manually.</p>
|
||||
<p>
|
||||
<button class='primary' onclick=${handleOK}>Show Download Page</button>
|
||||
<button class='cancel' onclick=${handleCancel}>Skip This Release</button>
|
||||
</p>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
||||
function handleKeyPress (e) {
|
||||
if (e.which === 13) handleOK() /* hit Enter to submit */
|
||||
}
|
||||
|
||||
function handleOK () {
|
||||
electron.shell.openExternal('https://github.com/feross/webtorrent-desktop/releases')
|
||||
@@ -34,3 +29,4 @@ function handleCancel () {
|
||||
dispatch('skipVersion', state.modal.version)
|
||||
dispatch('exitModal')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user