btorrent/views/download.html

88 lines
3.5 KiB
HTML
Raw Permalink Normal View History

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