Merge pull request #636 from mathiasvr/modals
fix modal inconsistencies
This commit is contained in:
@@ -170,7 +170,6 @@ function dispatch (action, ...args) {
|
||||
}
|
||||
if (action === 'openTorrentAddress') {
|
||||
state.modal = { id: 'open-torrent-address-modal' }
|
||||
update()
|
||||
}
|
||||
if (action === 'createTorrent') {
|
||||
createTorrent(args[0] /* options */)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports = OpenTorrentAddressModal
|
||||
|
||||
var {dispatch} = require('../lib/dispatcher')
|
||||
var {dispatch, dispatcher} = require('../lib/dispatcher')
|
||||
var hx = require('../lib/hx')
|
||||
|
||||
function OpenTorrentAddressModal (state) {
|
||||
@@ -11,8 +11,8 @@ function OpenTorrentAddressModal (state) {
|
||||
<input id='add-torrent-url' type='text' onkeypress=${handleKeyPress} />
|
||||
</p>
|
||||
<p class='float-right'>
|
||||
<button class='button button-flat' onclick=${handleCancel}>CANCEL</button>
|
||||
<button class='button button-raised' onclick=${handleOK}>OK</button>
|
||||
<button class='button button-flat' onclick=${dispatcher('exitModal')}>Cancel</button>
|
||||
<button class='button button-raised' onclick=${handleOK}>OK</button>
|
||||
</p>
|
||||
<script>document.querySelector('#add-torrent-url').focus()</script>
|
||||
</div>
|
||||
@@ -27,7 +27,3 @@ function handleOK () {
|
||||
dispatch('exitModal')
|
||||
dispatch('addTorrent', document.querySelector('#add-torrent-url').value)
|
||||
}
|
||||
|
||||
function handleCancel () {
|
||||
dispatch('exitModal')
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ function UpdateAvailableModal (state) {
|
||||
<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>
|
||||
<p>
|
||||
<button class='primary' onclick=${handleOK}>Show Download Page</button>
|
||||
<button class='cancel' onclick=${handleCancel}>Skip This Release</button>
|
||||
<button class='button button-raised' onclick=${handleOK}>Show Download Page</button>
|
||||
<button class='button button-flat' onclick=${handleCancel}>Skip This Release</button>
|
||||
</p>
|
||||
</div>
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user