pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

hide proxy setup on desktop app

Pas 14d45b4a 8016cd68

+36 -21
+2 -1
src/assets/locales/en.json
··· 1285 1285 "items": { 1286 1286 "default": "Default setup", 1287 1287 "extension": "Extension", 1288 - "proxy": "Custom proxy" 1288 + "proxy": "Custom proxy", 1289 + "desktopapp": "Native app" 1289 1290 }, 1290 1291 "redoSetup": "Redo setup", 1291 1292 "successStatus": {
+11 -7
src/pages/parts/settings/ConnectionsPart.tsx
··· 23 23 import { AuthInputBox } from "@/components/text-inputs/AuthInputBox"; 24 24 import { Divider } from "@/components/utils/Divider"; 25 25 import { Heading1, Heading2, Paragraph } from "@/components/utils/Text"; 26 + import { useIsDesktopApp } from "@/hooks/useIsDesktopApp"; 26 27 import { 27 28 SetupPart, 28 29 Status, ··· 780 781 TIDBKeyProps, 781 782 ) { 782 783 const { t } = useTranslation(); 784 + const isDesktopApp = useIsDesktopApp(); 783 785 return ( 784 786 <div> 785 787 <Heading1 border>{t("settings.connections.title")}</Heading1> 786 788 <div className="space-y-6"> 787 - <SetupPart /> {/* I was wondering what happened to this badddev >:( */} 788 - <ProxyEdit 789 - proxyUrls={props.proxyUrls} 790 - setProxyUrls={props.setProxyUrls} 791 - proxyTmdb={props.proxyTmdb} 792 - setProxyTmdb={props.setProxyTmdb} 793 - /> 789 + <SetupPart /> 790 + {!isDesktopApp && ( 791 + <ProxyEdit 792 + proxyUrls={props.proxyUrls} 793 + setProxyUrls={props.setProxyUrls} 794 + proxyTmdb={props.proxyTmdb} 795 + setProxyTmdb={props.setProxyTmdb} 796 + /> 797 + )} 794 798 <BackendEdit 795 799 backendUrl={props.backendUrl} 796 800 setBackendUrl={props.setBackendUrl}
+23 -13
src/pages/parts/settings/SetupPart.tsx
··· 17 17 StatusCircleProps, 18 18 } from "@/components/player/internals/StatusCircle"; 19 19 import { Heading3 } from "@/components/utils/Text"; 20 + import { useIsDesktopApp } from "@/hooks/useIsDesktopApp"; 20 21 import { conf } from "@/setup/config"; 21 22 import { useAuthStore } from "@/stores/auth"; 22 23 import { usePreferencesStore } from "@/stores/preferences"; ··· 359 360 const { t } = useTranslation(); 360 361 const navigate = useNavigate(); 361 362 const { loading, setupStates, globalState } = useIsSetup(); 363 + const isDesktopApp = useIsDesktopApp(); 362 364 if (loading || !setupStates) { 363 365 return ( 364 366 <SettingsCard> ··· 425 427 <p className="max-w-[20rem] font-medium mb-6"> 426 428 {t(textLookupMap[globalState].desc)} 427 429 </p> 428 - <SetupCheckList status={setupStates.extension}> 429 - {t("settings.connections.setup.items.extension")} 430 - </SetupCheckList> 431 - <SetupCheckList status={setupStates.proxy}> 432 - {t("settings.connections.setup.items.proxy")} 433 - </SetupCheckList> 434 - <SetupCheckList 435 - grey 436 - highlight={globalState === "unset"} 437 - status={setupStates.defaultProxy} 438 - > 439 - {t("settings.connections.setup.items.default")} 440 - </SetupCheckList> 430 + {!isDesktopApp ? ( 431 + <> 432 + <SetupCheckList status={setupStates.extension}> 433 + {t("settings.connections.setup.items.extension")} 434 + </SetupCheckList> 435 + <SetupCheckList status={setupStates.proxy}> 436 + {t("settings.connections.setup.items.proxy")} 437 + </SetupCheckList> 438 + <SetupCheckList 439 + grey 440 + highlight={globalState === "unset"} 441 + status={setupStates.defaultProxy} 442 + > 443 + {t("settings.connections.setup.items.default")} 444 + </SetupCheckList> 445 + </> 446 + ) : ( 447 + <SetupCheckList status={setupStates.extension}> 448 + {t("settings.connections.setup.items.desktopapp")} 449 + </SetupCheckList> 450 + )} 441 451 {conf().ALLOW_DEBRID_KEY && ( 442 452 <SetupCheckList status={setupStates.debridTokenTest || "unset"}> 443 453 Debrid Service