mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-21 01:53:57 +00:00
feat: limiting nimbus to cloud only
This commit is contained in:
@@ -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[] =
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useEffect, useState } from "react";
|
||||
enum Feature {
|
||||
CheckDownloadWritePermission = "CHECK_DOWNLOAD_WRITE_PERMISSION",
|
||||
Torbox = "TORBOX",
|
||||
Nimbus = "NIMBUS",
|
||||
}
|
||||
|
||||
export function useFeature() {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user