btorrent/index.jade

103 lines
No EOL
4.8 KiB
Text

doctype html
html(ng-app='BTorrent', lang='en')
head
base(href='')
meta(charset='UTF-8')
title βTorrent: Browser WebTorrent Client
meta(name='description', content='βTorrent is the first fully-featured Browser WebTorrent Client')
meta(name='keywords', content='βTorrent, btorrent, client, webtorrent, browser, torrent, stream, bittorrent, torrenting, sharing, filesharing')
meta(name='author', content='Diego Rodríguez Baquero - DiegoRBaquero')
meta(name='viewport', content='width=device-width, initial-scale=1')
script(src='https://cdn.jsdelivr.net/g/webtorrent@0.69,momentjs@2.10,angularjs@1.4,angular.ui-grid@3.0,angular.ng-notify@0.7,angular.file-upload@10.1')
link(rel='stylesheet', href='https://cdn.jsdelivr.net/g/normalize@3.0,skeleton@2.0,angular.ng-notify@0.7(ng-notify.min.css)')
link(rel='stylesheet', href='https://cdn.jsdelivr.net/fontawesome/4.5/css/font-awesome.min.css')
link(rel='stylesheet', href='https://cdn.jsdelivr.net/angular.ui-grid/3.0.7/ui-grid.min.css')
link(rel='stylesheet', href='style.css')
body(ng-controller='BTorrentCtrl', ng-cloak='')
header
h1
| βTorrent
span.version v0.11.0
.container
.row
.four.columns
input.u-full-width(type='text', placeholder='magnet link or hash', ng-model='torrentInput', ng-disabled='disabled')
.two.columns.download-button
button(ng-click='addMagnet()', ng-disabled='!torrentInput.length || disabled', ng-class='{"button-primary": torrentInput.length}')
i.fa.fa-download
| Download
.three.columns
button(type='file', ngf-select='openTorrentFile($file)', ng-disabled='disabled', ng-class='{"button-primary": !disabled}')
i.fa.fa-folder-open
| Open torrent file
.three.columns.u-pull-right
button.u-pull-right(ngf-select='seedFiles($files)', multiple='', ng-disabled='disabled', ng-class='{"button-primary": !disabled}')
i.fa.fa-upload
| Seed files
.row.grid(ui-grid='gridOptions', ui-grid-resize-columns, ui-grid-selection)
.row(ng-if="selectedTorrent")
.six.columns(style='overflow: auto')
h5 {{selectedTorrent.name}}
button(ng-if='!selectedTorrent.swarm.paused', ng-click='selectedTorrent.pause()')
i.fa.fa-pause
| Pause
|
button(ng-if='selectedTorrent.swarm.paused', ng-click='selectedTorrent.resume()')
i.fa.fa-play
| Resume
|
button.button-danger(ng-click='client.remove(selectedTorrent.infoHash, destroyedTorrent)')
i.fa.fa-times
| Remove
h6 Share
ul
li
a(ng-href='#{{selectedTorrent.infoHash}}', target='_blank') βTorrent
li
a(ng-href='{{selectedTorrent.magnetURI}}', target='_blank') Magnet URI
li
a(ng-href='{{selectedTorrent.safeTorrentFileURL}}', target='_self', download='{{selectedTorrent.fileName}}') .torrent
li
strong Hash:
| {{selectedTorrent.infoHash}}
.six.columns
h5 Files
table.u-full-width
thead
tr
th Name
th Size
th Priority
tbody
tr.files(ng-repeat='file in 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='changePriority(file)')
option(value='1') High Priority
option(value='0' selected='') Low Priority
option(value='-1') Don't download
.center
strong Client Stats:
| ↓ {{client.downloadSpeed() | pbytes}}/s ·
| ↑ {{client.uploadSpeed() | pbytes}}/s ·
| Ratio: {{client.ratio | number:2}}
footer
a.button(href="https://github.com/DiegoRBaquero/BTorrent/issues", target="_blank")
i.fa.fa-github
| Suggest a feature / Report a bug
i.fa.fa-comment
br
| An Open-Source project by
a(href='http://diegorbaquero.com') DiegoRBaquero
br
| Powered by
a(href='https://webtorrent.io') WebTorrent
br
small Need WebRTC + Web Seeding for your WebTorrent powered site? Contact
a(href='http://diegorbaquero.com') me
.spinner(ng-show="client.processing")
i.fa.fa-spinner.fa-spin.spinner-icon
script(src='app.js')