btorrent/views/download.jade
2016-02-24 18:51:23 -03:00

69 lines
No EOL
3.5 KiB
Text

.container
div(ng-hide='$root.client.torrents.length != 0', style='vertical-align: middle; text-align: center')
.row
form.no-margin(ng-submit='addMagnet()')
label Enter magnet, hash or http(s) .torrent
input(type='text', placeholder='magnet, hash or http(s) .torrent', ng-model='torrentInput', ng-disabled='$root.disabled', style='width: 50%')
//button(ng-click='addMagnet()', ng-disabled='!torrentInput.length || $root.disabled', ng-class='{"button-primary": torrentInput.length}')
i.fa.fa-download
| Download
.row
label or...
button(type='file', ngf-select='$root.openTorrentFile($file)', ng-disabled='$root.disabled', ng-class='{"button-primary": !$root.disabled}')
i.fa.fa-folder-open
| Open torrent file
.div(ng-if="selectedTorrent", style="text-align: center")
.four.columns(style='overflow: auto')
h4 Information
table.u-full-width
tbody
tr
td Name
td {{$root.selectedTorrent.name}}
tr
td Size
td {{$root.selectedTorrent.length | pbytes}}
tr
td Completed
td {{$root.selectedTorrent.progress | progress}} ({{$root.selectedTorrent.downloaded | pbytes}})
tr
td Peers
td {{$root.selectedTorrent.numPeers}}
tr
td ↓ Speed
td {{$root.selectedTorrent.downloadSpeed | pbytes:1}}
tr
td ETA
td {{$root.selectedTorrent.timeRemaining | humanTime}}
.four.columns
h4 Files
table.u-full-width(style="margin: auto")
thead
tr
th Name
th Size
th Priority
tbody
tr.files(ng-repeat='file in $root.selectedTorrent.files')
td(ng-hide='file.done') {{file.name}}
td(ng-show='file.done')
a(ng-href='{{file.url}}', download='{{file.name}}', target='_self', ng-show='file.done') {{file.name}}
td {{file.length | pbytes}}
td
select.no-margin(name='{{file.name}}Priority', ng-model='file.priority', ng-init='file.priority = "0"', ng-change='$root.changePriority(file)')
option(value='1') High Priority
option(value='0' selected='') Low Priority
option(value='-1') Don't download
h5 ↑ Click a file to download it
.four.columns
h4 Share
ul(style="text-align: justify")
li
a(ng-href='#{{$root.selectedTorrent.infoHash}}', target='_blank') βTorrent
li
a(ng-href='{{$root.selectedTorrent.magnetURI}}', target='_blank') Magnet URI
li
a(ng-href='{{$root.selectedTorrent.safeTorrentFileURL}}', target='_self', download='{{$root.selectedTorrent.fileName}}') .torrent
li
strong Hash:
| {{$root.selectedTorrent.infoHash}}