whisper.cat/weboasis/torrent/views/download.html

83 lines
3.3 KiB
HTML
Raw Normal View History

2023-10-05 23:28:32 +11: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 & Press Enter</label>
<input type="text" placeholder="magnet, hash or http(s) .torrent" ng-model="torrentInput" ng-disabled="$root.disabled" style="width: 50%"/>
</form>
</div>
<div class="row">
<label>Otherwise Upload Torrent File Below</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</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>