From a60523a8b2fa7a4ad14dd11d7bfa64c574b28aba Mon Sep 17 00:00:00 2001 From: Pas <74743263+Pasithea0@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:56:43 -0700 Subject: [PATCH] Add more info popup for onboarding --- src/pages/onboarding/Onboarding.tsx | 67 +++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/src/pages/onboarding/Onboarding.tsx b/src/pages/onboarding/Onboarding.tsx index 77eda7b5..da3a7caf 100644 --- a/src/pages/onboarding/Onboarding.tsx +++ b/src/pages/onboarding/Onboarding.tsx @@ -1,6 +1,8 @@ +import { useState } from "react"; import { Trans, useTranslation } from "react-i18next"; import { Button } from "@/components/buttons/Button"; +import { Icon, Icons } from "@/components/Icon"; import { Stepper } from "@/components/layout/Stepper"; import { BiggerCenterContainer } from "@/components/layout/ThinContainer"; import { VerticalLine } from "@/components/layout/VerticalLine"; @@ -20,6 +22,8 @@ import { import { PageTitle } from "@/pages/parts/util/PageTitle"; import { getProxyUrls } from "@/utils/proxyUrls"; +import { PopupModal } from "../parts/home/PopupModal"; + export function OnboardingPage() { const navigate = useNavigateOnboarding(); const skipModal = useModal("skip"); @@ -33,6 +37,12 @@ export function OnboardingPage() { !/Chrome/.test(navigator.userAgent) && !/Edg/.test(navigator.userAgent); + const [showModal, setShowModal] = useState(false); + + const handleCloseModal = () => { + setShowModal(false); + }; + return ( @@ -54,6 +64,56 @@ export function OnboardingPage() { + {showModal && ( + +

+ P-Stream doesn’t host videos. It relies on third-party websites + for content, so you need to choose how it connects to those + sites. +
+
+ Your Options: +
+ 1. Extension (Recommended) +
+ The extension gives you access to the most sources. It acts as a + local proxy and can handle sites that need special cookies or + headers to load. +
+
+ 2. Proxy +
+ The proxy scrapes media from other websites. It bypasses browser + restrictions (like CORS) to allow scraping. +
+
+ 3. Default Setup +
+ Uses P-Stream’s built-in proxy. It’s the easiest option but + might be slower due to shared bandwidth. +
+
+ If you have more questions on how this works, feel free to ask + on the{" "} + + P-Stream Discord + {" "} + server! +

+ + } + onClose={handleCloseModal} + /> + )} @@ -61,6 +121,13 @@ export function OnboardingPage() { {t("onboarding.start.explainer")} +
setShowModal(true)} + > +

More info

+ +
{/* Desktop Cards */}