mirror of
https://github.com/leoherzog/TorrentParts.git
synced 2026-01-23 19:58:03 -08:00
Add "Open in Torrent Client" Button
This commit is contained in:
@@ -62552,10 +62552,13 @@ var removeWebseeds = document.getElementById('removeWebseeds');
|
||||
var pieces = document.getElementById('pieces');
|
||||
var files = document.getElementById('filesBody');
|
||||
var getFiles = document.getElementById('getFiles');
|
||||
var openURLWrapper = document.getElementById('openURLWrapper');
|
||||
var openURL = document.getElementById('openURL');
|
||||
var copyURL = document.getElementById('copyURL');
|
||||
var copyMagnet = document.getElementById('copyMagnet');
|
||||
var downloadTorrentWrapper = document.getElementById('downloadTorrentWrapper');
|
||||
var downloadTorrent = document.getElementById('downloadTorrent');
|
||||
var openURLTooltip = tippy(openURL, {"theme": "torrent-parts", "animation": "shift-away-subtle", "content": "Open this Magnet URL in your Torrent client"});
|
||||
var copyURLTooltip = tippy(copyURL, {"theme": "torrent-parts", "animation": "shift-away-subtle", "content": "Copy torrent.parts link to clipboard"});
|
||||
var copyMagnetTooltip = tippy(copyMagnet, {"theme": "torrent-parts", "animation": "shift-away-subtle", "content": "Copy Magnet link to clipboard"});
|
||||
var downloadTorrentTooltip = tippy(downloadTorrentWrapper, {"theme": "torrent-parts", "animation": "shift-away-subtle", "content": "Download Torrent file"});
|
||||
@@ -62585,10 +62588,12 @@ var notyf = new Notyf({
|
||||
|
||||
function placeDownloadTooltips(e) {
|
||||
if (window.innerWidth > 1080) {
|
||||
openURLTooltip.setProps({"placement": "right"});
|
||||
copyURLTooltip.setProps({"placement": "right"});
|
||||
copyMagnetTooltip.setProps({"placement": "right"});
|
||||
downloadTorrentTooltip.setProps({"placement": "right"});
|
||||
} else {
|
||||
openURLTooltip.setProps({"placement": "top"});
|
||||
copyURLTooltip.setProps({"placement": "top"});
|
||||
copyMagnetTooltip.setProps({"placement": "top"});
|
||||
downloadTorrentTooltip.setProps({"placement": "top"});
|
||||
@@ -62841,6 +62846,7 @@ function display() {
|
||||
files.appendChild(createFileRow('', '...and another ' + (parsed.files.length - 100) + ' more files', ''));
|
||||
}
|
||||
files.appendChild(createFileRow('folder-tree', '', parsed.length));
|
||||
openURLWrapper.href = parser.toMagnetURI(parsed);
|
||||
downloadTorrentTooltip.setContent('Download Torrent file');
|
||||
downloadTorrent.addEventListener('click', saveTorrent);
|
||||
downloadTorrent.disabled = false;
|
||||
|
||||
2
bin/bundle.min.js
vendored
2
bin/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
projectName: 'C:\Users\Leo\Desktop\TorrentPartsFASubset'
|
||||
version: 6.1.2
|
||||
version: 6.2.1
|
||||
icons:
|
||||
- magnet:
|
||||
- light
|
||||
@@ -13,11 +13,12 @@ icons:
|
||||
- solid
|
||||
- link:
|
||||
- light
|
||||
- duotone
|
||||
- share-nodes:
|
||||
- solid
|
||||
- duotone
|
||||
- file-arrow-down:
|
||||
- solid
|
||||
- arrow-up-right-from-square:
|
||||
- solid
|
||||
- file:
|
||||
- regular
|
||||
- file-word:
|
||||
|
||||
6
ext/fa.min.js
vendored
6
ext/fa.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -82,9 +82,14 @@
|
||||
</button>
|
||||
|
||||
<div id="share">
|
||||
<a id="openURLWrapper" target="_blank">
|
||||
<button id="openURL" aria-label="Open this Magnet URL in your Torrent client">
|
||||
<span class="fas fa-arrow-up-right-from-square fa-2x"></span>
|
||||
</button>
|
||||
</a>
|
||||
<div>
|
||||
<button id="copyURL" aria-label="Copy this torrent.parts link to the clipboard">
|
||||
<span class="fas fa-share-alt fa-2x" data-fa-transform="left-1"></span>
|
||||
<span class="fas fa-link fa-2x"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -30,10 +30,13 @@ var removeWebseeds = document.getElementById('removeWebseeds');
|
||||
var pieces = document.getElementById('pieces');
|
||||
var files = document.getElementById('filesBody');
|
||||
var getFiles = document.getElementById('getFiles');
|
||||
var openURLWrapper = document.getElementById('openURLWrapper');
|
||||
var openURL = document.getElementById('openURL');
|
||||
var copyURL = document.getElementById('copyURL');
|
||||
var copyMagnet = document.getElementById('copyMagnet');
|
||||
var downloadTorrentWrapper = document.getElementById('downloadTorrentWrapper');
|
||||
var downloadTorrent = document.getElementById('downloadTorrent');
|
||||
var openURLTooltip = tippy(openURL, {"theme": "torrent-parts", "animation": "shift-away-subtle", "content": "Open this Magnet URL in your Torrent client"});
|
||||
var copyURLTooltip = tippy(copyURL, {"theme": "torrent-parts", "animation": "shift-away-subtle", "content": "Copy torrent.parts link to clipboard"});
|
||||
var copyMagnetTooltip = tippy(copyMagnet, {"theme": "torrent-parts", "animation": "shift-away-subtle", "content": "Copy Magnet link to clipboard"});
|
||||
var downloadTorrentTooltip = tippy(downloadTorrentWrapper, {"theme": "torrent-parts", "animation": "shift-away-subtle", "content": "Download Torrent file"});
|
||||
@@ -63,10 +66,12 @@ var notyf = new Notyf({
|
||||
|
||||
function placeDownloadTooltips(e) {
|
||||
if (window.innerWidth > 1080) {
|
||||
openURLTooltip.setProps({"placement": "right"});
|
||||
copyURLTooltip.setProps({"placement": "right"});
|
||||
copyMagnetTooltip.setProps({"placement": "right"});
|
||||
downloadTorrentTooltip.setProps({"placement": "right"});
|
||||
} else {
|
||||
openURLTooltip.setProps({"placement": "top"});
|
||||
copyURLTooltip.setProps({"placement": "top"});
|
||||
copyMagnetTooltip.setProps({"placement": "top"});
|
||||
downloadTorrentTooltip.setProps({"placement": "top"});
|
||||
@@ -319,6 +324,7 @@ function display() {
|
||||
files.appendChild(createFileRow('', '...and another ' + (parsed.files.length - 100) + ' more files', ''));
|
||||
}
|
||||
files.appendChild(createFileRow('folder-tree', '', parsed.length));
|
||||
openURLWrapper.href = parser.toMagnetURI(parsed);
|
||||
downloadTorrentTooltip.setContent('Download Torrent file');
|
||||
downloadTorrent.addEventListener('click', saveTorrent);
|
||||
downloadTorrent.disabled = false;
|
||||
|
||||
@@ -251,7 +251,7 @@ label[for="torrent"] {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#share > div > button {
|
||||
#share > * > button {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border-radius: 50%;
|
||||
|
||||
Reference in New Issue
Block a user