feat: limiting nimbus to cloud only

This commit is contained in:
Chubby Granny Chaser
2025-04-12 21:24:06 +01:00
parent 6e8a844a92
commit 4a11d741eb
8 changed files with 14 additions and 7 deletions

View File

@@ -138,7 +138,6 @@ export function App() {
}, [fetchUserDetails, updateUserDetails, dispatch]);
const syncDownloadSources = useCallback(async () => {
console.log("SYNC CALLED");
const downloadSources = await window.electron.getDownloadSources();
const existingDownloadSources: DownloadSource[] =

View File

@@ -1,15 +1,18 @@
import Meteor from "@renderer/assets/meteor.svg?react";
import "./debrid-badge.scss";
import { useTranslation } from "react-i18next";
export interface DebridBadgeProps {
collapsed?: boolean;
}
export function DebridBadge({ collapsed }: Readonly<DebridBadgeProps>) {
const { t } = useTranslation("hydra_cloud");
return (
<div className="debrid-badge">
<Meteor />
{!collapsed && "Baixe até 2x mais rápido com Nimbus"}
{!collapsed && t("debrid_description")}
</div>
);
}

View File

@@ -3,6 +3,7 @@ import { useEffect, useState } from "react";
enum Feature {
CheckDownloadWritePermission = "CHECK_DOWNLOAD_WRITE_PERMISSION",
Torbox = "TORBOX",
Nimbus = "NIMBUS",
}
export function useFeature() {

View File

@@ -185,7 +185,9 @@ export function DownloadSettingsModal({
(downloader === Downloader.RealDebrid &&
!userPreferences?.realDebridApiToken) ||
(downloader === Downloader.TorBox &&
!userPreferences?.torBoxApiToken);
!userPreferences?.torBoxApiToken) ||
(downloader === Downloader.Hydra &&
!isFeatureEnabled(Feature.Nimbus));
return (
<Button