2 Commits
v1.2 ... v1.2.1

Author SHA1 Message Date
Leo
ddb4a7da06 Add "Open in Torrent Client" Button 2023-01-14 16:15:31 +00:00
Leo
8d81259d1a Update Dependencies 2023-01-14 15:40:59 +00:00
7 changed files with 733 additions and 932 deletions

File diff suppressed because one or more lines are too long

72
bin/bundle.min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -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

File diff suppressed because one or more lines are too long

View File

@@ -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>

View File

@@ -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;

View File

@@ -251,7 +251,7 @@ label[for="torrent"] {
flex-direction: column;
}
#share > div > button {
#share > * > button {
width: 64px;
height: 64px;
border-radius: 50%;