mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-20 01:33:56 +00:00
feat: adding torbox integration
This commit is contained in:
BIN
src/renderer/src/assets/icons/torbox.webp
Normal file
BIN
src/renderer/src/assets/icons/torbox.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -8,6 +8,7 @@ export const DOWNLOADER_NAME = {
|
||||
[Downloader.Gofile]: "Gofile",
|
||||
[Downloader.PixelDrain]: "PixelDrain",
|
||||
[Downloader.Qiwi]: "Qiwi",
|
||||
[Downloader.TorBox]: "TorBox",
|
||||
};
|
||||
|
||||
export const MAX_MINUTES_TO_SHOW_IN_PLAYTIME = 120;
|
||||
|
||||
@@ -31,6 +31,8 @@ import {
|
||||
XCircleIcon,
|
||||
} from "@primer/octicons-react";
|
||||
|
||||
import torBoxLogo from "@renderer/assets/icons/torbox.webp";
|
||||
|
||||
export interface DownloadGroupProps {
|
||||
library: LibraryGame[];
|
||||
title: string;
|
||||
@@ -276,7 +278,28 @@ export function DownloadGroup({
|
||||
/>
|
||||
|
||||
<div className={styles.downloadCoverContent}>
|
||||
<Badge>{DOWNLOADER_NAME[game.downloader]}</Badge>
|
||||
{game.downloader === Downloader.TorBox ? (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
background: "#11141b",
|
||||
padding: `${SPACING_UNIT / 2}px ${SPACING_UNIT}px`,
|
||||
borderRadius: "4px",
|
||||
gap: 4,
|
||||
border: `1px solid ${vars.color.border}`,
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={torBoxLogo}
|
||||
alt="TorBox"
|
||||
style={{ width: 13 }}
|
||||
/>
|
||||
<span style={{ fontSize: 10 }}>TorBox</span>
|
||||
</div>
|
||||
) : (
|
||||
<Badge>{DOWNLOADER_NAME[game.downloader]}</Badge>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -68,11 +68,9 @@ export function DownloadSettingsModal({
|
||||
return true;
|
||||
});
|
||||
|
||||
/* Gives preference to Real Debrid */
|
||||
const selectedDownloader = filteredDownloaders.includes(
|
||||
Downloader.RealDebrid
|
||||
)
|
||||
? Downloader.RealDebrid
|
||||
/* Gives preference to TorBox */
|
||||
const selectedDownloader = filteredDownloaders.includes(Downloader.TorBox)
|
||||
? Downloader.TorBox
|
||||
: filteredDownloaders[0];
|
||||
|
||||
setSelectedDownloader(
|
||||
|
||||
Reference in New Issue
Block a user