mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-18 08:43:57 +00:00
chore: removing rust rpc
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
@@ -2,7 +2,7 @@ import { useEffect, useState, useCallback } from "react";
|
||||
|
||||
enum Feature {
|
||||
CheckDownloadWritePermission = "CHECK_DOWNLOAD_WRITE_PERMISSION",
|
||||
Torbox = "TORBOX",
|
||||
TorBox = "TORBOX",
|
||||
Nimbus = "NIMBUS",
|
||||
NimbusPreview = "NIMBUS_PREVIEW",
|
||||
}
|
||||
|
||||
@@ -32,8 +32,6 @@ import {
|
||||
XCircleIcon,
|
||||
} from "@primer/octicons-react";
|
||||
|
||||
import torBoxLogo from "@renderer/assets/icons/torbox.webp";
|
||||
|
||||
export interface DownloadGroupProps {
|
||||
library: LibraryGame[];
|
||||
title: string;
|
||||
@@ -320,20 +318,7 @@ export function DownloadGroup({
|
||||
/>
|
||||
|
||||
<div className="download-group__cover-content">
|
||||
{game.download?.downloader === Downloader.TorBox ? (
|
||||
<Badge>
|
||||
<img
|
||||
src={torBoxLogo}
|
||||
alt="TorBox"
|
||||
style={{ width: 13 }}
|
||||
/>
|
||||
<span>TorBox</span>
|
||||
</Badge>
|
||||
) : (
|
||||
<Badge>
|
||||
{DOWNLOADER_NAME[game.download!.downloader]}
|
||||
</Badge>
|
||||
)}
|
||||
<Badge>{DOWNLOADER_NAME[game.download!.downloader]}</Badge>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -87,14 +87,14 @@ export function DownloadSettingsModal({
|
||||
return Downloader.Hydra;
|
||||
}
|
||||
|
||||
if (availableDownloaders.includes(Downloader.TorBox)) {
|
||||
return Downloader.TorBox;
|
||||
}
|
||||
|
||||
if (availableDownloaders.includes(Downloader.RealDebrid)) {
|
||||
return Downloader.RealDebrid;
|
||||
}
|
||||
|
||||
if (availableDownloaders.includes(Downloader.TorBox)) {
|
||||
return Downloader.TorBox;
|
||||
}
|
||||
|
||||
return availableDownloaders[0];
|
||||
},
|
||||
[]
|
||||
|
||||
@@ -16,7 +16,7 @@ const TORBOX_URL = torBoxReferralCode
|
||||
: "https://torbox.app";
|
||||
const TORBOX_API_TOKEN_URL = "https://torbox.app/settings";
|
||||
|
||||
export function SettingsTorbox() {
|
||||
export function SettingsTorBox() {
|
||||
const userPreferences = useAppSelector(
|
||||
(state) => state.userPreferences.value
|
||||
);
|
||||
|
||||
@@ -3,7 +3,6 @@ import { useTranslation } from "react-i18next";
|
||||
import { SettingsRealDebrid } from "./settings-real-debrid";
|
||||
import { SettingsGeneral } from "./settings-general";
|
||||
import { SettingsBehavior } from "./settings-behavior";
|
||||
import torBoxLogo from "@renderer/assets/icons/torbox.webp";
|
||||
import { SettingsDownloadSources } from "./settings-download-sources";
|
||||
import {
|
||||
SettingsContextConsumer,
|
||||
@@ -14,7 +13,7 @@ import { useFeature, useUserDetails } from "@renderer/hooks";
|
||||
import { useMemo } from "react";
|
||||
import "./settings.scss";
|
||||
import { SettingsAppearance } from "./aparence/settings-appearance";
|
||||
import { SettingsTorbox } from "./settings-torbox";
|
||||
import { SettingsTorBox } from "./settings-torbox";
|
||||
|
||||
export default function Settings() {
|
||||
const { t } = useTranslation("settings");
|
||||
@@ -23,7 +22,7 @@ export default function Settings() {
|
||||
|
||||
const { isFeatureEnabled, Feature } = useFeature();
|
||||
|
||||
const isTorboxEnabled = isFeatureEnabled(Feature.Torbox);
|
||||
const isTorBoxEnabled = isFeatureEnabled(Feature.TorBox);
|
||||
|
||||
const categories = useMemo(() => {
|
||||
const categories = [
|
||||
@@ -34,19 +33,10 @@ export default function Settings() {
|
||||
tabLabel: t("appearance"),
|
||||
contentTitle: t("appearance"),
|
||||
},
|
||||
...(isTorboxEnabled
|
||||
...(isTorBoxEnabled
|
||||
? [
|
||||
{
|
||||
tabLabel: (
|
||||
<>
|
||||
<img
|
||||
src={torBoxLogo}
|
||||
alt="TorBox"
|
||||
style={{ width: 13, height: 13 }}
|
||||
/>{" "}
|
||||
Torbox
|
||||
</>
|
||||
),
|
||||
tabLabel: "TorBox",
|
||||
contentTitle: "TorBox",
|
||||
},
|
||||
]
|
||||
@@ -60,7 +50,7 @@ export default function Settings() {
|
||||
{ tabLabel: t("account"), contentTitle: t("account") },
|
||||
];
|
||||
return categories;
|
||||
}, [userDetails, t, isTorboxEnabled]);
|
||||
}, [userDetails, t, isTorBoxEnabled]);
|
||||
|
||||
return (
|
||||
<SettingsContextProvider>
|
||||
@@ -84,7 +74,7 @@ export default function Settings() {
|
||||
}
|
||||
|
||||
if (currentCategoryIndex === 4) {
|
||||
return <SettingsTorbox />;
|
||||
return <SettingsTorBox />;
|
||||
}
|
||||
|
||||
if (currentCategoryIndex === 5) {
|
||||
|
||||
Reference in New Issue
Block a user