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' projectName: 'C:\Users\Leo\Desktop\TorrentPartsFASubset'
version: 6.1.2 version: 6.2.1
icons: icons:
- magnet: - magnet:
- light - light
@@ -13,11 +13,12 @@ icons:
- solid - solid
- link: - link:
- light - light
- duotone
- share-nodes:
- solid - solid
- duotone
- file-arrow-down: - file-arrow-down:
- solid - solid
- arrow-up-right-from-square:
- solid
- file: - file:
- regular - regular
- file-word: - 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> </button>
<div id="share"> <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> <div>
<button id="copyURL" aria-label="Copy this torrent.parts link to the clipboard"> <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> </button>
</div> </div>
<div> <div>

View File

@@ -30,10 +30,13 @@ var removeWebseeds = document.getElementById('removeWebseeds');
var pieces = document.getElementById('pieces'); var pieces = document.getElementById('pieces');
var files = document.getElementById('filesBody'); var files = document.getElementById('filesBody');
var getFiles = document.getElementById('getFiles'); var getFiles = document.getElementById('getFiles');
var openURLWrapper = document.getElementById('openURLWrapper');
var openURL = document.getElementById('openURL');
var copyURL = document.getElementById('copyURL'); var copyURL = document.getElementById('copyURL');
var copyMagnet = document.getElementById('copyMagnet'); var copyMagnet = document.getElementById('copyMagnet');
var downloadTorrentWrapper = document.getElementById('downloadTorrentWrapper'); var downloadTorrentWrapper = document.getElementById('downloadTorrentWrapper');
var downloadTorrent = document.getElementById('downloadTorrent'); 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 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 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"}); 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) { function placeDownloadTooltips(e) {
if (window.innerWidth > 1080) { if (window.innerWidth > 1080) {
openURLTooltip.setProps({"placement": "right"});
copyURLTooltip.setProps({"placement": "right"}); copyURLTooltip.setProps({"placement": "right"});
copyMagnetTooltip.setProps({"placement": "right"}); copyMagnetTooltip.setProps({"placement": "right"});
downloadTorrentTooltip.setProps({"placement": "right"}); downloadTorrentTooltip.setProps({"placement": "right"});
} else { } else {
openURLTooltip.setProps({"placement": "top"});
copyURLTooltip.setProps({"placement": "top"}); copyURLTooltip.setProps({"placement": "top"});
copyMagnetTooltip.setProps({"placement": "top"}); copyMagnetTooltip.setProps({"placement": "top"});
downloadTorrentTooltip.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('', '...and another ' + (parsed.files.length - 100) + ' more files', ''));
} }
files.appendChild(createFileRow('folder-tree', '', parsed.length)); files.appendChild(createFileRow('folder-tree', '', parsed.length));
openURLWrapper.href = parser.toMagnetURI(parsed);
downloadTorrentTooltip.setContent('Download Torrent file'); downloadTorrentTooltip.setContent('Download Torrent file');
downloadTorrent.addEventListener('click', saveTorrent); downloadTorrent.addEventListener('click', saveTorrent);
downloadTorrent.disabled = false; downloadTorrent.disabled = false;

View File

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