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