+
- {t("password")}
-
-
- setPassword(e.target.value)}
- className="input-glow w-full rounded-xl border-2 px-4 py-3 text-sm font-medium transition-all focus:outline-none"
- style={{
- backgroundColor: "var(--color-background)",
- color: "var(--color-text-readable)",
- borderColor:
- "color-mix(in srgb, var(--color-text-muted) 25%, transparent)",
- }}
- required
- />
-
-
- {password.length > 0 && (
-
-
- {[1, 2, 3, 4, 5].map((i) => (
-
- ))}
-
-
- {strength.label}
-
-
- )}
+ {t("credentials")}
+
+
-
-
-
-
-
{/* Terms */}
-
-
- * Required for account creation
-
+
+
+
+ {termsError || !termsAccepted ? t("termsRequired") : t("accepted")}
+
+ {termsError && (
+
+ {t("termsRequired")}
+
+ )}
{/* Captcha */}
- {showCaptcha && captcha.provider === "turnstile" && (
-
- )}
- {showCaptcha && captcha.provider === "recaptcha" && (
-
- )}
- {showCaptcha && captcha.provider === "hcaptcha" && (
-
+ {showCaptcha && (
+
+ {captcha.provider === "turnstile" && (
+
+ )}
+ {captcha.provider === "recaptcha" && (
+
+ )}
+ {captcha.provider === "hcaptcha" && (
+
+ )}
+
)}
{/* Submit */}
{
+ if (!termsAccepted) {
+ setTermsError(true);
+ termsRef.current?.scrollIntoView({
+ behavior: "smooth",
+ block: "center",
+ });
+ }
+ }}
+ className={`btn-shine w-full rounded-xl font-extrabold text-sm py-3.5 transition-all duration-200 hover:scale-[1.02] active:scale-95 shadow-lg disabled:opacity-60 ${
+ termsAccepted ? "" : "opacity-70 saturate-[0.85] hover:scale-100"
+ }`}
style={{
background: "var(--color-primary)",
color: "var(--color-primary-foreground)",
- boxShadow:
- "0 4px 24px color-mix(in srgb, var(--color-primary) 35%, transparent)",
+ boxShadow: termsAccepted
+ ? "0 4px 24px color-mix(in srgb, var(--color-primary) 35%, transparent)"
+ : "0 2px 10px color-mix(in srgb, var(--color-primary) 12%, transparent)",
}}
>
{isPending || signingIn ? (
diff --git a/src/messages/en.json b/src/messages/en.json
index 01bd05dbb3..96d0dd58fd 100644
--- a/src/messages/en.json
+++ b/src/messages/en.json
@@ -897,10 +897,15 @@
"confirmPassword": "Repeat password",
"usernamePlaceholder": "Username",
"emailPlaceholder": "Email",
- "passwordPlaceholder": "Password (min 6 chars)",
+ "passwordPlaceholder": "Password (min 8 chars)",
"confirmPasswordPlaceholder": "Repeat password",
"selectOutfit": "Select your outfit",
"termsAccept": "I am 18+ and accept the {hotel} terms & rules.",
+ "accepted": "Accepted & agreed",
+ "showPassword": "Show",
+ "hidePassword": "Hide",
+ "accountDetails": "Account details",
+ "credentials": "Credentials & security",
"createAccount": "Create account",
"creatingAccount": "Creating account...",
"redirecting": "Redirecting to your account...",
diff --git a/src/types/react-dom.d.ts b/src/types/react-dom.d.ts
new file mode 100644
index 0000000000..9117500fb0
--- /dev/null
+++ b/src/types/react-dom.d.ts
@@ -0,0 +1,13 @@
+import type { HTMLAttributes } from "react";
+
+declare module "react" {
+ interface IframeHTMLAttributes extends HTMLAttributes {
+ /**
+ * Browser support for `fetchpriority` on iframes exists (Chrome 126+,
+ * Safari 17.5+, Firefox 129+); React forwards the `fetchPriority` prop
+ * to a `fetchpriority` attribute so the game document is fetched with
+ * high priority instead of competing with other resources.
+ */
+ fetchPriority?: "high" | "low" | "auto";
+ }
+}