mirror of
https://github.com/p-stream/p-stream.git
synced 2026-08-17 12:54:12 +00:00
remove RD ext requirement
This commit is contained in:
parent
a2d2a6843c
commit
7c89b2ffc1
1 changed files with 3 additions and 15 deletions
|
|
@ -7,7 +7,6 @@ import {
|
|||
} from "react";
|
||||
import { Trans, useTranslation } from "react-i18next";
|
||||
|
||||
import { isExtensionActive } from "@/backend/extension/messaging";
|
||||
import { Button } from "@/components/buttons/Button";
|
||||
import { Toggle } from "@/components/buttons/Toggle";
|
||||
import { Icon, Icons } from "@/components/Icon";
|
||||
|
|
@ -390,12 +389,6 @@ function RealDebridKeyEdit({
|
|||
const { t } = useTranslation();
|
||||
const user = useAuthStore();
|
||||
const preferences = usePreferencesStore();
|
||||
const [hasExtension, setHasExtension] = useState(false);
|
||||
|
||||
// Check for extension
|
||||
useEffect(() => {
|
||||
isExtensionActive().then(setHasExtension);
|
||||
}, []);
|
||||
|
||||
// Enable Real Debrid token when account is loaded and we have a token
|
||||
useEffect(() => {
|
||||
|
|
@ -446,18 +439,13 @@ function RealDebridKeyEdit({
|
|||
</MwLink>
|
||||
</div>
|
||||
<div className="flex items-center gap-3">
|
||||
{!hasExtension && <Icon icon={Icons.UNPLUG} className="text-lg" />}
|
||||
<Toggle
|
||||
onClick={() =>
|
||||
hasExtension
|
||||
? setRealDebridKey((s) => (s === null ? "" : null))
|
||||
: null
|
||||
}
|
||||
enabled={realDebridKey !== null && hasExtension}
|
||||
onClick={() => setRealDebridKey((s) => (s === null ? "" : null))}
|
||||
enabled={realDebridKey !== null}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{realDebridKey !== null && hasExtension ? (
|
||||
{realDebridKey !== null ? (
|
||||
<>
|
||||
<Divider marginClass="my-6 px-8 box-content -mx-8" />
|
||||
<p className="text-white font-bold mb-3">
|
||||
|
|
|
|||
Loading…
Reference in a new issue