From 12e4a07e48ebe63992979c275894fe177457a558 Mon Sep 17 00:00:00 2001 From: openhands Date: Fri, 24 Jul 2026 14:49:07 +0200 Subject: [PATCH] polish: typewriter SSR fix, Community link label, verify premium cards, loading skeleton --- src/app/(site)/page.tsx | 2 +- src/app/(site)/verify/page.tsx | 127 +++++++++++++++++++++++------ src/app/loading.tsx | 40 ++++++--- src/components/typewriter-text.tsx | 27 +++--- src/messages/bg.json | 1 + src/messages/cs.json | 1 + src/messages/da.json | 1 + src/messages/de.json | 1 + src/messages/el.json | 1 + src/messages/en.json | 1 + src/messages/es.json | 1 + src/messages/fr.json | 1 + src/messages/hr.json | 1 + src/messages/hu.json | 1 + src/messages/it.json | 1 + src/messages/nl.json | 1 + src/messages/no.json | 1 + src/messages/pl.json | 1 + src/messages/pt.json | 1 + src/messages/ro.json | 1 + src/messages/ru.json | 1 + src/messages/sk.json | 1 + src/messages/sr.json | 1 + src/messages/sv.json | 1 + src/messages/tr.json | 1 + src/messages/uk.json | 1 + 26 files changed, 166 insertions(+), 52 deletions(-) diff --git a/src/app/(site)/page.tsx b/src/app/(site)/page.tsx index a60f554a71..93935cb82f 100644 --- a/src/app/(site)/page.tsx +++ b/src/app/(site)/page.tsx @@ -406,7 +406,7 @@ export default async function Home() { - {tp("allNews")} + {tp("allUsers")}
diff --git a/src/app/(site)/verify/page.tsx b/src/app/(site)/verify/page.tsx index f771802b05..7c3809b8e1 100644 --- a/src/app/(site)/verify/page.tsx +++ b/src/app/(site)/verify/page.tsx @@ -1,13 +1,68 @@ +import { CheckCircle2, Clock, Link2, MailX } from "lucide-react"; import Link from "next/link"; import { getTranslations } from "next-intl/server"; import { isValidVerificationToken } from "@/actions/email-verify"; -import { ContentCard, EmptyState } from "@/components/public/ui"; import { prisma } from "@/lib/prisma"; export const dynamic = "force-dynamic"; type Status = "verified" | "already" | "invalid" | "unavailable"; +function StatusCard({ + icon, + title, + subtitle, + children, + color, +}: { + icon: React.ReactNode; + title: string; + subtitle: string; + children: React.ReactNode; + color: string; +}) { + const gradientMap: Record = { + green: "linear-gradient(140deg, #0A2F1A 0%, #0F3D22 20%, #154C2A 40%, #1B5A32 60%, #20683A 75%, #1A5A30 90%, #144826 100%)", + yellow: "linear-gradient(140deg, #3A2F0A 0%, #4A3D0F 20%, #5A4C15 40%, #6A5A1B 60%, #7A6820 75%, #6A5A1A 90%, #5A4814 100%)", + red: "linear-gradient(140deg, #3A0F0A 0%, #4A1A0F 20%, #5A2515 40%, #6A301B 60%, #7A3B20 75%, #6A301A 90%, #5A2514 100%)", + blue: "linear-gradient(140deg, #0A1A3A 0%, #0F254A 20%, #15305A 40%, #1B3B6A 60%, #20467A 75%, #1A3B6A 90%, #14305A 100%)", + }; + + return ( +
+
+
+ {icon} +

{title}

+
+
+
+ {icon} +
+

+ {subtitle} +

+ {children} +
+
+
+ ); +} + export default async function VerifyPage({ searchParams, }: { @@ -47,64 +102,82 @@ export default async function VerifyPage({ } } + const linkClass = + "btn-shine inline-flex items-center gap-2 font-extrabold text-sm px-6 py-3 rounded-xl transition-all duration-200 hover:scale-[1.02] active:scale-95 shadow-lg"; + const linkStyle = { + background: "var(--color-primary)", + color: "var(--color-primary-foreground)", + boxShadow: "0 4px 20px color-mix(in srgb, var(--color-primary) 30%, transparent)", + }; + return ( -
+ <> {status === "verified" && ( - } title={t("verifiedTitle")} subtitle={t("verifiedSubtitle")} + color="green" > -

+

{t("verifiedBody")}

- + {t("goToLogin")} -
+ )} {status === "already" && ( - } title={t("alreadyTitle")} subtitle={t("alreadySubtitle")} + color="yellow" > -

+

{t("alreadyBody")}

- + {t("goToLogin")} -
+ )} {status === "unavailable" && ( - } title={t("unavailableTitle")} subtitle={t("unavailableSubtitle")} + color="blue" > -

+

{t("unavailableBody")}

-
+ )} {status === "invalid" && ( - } title={t("invalidTitle")} subtitle={t("invalidSubtitle")} + color="red" > - {t("invalidBody")} -
- - {t("backToLogin")} - -
-
+

+ {t("invalidBody")} +

+ + {t("backToLogin")} + + )} -
+ ); -} +} \ No newline at end of file diff --git a/src/app/loading.tsx b/src/app/loading.tsx index a4c834817b..6457e930a5 100644 --- a/src/app/loading.tsx +++ b/src/app/loading.tsx @@ -1,15 +1,33 @@ export default function RootLoading() { return ( -
-
+
+
+
+
+
+
+
+ {[1, 2, 3].map((i) => ( +
+ ))} +
+
); -} +} \ No newline at end of file diff --git a/src/components/typewriter-text.tsx b/src/components/typewriter-text.tsx index 47e2da422e..c713f4416e 100644 --- a/src/components/typewriter-text.tsx +++ b/src/components/typewriter-text.tsx @@ -10,13 +10,13 @@ export function TypewriterText({ text: string; className?: string; }) { - const [displayed, setDisplayed] = useState(""); - const [done, setDone] = useState(false); + const [displayed, setDisplayed] = useState(text[0] ?? ""); + const [done, setDone] = useState(text.length <= 1); useEffect(() => { - setDisplayed(""); - setDone(false); - let i = 0; + setDisplayed(text[0] ?? ""); + setDone(text.length <= 1); + let i = 1; const id = setInterval(() => { if (i < text.length) { setDisplayed(text.slice(0, i + 1)); @@ -30,13 +30,14 @@ export function TypewriterText({ }, [text]); return ( - - {displayed} - + <> + {text} + + {displayed} + + ); } diff --git a/src/messages/bg.json b/src/messages/bg.json index 64e4dcb336..8fafb501c5 100644 --- a/src/messages/bg.json +++ b/src/messages/bg.json @@ -189,6 +189,7 @@ "newsTitle": "Последни новини", "newsSubtitle": "Току що от хотела", "allNews": "Всички новини →", + "allUsers": "Общност →", "noArticles": "Все още няма статии.", "noPhotos": "Все още няма снимки.", "noUsers": "Няма потребители онлайн", diff --git a/src/messages/cs.json b/src/messages/cs.json index a01bba3876..1eb4261162 100644 --- a/src/messages/cs.json +++ b/src/messages/cs.json @@ -189,6 +189,7 @@ "newsTitle": "Nejnovější zprávy", "newsSubtitle": "Čerstvé z hotelu", "allNews": "Všechny novinky →", + "allUsers": "Komunita →", "noArticles": "Zatím žádné články.", "noPhotos": "Zatím žádné fotky.", "noUsers": "Žádní uživatelé online", diff --git a/src/messages/da.json b/src/messages/da.json index a4b5d07915..88c10770ef 100644 --- a/src/messages/da.json +++ b/src/messages/da.json @@ -189,6 +189,7 @@ "newsTitle": "Seneste nyt", "newsSubtitle": "Frisk fra hotellet", "allNews": "Alle nyheder →", + "allUsers": "Fællesskab →", "noArticles": "Ingen artikler endnu.", "noPhotos": "Ingen billeder endnu.", "noUsers": "Ingen brugere online", diff --git a/src/messages/de.json b/src/messages/de.json index 85b22a8365..ec175d3be1 100644 --- a/src/messages/de.json +++ b/src/messages/de.json @@ -189,6 +189,7 @@ "newsTitle": "Neueste Nachrichten", "newsSubtitle": "Frisch aus dem Hotel", "allNews": "Alle Nachrichten →", + "allUsers": "Community →", "noArticles": "Noch keine Artikel.", "noPhotos": "Noch keine Fotos.", "noUsers": "Keine Benutzer online", diff --git a/src/messages/el.json b/src/messages/el.json index f9f9b82201..9b0bffb3c0 100644 --- a/src/messages/el.json +++ b/src/messages/el.json @@ -189,6 +189,7 @@ "newsTitle": "Τελευταία νέα", "newsSubtitle": "Φρέσκο από το ξενοδοχείο", "allNews": "Όλα τα νέα →", + "allUsers": "Κοινότητα →", "noArticles": "Δεν υπάρχουν ακόμη άρθρα.", "noPhotos": "Δεν υπάρχουν ακόμα φωτογραφίες.", "noUsers": "Δεν υπάρχουν χρήστες στο διαδίκτυο", diff --git a/src/messages/en.json b/src/messages/en.json index 36d3e0b1b6..f274f20ba6 100644 --- a/src/messages/en.json +++ b/src/messages/en.json @@ -232,6 +232,7 @@ "newsTitle": "Latest news", "newsSubtitle": "Fresh from the hotel", "allNews": "All news →", + "allUsers": "Community →", "noArticles": "No articles yet.", "noPhotos": "No photos yet.", "noUsers": "No users online", diff --git a/src/messages/es.json b/src/messages/es.json index 377a6b6b08..226ac39e56 100644 --- a/src/messages/es.json +++ b/src/messages/es.json @@ -189,6 +189,7 @@ "newsTitle": "Últimas noticias", "newsSubtitle": "Lo último del hotel", "allNews": "Todas las noticias →", + "allUsers": "Comunidad →", "noArticles": "Aún no hay artículos.", "noPhotos": "Aún no hay fotos.", "noUsers": "No hay usuarios en línea", diff --git a/src/messages/fr.json b/src/messages/fr.json index e616b0925a..7139802f22 100644 --- a/src/messages/fr.json +++ b/src/messages/fr.json @@ -189,6 +189,7 @@ "newsTitle": "Dernières actualités", "newsSubtitle": "Fraîchement sorties de l'hôtel", "allNews": "Toutes les actualités →", + "allUsers": "Communauté →", "noArticles": "Pas encore d'articles.", "noPhotos": "Pas encore de photos.", "noUsers": "Aucun utilisateur en ligne", diff --git a/src/messages/hr.json b/src/messages/hr.json index 0c2ef1de09..0fe2717073 100644 --- a/src/messages/hr.json +++ b/src/messages/hr.json @@ -189,6 +189,7 @@ "newsTitle": "Najnovije vijesti", "newsSubtitle": "Svježe iz hotela", "allNews": "Sve novosti →", + "allUsers": "Zajednica →", "noArticles": "Još nema članaka.", "noPhotos": "Još nema fotografija.", "noUsers": "Nema korisnika na mreži", diff --git a/src/messages/hu.json b/src/messages/hu.json index d59776b918..9d338f3713 100644 --- a/src/messages/hu.json +++ b/src/messages/hu.json @@ -189,6 +189,7 @@ "newsTitle": "Friss hírek", "newsSubtitle": "Frissen a szállodából", "allNews": "Minden hír →", + "allUsers": "Közösség →", "noArticles": "Még nincsenek cikkek.", "noPhotos": "Még nincsenek fényképek.", "noUsers": "Nincsenek online felhasználók", diff --git a/src/messages/it.json b/src/messages/it.json index 26d972d632..0ae28a225f 100644 --- a/src/messages/it.json +++ b/src/messages/it.json @@ -232,6 +232,7 @@ "newsTitle": "Ultime notizie", "newsSubtitle": "Appena arrivate dall'hotel", "allNews": "Tutte le notizie →", + "allUsers": "Community →", "noArticles": "Ancora nessun articolo.", "noPhotos": "Ancora nessuna foto.", "noUsers": "Nessun utente online", diff --git a/src/messages/nl.json b/src/messages/nl.json index 5c108f1b8a..edc8e69bd3 100644 --- a/src/messages/nl.json +++ b/src/messages/nl.json @@ -232,6 +232,7 @@ "newsTitle": "Laatste nieuws", "newsSubtitle": "Vers van het hotel", "allNews": "Al het nieuws →", + "allUsers": "Community →", "noArticles": "Nog geen artikelen.", "noPhotos": "Nog geen foto's.", "noUsers": "Geen gebruikers online", diff --git a/src/messages/no.json b/src/messages/no.json index a40aa6dab5..ec2e83b1ca 100644 --- a/src/messages/no.json +++ b/src/messages/no.json @@ -189,6 +189,7 @@ "newsTitle": "Siste nytt", "newsSubtitle": "Frisk fra hotellet", "allNews": "Alle nyheter →", + "allUsers": "Fellesskap →", "noArticles": "Ingen artikler ennå.", "noPhotos": "Ingen bilder ennå.", "noUsers": "Ingen brukere online", diff --git a/src/messages/pl.json b/src/messages/pl.json index 7a2730e28e..0e05820d6a 100644 --- a/src/messages/pl.json +++ b/src/messages/pl.json @@ -189,6 +189,7 @@ "newsTitle": "Najnowsze wiadomości", "newsSubtitle": "Świeżo z hotelu", "allNews": "Wszystkie aktualności →", + "allUsers": "Społeczność →", "noArticles": "Nie ma jeszcze artykułów.", "noPhotos": "Nie ma jeszcze zdjęć.", "noUsers": "Brak użytkowników online", diff --git a/src/messages/pt.json b/src/messages/pt.json index b922cbdd84..1e6a44f987 100644 --- a/src/messages/pt.json +++ b/src/messages/pt.json @@ -189,6 +189,7 @@ "newsTitle": "Últimas notícias", "newsSubtitle": "Fresco do hotel", "allNews": "Todas as notícias →", + "allUsers": "Comunidade →", "noArticles": "Nenhum artigo ainda.", "noPhotos": "Ainda não há fotos.", "noUsers": "Nenhum usuário on-line", diff --git a/src/messages/ro.json b/src/messages/ro.json index 89f164c14d..f54b1a25d4 100644 --- a/src/messages/ro.json +++ b/src/messages/ro.json @@ -189,6 +189,7 @@ "newsTitle": "Ultimele știri", "newsSubtitle": "Proaspăt de la hotel", "allNews": "Toate știrile →", + "allUsers": "Comunitate →", "noArticles": "Încă nu există articole.", "noPhotos": "Nicio fotografie încă.", "noUsers": "Niciun utilizator online", diff --git a/src/messages/ru.json b/src/messages/ru.json index a76c54e337..4efb864929 100644 --- a/src/messages/ru.json +++ b/src/messages/ru.json @@ -189,6 +189,7 @@ "newsTitle": "Последние новости", "newsSubtitle": "Только что из отеля", "allNews": "Все новости →", + "allUsers": "Сообщество →", "noArticles": "Статей пока нет.", "noPhotos": "Фотографий пока нет.", "noUsers": "Нет пользователей в сети", diff --git a/src/messages/sk.json b/src/messages/sk.json index 4786fc325d..48d19f9ef7 100644 --- a/src/messages/sk.json +++ b/src/messages/sk.json @@ -189,6 +189,7 @@ "newsTitle": "Najnovšie správy", "newsSubtitle": "Čerstvé z hotela", "allNews": "Všetky novinky →", + "allUsers": "Komunita →", "noArticles": "Zatiaľ žiadne články.", "noPhotos": "Zatiaľ žiadne fotky.", "noUsers": "Žiadni používatelia online", diff --git a/src/messages/sr.json b/src/messages/sr.json index 71a08d5720..26e855c982 100644 --- a/src/messages/sr.json +++ b/src/messages/sr.json @@ -189,6 +189,7 @@ "newsTitle": "Најновије вести", "newsSubtitle": "Свеже из хотела", "allNews": "Све вести →", + "allUsers": "Заједница →", "noArticles": "Још нема чланака.", "noPhotos": "Још нема фотографија.", "noUsers": "Нема корисника на мрежи", diff --git a/src/messages/sv.json b/src/messages/sv.json index 49ab693d6a..974c2051b6 100644 --- a/src/messages/sv.json +++ b/src/messages/sv.json @@ -189,6 +189,7 @@ "newsTitle": "Senaste nyheterna", "newsSubtitle": "Färskt från hotellet", "allNews": "Alla nyheter →", + "allUsers": "Community →", "noArticles": "Inga artiklar ännu.", "noPhotos": "Inga foton än.", "noUsers": "Inga användare online", diff --git a/src/messages/tr.json b/src/messages/tr.json index 9a9ceae41a..a8273f7092 100644 --- a/src/messages/tr.json +++ b/src/messages/tr.json @@ -189,6 +189,7 @@ "newsTitle": "En son haberler", "newsSubtitle": "Otelden yeni çıkmış", "allNews": "Tüm haberler →", + "allUsers": "Topluluk →", "noArticles": "Henüz makale yok.", "noPhotos": "Henüz fotoğraf yok.", "noUsers": "Çevrimiçi kullanıcı yok", diff --git a/src/messages/uk.json b/src/messages/uk.json index 7c77b27150..e3d5c4b801 100644 --- a/src/messages/uk.json +++ b/src/messages/uk.json @@ -189,6 +189,7 @@ "newsTitle": "Останні новини", "newsSubtitle": "Щойно з готелю", "allNews": "Всі новини →", + "allUsers": "Спільнота →", "noArticles": "Ще немає статей.", "noPhotos": "Фото ще немає.", "noUsers": "Немає користувачів онлайн",