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.

Add HIDE_PROXY_ONBOARDING config and onboarding UI updates

Introduces the HIDE_PROXY_ONBOARDING config option to conditionally hide proxy onboarding steps in the UI. Updates OnboardingPage to use this config for rendering logic and adjusts card layouts accordingly. Also adds support for displaying additional sources heading when relevant, and updates English locale strings for clarity.

Pas bf359916 0576c9fe

+58 -35
+5 -2
src/assets/locales/en.json
··· 610 610 "defaultDescription": "Uses P-Stream's built-in proxy. It's the easiest option but might be slower due to shared bandwidth.", 611 611 "fedapi": { 612 612 "fedapi": "Additional: Febbox token", 613 - "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!" 613 + "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!" 614 614 }, 615 615 "outro": "If you have more questions on how this works, feel free to ask on the <0>P-Stream Discord</0> server!" 616 616 }, ··· 647 647 "description": "Setup a free proxy in just 5 minutes! Improves loading reliability!", 648 648 "quality": "Good quality", 649 649 "title": "Custom proxy" 650 + }, 651 + "addons": { 652 + "title": "Additional sources:" 650 653 } 651 654 }, 652 655 "title": "Let's get you setup with P-Stream 🥳" ··· 1248 1251 "fedapi": { 1249 1252 "onboarding": { 1250 1253 "title": "Febbox token", 1251 - "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!" 1254 + "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!" 1252 1255 }, 1253 1256 "setup": { 1254 1257 "title": "To get your UI token:",
+49 -33
src/pages/onboarding/Onboarding.tsx
··· 1 + import classNames from "classnames"; 1 2 import { Trans, useTranslation } from "react-i18next"; 2 3 3 4 import { Button } from "@/components/buttons/Button"; ··· 179 180 <div className="hidden md:flex w-full flex-col md:flex-row gap-3 pb-6"> 180 181 <Card 181 182 onClick={() => navigate("/onboarding/extension")} 182 - className="md:w-1/3" 183 + className={classNames( 184 + conf().HIDE_PROXY_ONBOARDING ? "md:w-1/2" : "md:w-1/3", 185 + )} 183 186 > 184 187 <CardContent 185 188 colorClass="!text-onboarding-best" ··· 192 195 </Link> 193 196 </CardContent> 194 197 </Card> 195 - <div className="hidden md:grid grid-rows-[1fr,auto,1fr] justify-center gap-4"> 196 - <VerticalLine className="items-end" /> 197 - <span className="text-xs uppercase font-bold"> 198 - {t("onboarding.start.options.or")} 199 - </span> 200 - <VerticalLine /> 201 - </div> 202 - <Card 203 - onClick={() => navigate("/onboarding/proxy")} 204 - className="md:w-1/3" 205 - > 206 - <CardContent 207 - colorClass="!text-onboarding-good" 208 - title={t("onboarding.start.options.proxy.title")} 209 - subtitle={t("onboarding.start.options.proxy.quality")} 210 - description={t("onboarding.start.options.proxy.description")} 211 - > 212 - <Link>{t("onboarding.start.options.proxy.action")}</Link> 213 - </CardContent> 214 - </Card> 198 + {conf().HIDE_PROXY_ONBOARDING ? null : ( 199 + <> 200 + <div className="hidden md:grid grid-rows-[1fr,auto,1fr] justify-center gap-4"> 201 + <VerticalLine className="items-end" /> 202 + <span className="text-xs uppercase font-bold"> 203 + {t("onboarding.start.options.or")} 204 + </span> 205 + <VerticalLine /> 206 + </div> 207 + <Card 208 + onClick={() => navigate("/onboarding/proxy")} 209 + className="md:w-1/3" 210 + > 211 + <CardContent 212 + colorClass="!text-onboarding-good" 213 + title={t("onboarding.start.options.proxy.title")} 214 + subtitle={t("onboarding.start.options.proxy.quality")} 215 + description={t("onboarding.start.options.proxy.description")} 216 + > 217 + <Link>{t("onboarding.start.options.proxy.action")}</Link> 218 + </CardContent> 219 + </Card> 220 + </> 221 + )} 215 222 {noProxies ? null : ( 216 223 <> 217 224 <div className="hidden md:grid grid-rows-[1fr,auto,1fr] justify-center gap-4"> ··· 227 234 ? () => completeAndRedirect() // Skip modal on Safari 228 235 : skipModal.show // Show modal on other browsers 229 236 } 230 - className="md:w-1/3" 237 + className={classNames( 238 + conf().HIDE_PROXY_ONBOARDING ? "md:w-1/2" : "md:w-1/3", 239 + )} 231 240 > 232 241 <CardContent 233 242 colorClass="!text-onboarding-bad" ··· 255 264 description={t("onboarding.start.options.extension.description")} 256 265 /> 257 266 </Card> 258 - <Card 259 - onClick={() => navigate("/onboarding/proxy")} 260 - className="md:w-1/3" 261 - > 262 - <MiniCardContent 263 - colorClass="!text-onboarding-good" 264 - title={t("onboarding.start.options.proxy.title")} 265 - subtitle={t("onboarding.start.options.proxy.quality")} 266 - description={t("onboarding.start.options.proxy.description")} 267 - /> 268 - </Card> 267 + {conf().HIDE_PROXY_ONBOARDING ? null : ( 268 + <Card 269 + onClick={() => navigate("/onboarding/proxy")} 270 + className="md:w-1/3" 271 + > 272 + <MiniCardContent 273 + colorClass="!text-onboarding-good" 274 + title={t("onboarding.start.options.proxy.title")} 275 + subtitle={t("onboarding.start.options.proxy.quality")} 276 + description={t("onboarding.start.options.proxy.description")} 277 + /> 278 + </Card> 279 + )} 269 280 {noProxies ? null : ( 270 281 <Card 271 282 onClick={ ··· 285 296 )} 286 297 </div> 287 298 299 + {(conf().ALLOW_FEBBOX_KEY || conf().ALLOW_DEBRID_KEY) === true && ( 300 + <Heading3 className="text-white font-bold mb-3 mt-6"> 301 + {t("onboarding.start.options.addons.title")} 302 + </Heading3> 303 + )} 288 304 <div className="mt-6"> 289 305 <FebboxSetup 290 306 febboxKey={usePreferencesStore((s) => s.febboxKey)}
+4
src/setup/config.ts
··· 33 33 BANNER_MESSAGE: string; 34 34 BANNER_ID: string; 35 35 USE_TRAKT: boolean; 36 + HIDE_PROXY_ONBOARDING: boolean; 36 37 } 37 38 38 39 export interface RuntimeConfig { ··· 62 63 BANNER_MESSAGE: string | null; 63 64 BANNER_ID: string | null; 64 65 USE_TRAKT: boolean; 66 + HIDE_PROXY_ONBOARDING: boolean; 65 67 } 66 68 67 69 const env: Record<keyof Config, undefined | string> = { ··· 94 96 BANNER_MESSAGE: import.meta.env.VITE_BANNER_MESSAGE, 95 97 BANNER_ID: import.meta.env.VITE_BANNER_ID, 96 98 USE_TRAKT: import.meta.env.VITE_USE_TRAKT, 99 + HIDE_PROXY_ONBOARDING: import.meta.env.VITE_HIDE_PROXY_ONBOARDING, 97 100 }; 98 101 99 102 function coerceUndefined(value: string | null | undefined): string | undefined { ··· 169 172 BANNER_MESSAGE: getKey("BANNER_MESSAGE"), 170 173 BANNER_ID: getKey("BANNER_ID"), 171 174 USE_TRAKT: getKey("USE_TRAKT", "false") === "true", 175 + HIDE_PROXY_ONBOARDING: getKey("HIDE_PROXY_ONBOARDING", "false") === "true", 172 176 }; 173 177 }