mirror of
https://github.com/p-stream/p-stream.git
synced 2026-03-11 17:55:33 +00:00
hide proxy setup on desktop app
This commit is contained in:
parent
8016cd683e
commit
14d45b4a63
3 changed files with 36 additions and 21 deletions
|
|
@ -1285,7 +1285,8 @@
|
|||
"items": {
|
||||
"default": "Default setup",
|
||||
"extension": "Extension",
|
||||
"proxy": "Custom proxy"
|
||||
"proxy": "Custom proxy",
|
||||
"desktopapp": "Native app"
|
||||
},
|
||||
"redoSetup": "Redo setup",
|
||||
"successStatus": {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import { MwLink } from "@/components/text/Link";
|
|||
import { AuthInputBox } from "@/components/text-inputs/AuthInputBox";
|
||||
import { Divider } from "@/components/utils/Divider";
|
||||
import { Heading1, Heading2, Paragraph } from "@/components/utils/Text";
|
||||
import { useIsDesktopApp } from "@/hooks/useIsDesktopApp";
|
||||
import {
|
||||
SetupPart,
|
||||
Status,
|
||||
|
|
@ -780,17 +781,20 @@ export function ConnectionsPart(
|
|||
TIDBKeyProps,
|
||||
) {
|
||||
const { t } = useTranslation();
|
||||
const isDesktopApp = useIsDesktopApp();
|
||||
return (
|
||||
<div>
|
||||
<Heading1 border>{t("settings.connections.title")}</Heading1>
|
||||
<div className="space-y-6">
|
||||
<SetupPart /> {/* I was wondering what happened to this badddev >:( */}
|
||||
<ProxyEdit
|
||||
proxyUrls={props.proxyUrls}
|
||||
setProxyUrls={props.setProxyUrls}
|
||||
proxyTmdb={props.proxyTmdb}
|
||||
setProxyTmdb={props.setProxyTmdb}
|
||||
/>
|
||||
<SetupPart />
|
||||
{!isDesktopApp && (
|
||||
<ProxyEdit
|
||||
proxyUrls={props.proxyUrls}
|
||||
setProxyUrls={props.setProxyUrls}
|
||||
proxyTmdb={props.proxyTmdb}
|
||||
setProxyTmdb={props.setProxyTmdb}
|
||||
/>
|
||||
)}
|
||||
<BackendEdit
|
||||
backendUrl={props.backendUrl}
|
||||
setBackendUrl={props.setBackendUrl}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import {
|
|||
StatusCircleProps,
|
||||
} from "@/components/player/internals/StatusCircle";
|
||||
import { Heading3 } from "@/components/utils/Text";
|
||||
import { useIsDesktopApp } from "@/hooks/useIsDesktopApp";
|
||||
import { conf } from "@/setup/config";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
import { usePreferencesStore } from "@/stores/preferences";
|
||||
|
|
@ -359,6 +360,7 @@ export function SetupPart() {
|
|||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const { loading, setupStates, globalState } = useIsSetup();
|
||||
const isDesktopApp = useIsDesktopApp();
|
||||
if (loading || !setupStates) {
|
||||
return (
|
||||
<SettingsCard>
|
||||
|
|
@ -425,19 +427,27 @@ export function SetupPart() {
|
|||
<p className="max-w-[20rem] font-medium mb-6">
|
||||
{t(textLookupMap[globalState].desc)}
|
||||
</p>
|
||||
<SetupCheckList status={setupStates.extension}>
|
||||
{t("settings.connections.setup.items.extension")}
|
||||
</SetupCheckList>
|
||||
<SetupCheckList status={setupStates.proxy}>
|
||||
{t("settings.connections.setup.items.proxy")}
|
||||
</SetupCheckList>
|
||||
<SetupCheckList
|
||||
grey
|
||||
highlight={globalState === "unset"}
|
||||
status={setupStates.defaultProxy}
|
||||
>
|
||||
{t("settings.connections.setup.items.default")}
|
||||
</SetupCheckList>
|
||||
{!isDesktopApp ? (
|
||||
<>
|
||||
<SetupCheckList status={setupStates.extension}>
|
||||
{t("settings.connections.setup.items.extension")}
|
||||
</SetupCheckList>
|
||||
<SetupCheckList status={setupStates.proxy}>
|
||||
{t("settings.connections.setup.items.proxy")}
|
||||
</SetupCheckList>
|
||||
<SetupCheckList
|
||||
grey
|
||||
highlight={globalState === "unset"}
|
||||
status={setupStates.defaultProxy}
|
||||
>
|
||||
{t("settings.connections.setup.items.default")}
|
||||
</SetupCheckList>
|
||||
</>
|
||||
) : (
|
||||
<SetupCheckList status={setupStates.extension}>
|
||||
{t("settings.connections.setup.items.desktopapp")}
|
||||
</SetupCheckList>
|
||||
)}
|
||||
{conf().ALLOW_DEBRID_KEY && (
|
||||
<SetupCheckList status={setupStates.debridTokenTest || "unset"}>
|
||||
Debrid Service
|
||||
|
|
|
|||
Loading…
Reference in a new issue