diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index 16aebae3..af290b9a 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -610,7 +610,7 @@ "defaultDescription": "Uses P-Stream's built-in proxy. It's the easiest option but might be slower due to shared bandwidth.", "fedapi": { "fedapi": "Additional: Febbox token", - "fedapiDescription": "Bring your own FREE Febbox account to gain access to FED API and CIA API, the best sources with 4K quality, Dolby Atmos, skip intro and the fastest load times! Highly recommended option!" + "fedapiDescription": "Bring your own FREE Febbox account to gain access to FED API, the best sources with 4K quality, Dolby Atmos, skip intro and the fastest load times! Highly recommended option!" }, "outro": "If you have more questions on how this works, feel free to ask on the <0>P-Stream Discord server!" }, @@ -647,6 +647,9 @@ "description": "Setup a free proxy in just 5 minutes! Improves loading reliability!", "quality": "Good quality", "title": "Custom proxy" + }, + "addons": { + "title": "Additional sources:" } }, "title": "Let's get you setup with P-Stream 🥳" @@ -1248,7 +1251,7 @@ "fedapi": { "onboarding": { "title": "Febbox token", - "description": "Bring your own FREE Febbox account to gain access to FED API and CIA API, the best sources with 4K quality, Dolby Atmos, skip intro and the fastest load times! Highly recommended option!" + "description": "Bring your own FREE Febbox account to gain access to FED API, the best sources with 4K quality, Dolby Atmos, skip intro and the fastest load times! Highly recommended option!" }, "setup": { "title": "To get your UI token:", diff --git a/src/pages/onboarding/Onboarding.tsx b/src/pages/onboarding/Onboarding.tsx index 1d47aad9..2c37fc5e 100644 --- a/src/pages/onboarding/Onboarding.tsx +++ b/src/pages/onboarding/Onboarding.tsx @@ -1,3 +1,4 @@ +import classNames from "classnames"; import { Trans, useTranslation } from "react-i18next"; import { Button } from "@/components/buttons/Button"; @@ -179,7 +180,9 @@ export function OnboardingPage() {
navigate("/onboarding/extension")} - className="md:w-1/3" + className={classNames( + conf().HIDE_PROXY_ONBOARDING ? "md:w-1/2" : "md:w-1/3", + )} > -
- - - {t("onboarding.start.options.or")} - - -
- navigate("/onboarding/proxy")} - className="md:w-1/3" - > - - {t("onboarding.start.options.proxy.action")} - - + {conf().HIDE_PROXY_ONBOARDING ? null : ( + <> +
+ + + {t("onboarding.start.options.or")} + + +
+ navigate("/onboarding/proxy")} + className="md:w-1/3" + > + + {t("onboarding.start.options.proxy.action")} + + + + )} {noProxies ? null : ( <>
@@ -227,7 +234,9 @@ export function OnboardingPage() { ? () => completeAndRedirect() // Skip modal on Safari : skipModal.show // Show modal on other browsers } - className="md:w-1/3" + className={classNames( + conf().HIDE_PROXY_ONBOARDING ? "md:w-1/2" : "md:w-1/3", + )} > - navigate("/onboarding/proxy")} - className="md:w-1/3" - > - - + {conf().HIDE_PROXY_ONBOARDING ? null : ( + navigate("/onboarding/proxy")} + className="md:w-1/3" + > + + + )} {noProxies ? null : ( + {(conf().ALLOW_FEBBOX_KEY || conf().ALLOW_DEBRID_KEY) === true && ( + + {t("onboarding.start.options.addons.title")} + + )}
s.febboxKey)} diff --git a/src/setup/config.ts b/src/setup/config.ts index d84bf55c..d5ac0c81 100644 --- a/src/setup/config.ts +++ b/src/setup/config.ts @@ -33,6 +33,7 @@ interface Config { BANNER_MESSAGE: string; BANNER_ID: string; USE_TRAKT: boolean; + HIDE_PROXY_ONBOARDING: boolean; } export interface RuntimeConfig { @@ -62,6 +63,7 @@ export interface RuntimeConfig { BANNER_MESSAGE: string | null; BANNER_ID: string | null; USE_TRAKT: boolean; + HIDE_PROXY_ONBOARDING: boolean; } const env: Record = { @@ -94,6 +96,7 @@ const env: Record = { BANNER_MESSAGE: import.meta.env.VITE_BANNER_MESSAGE, BANNER_ID: import.meta.env.VITE_BANNER_ID, USE_TRAKT: import.meta.env.VITE_USE_TRAKT, + HIDE_PROXY_ONBOARDING: import.meta.env.VITE_HIDE_PROXY_ONBOARDING, }; function coerceUndefined(value: string | null | undefined): string | undefined { @@ -169,5 +172,6 @@ export function conf(): RuntimeConfig { BANNER_MESSAGE: getKey("BANNER_MESSAGE"), BANNER_ID: getKey("BANNER_ID"), USE_TRAKT: getKey("USE_TRAKT", "false") === "true", + HIDE_PROXY_ONBOARDING: getKey("HIDE_PROXY_ONBOARDING", "false") === "true", }; }