diff --git a/VoidCat/spa/src/Pages/FilePreview.js b/VoidCat/spa/src/Pages/FilePreview.js index c9bf295..6a4291f 100644 --- a/VoidCat/spa/src/Pages/FilePreview.js +++ b/VoidCat/spa/src/Pages/FilePreview.js @@ -44,7 +44,7 @@ export function FilePreview() { function isPaymentRequired() { return info?.payment?.required === true && !order; } - + function canAccessFile() { if (isPaymentRequired()) { return false; @@ -82,11 +82,11 @@ export function FilePreview() { return new window.TransformStream({ transform: (chunk, controller) => { update(chunk.length); - controller.enqueue(chunk); + controller.enqueue(chunk); } }); } - + function renderEncryptedDownload() { if (!isFileEncrypted() || isDecrypted() || isPaymentRequired()) return; return ( @@ -214,7 +214,7 @@ export function FilePreview() { if (info) { let fileLink = info.metadata?.url ?? `${ApiHost}/d/${info.id}`; setFileSize(info.metadata.size); - + let order = window.localStorage.getItem(`payment-${info.id}`); if (order) { let orderObj = JSON.parse(order); @@ -242,9 +242,24 @@ export function FilePreview() { {info.uploader ? : null}
- {canAccessFile() ? - Download : null} + {canAccessFile() && + <> + + + + Magnet + + + + Torrent + + + + Direct Download + + }
{renderPayment()} diff --git a/VoidCat/spa/src/index.css b/VoidCat/spa/src/index.css index d048818..9e93806 100644 --- a/VoidCat/spa/src/index.css +++ b/VoidCat/spa/src/index.css @@ -97,4 +97,8 @@ pre.copy { border-radius: 4px; border: 1px solid; padding: 5px; +} + +.mr10 { + margin-right: 10px; } \ No newline at end of file