Also clean up the Create Torrent page, delete some redundant CSS, prevent click-and-drag inside a TextField from moving the whole window, and make all label and input fonts a consistent 14px size.
36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
const React = require('react')
|
|
const electron = require('electron')
|
|
|
|
const ModalOKCancel = require('./modal-ok-cancel')
|
|
const {dispatch} = require('../lib/dispatcher')
|
|
|
|
module.exports = class UpdateAvailableModal extends React.Component {
|
|
render () {
|
|
const state = this.props.state
|
|
return (
|
|
<div className='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.
|
|
We don't have one for Linux yet, so you'll have to download the new version manually.
|
|
</p>
|
|
<ModalOKCancel
|
|
cancelText='SKIP THIS RELEASE'
|
|
onCancel={handleSkip}
|
|
okText='SHOW DOWNLOAD PAGE'
|
|
onOK={handleShow} />
|
|
</div>
|
|
)
|
|
|
|
function handleShow () {
|
|
electron.shell.openExternal('https://github.com/feross/webtorrent-desktop/releases')
|
|
dispatch('exitModal')
|
|
}
|
|
|
|
function handleSkip () {
|
|
dispatch('skipVersion', state.modal.version)
|
|
dispatch('exitModal')
|
|
}
|
|
}
|
|
}
|