diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index d598bcf7..10007e97 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -1105,6 +1105,14 @@ "4": "4. Copy the 'ui' cookie's value.", "5": "5. Close the tab, but do NOT logout!", "warning": "(Do not share this token!)" + }, + "tokenLabel": "Token", + "tokenExample": { + "button": "(Example)", + "title": "Example Token", + "description": "This is what a Febbox UI token looks like:", + "warning": "Don't try to use, it's fake.", + "close": "Got it" } }, "status": { diff --git a/src/pages/onboarding/Onboarding.tsx b/src/pages/onboarding/Onboarding.tsx index 439d9914..0a6b7e14 100644 --- a/src/pages/onboarding/Onboarding.tsx +++ b/src/pages/onboarding/Onboarding.tsx @@ -62,6 +62,7 @@ export function FEDAPISetup() { const { t } = useTranslation(); const febboxKey = usePreferencesStore((s) => s.febboxKey); const setFebboxKey = usePreferencesStore((s) => s.setFebboxKey); + const exampleModal = useModal("febbox-example"); // Initialize isExpanded based on whether febboxKey has a value const [isExpanded, setIsExpanded] = useState( @@ -108,116 +109,148 @@ export function FEDAPISetup() { if (conf().ALLOW_FEBBOX_KEY) { return ( -
- {t("fedapi.onboarding.title")} -
-
-
+ {t("fedapi.onboarding.title")} +
- {t("fedapi.setup.title")}
-
-
+ {t("fedapi.setup.title")}
+
+
+
+ {t("fedapi.setup.tokenLabel")}
-
-
- {t("settings.connections.febbox.tokenLabel", "Token")} -
-- {t("fedapi.status.failure")} -
- )} - {status === "api_down" && ( -- {t( - "fedapi.status.api_down", - "Febbox API is currently unavailable. Please try again later.", - )} -
- )} - {status === "invalid_token" && ( -- {t( - "fedapi.status.invalid_token", - "Invalid token. Please check your Febbox UI token.", - )} -
- )} - > - ) : null} -+ {t("fedapi.status.failure")} +
+ )} + {status === "api_down" && ( ++ {t( + "fedapi.status.api_down", + "Febbox API is currently unavailable. Please try again later.", + )} +
+ )} + {status === "invalid_token" && ( ++ {t( + "fedapi.status.invalid_token", + "Invalid token. Please check your Febbox UI token.", + )} +
+ )} + > + ) : null} + + +- {t("fedapi.onboarding.title")} -
-
-
- {t("fedapi.setup.title")}
-
-
+ {t("fedapi.onboarding.title")}
-
-
+
- {t("settings.connections.febbox.tokenLabel", "Token")} -
-- {t("fedapi.status.failure")} +
+ {t("fedapi.setup.title")}
+
+
+
+ {t("settings.connections.febbox.tokenLabel", "Token")}
- )} - {status === "api_down" && ( -- {t("fedapi.status.api_down")} -
- )} - {status === "invalid_token" && ( -- {t("fedapi.status.invalid_token")} -
- )} - > - ) : null} - ++ {t("fedapi.status.failure")} +
+ )} + {status === "api_down" && ( ++ {t("fedapi.status.api_down")} +
+ )} + {status === "invalid_token" && ( ++ {t("fedapi.status.invalid_token")} +
+ )} + > + ) : null} + +