diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index c691befe..29bf3647 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -506,18 +506,18 @@ "extension": { "title": "Let's start with an extension", "explainer": "Using the browser extension, you can get the best streams we have to offer. With just a simple install.", + "extensionHelp": "If you've installed the extension but it's not detected. Open the extension through your browsers extension menu and follow the steps on screen.", "link": "Install extension", "back": "Go back", "status": { - "loading": "Waiting on extension", - "disallowed": "Extension disabled for this page", + "loading": "Waiting for you to install the extension", + "disallowed": "Extension is not enabled for this page", + "disallowedAction": "Enabled extension", "failed": "Failed to request status", "outdated": "Extension version too old", - "noperms": "Extension does not have sufficient permissions", "success": "Extension is working as expected!" }, - "submitCheck": "Check for extension", - "submitFinal": "Continue" + "submit": "Continue" }, "defaultConfirm": { "title": "Are you sure?", diff --git a/src/components/layout/ThinContainer.tsx b/src/components/layout/ThinContainer.tsx index 8b128040..9f06f579 100644 --- a/src/components/layout/ThinContainer.tsx +++ b/src/components/layout/ThinContainer.tsx @@ -22,7 +22,7 @@ export function CenterContainer(props: ThinContainerProps) { return (
diff --git a/src/pages/onboarding/OnboardingExtension.tsx b/src/pages/onboarding/OnboardingExtension.tsx index ffa4bc84..75408f28 100644 --- a/src/pages/onboarding/OnboardingExtension.tsx +++ b/src/pages/onboarding/OnboardingExtension.tsx @@ -1,11 +1,12 @@ import { ReactNode } from "react"; -import { useTranslation } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { useAsyncFn, useInterval } from "react-use"; import { isAllowedExtensionVersion } from "@/backend/extension/compatibility"; -import { extensionInfo } from "@/backend/extension/messaging"; +import { extensionInfo, sendPage } from "@/backend/extension/messaging"; import { Button } from "@/components/buttons/Button"; +import { Icon, Icons } from "@/components/Icon"; import { Loading } from "@/components/layout/Loading"; import { Stepper } from "@/components/layout/Stepper"; import { CenterContainer } from "@/components/layout/ThinContainer"; @@ -47,23 +48,57 @@ export function ExtensionStatus(props: {

{t("onboarding.extension.status.loading")}

); - // TODO make proper actions for all of these states below - if (props.status === "disallowed") - content =

{t("onboarding.extension.status.disallowed")}

; + if (props.status === "disallowed" || props.status === "noperms") + content = ( + <> +

{t("onboarding.extension.status.disallowed")}

+ + + ); else if (props.status === "failed") content =

{t("onboarding.extension.status.failed")}

; else if (props.status === "outdated") content =

{t("onboarding.extension.status.outdated")}

; - else if (props.status === "noperms") - content =

{t("onboarding.extension.status.noperms")}

; else if (props.status === "success") - content =

{t("onboarding.extension.status.success")}

; + content = ( +

+ + {t("onboarding.extension.status.success")} +

+ ); return ( - -
- {content} -
-
+ <> + +
+ {content} +
+
+ +
+ +

+ , + }} + /> +

+
+
+ ); } @@ -103,13 +138,11 @@ export function OnboardingExtensionPage() { - + {value === "success" ? ( + + ) : null}
diff --git a/src/pages/onboarding/utils.tsx b/src/pages/onboarding/utils.tsx index e8129230..3a57952b 100644 --- a/src/pages/onboarding/utils.tsx +++ b/src/pages/onboarding/utils.tsx @@ -7,16 +7,20 @@ import { Heading2, Heading3, Paragraph } from "@/components/utils/Text"; export function Card(props: { children?: React.ReactNode; + className?: string; onClick?: () => void; }) { return (
{props.children}