From e5cdf43e370c929d297099b96f367c05f411a4e5 Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Wed, 28 Oct 2026 19:04:21 +0100 Subject: [PATCH] feat: styled app shell, toasts, auth and world pages Co-Authored-By: Claude Opus 5.5 --- app/app.vue | 80 ++++++++++++++++++++++++++-------- app/components/ui/AuthCard.vue | 26 +++++++++++ app/pages/login.vue | 31 +++++++------ app/pages/register.vue | 38 ++++++++-------- app/pages/worlds.vue | 69 +++++++++++++++++------------ i18n/locales/en.ts | 1 + i18n/pages/auth.ts | 1 + i18n/pages/worlds.ts | 3 ++ 8 files changed, 173 insertions(+), 76 deletions(-) create mode 100644 app/components/ui/AuthCard.vue diff --git a/app/app.vue b/app/app.vue index 2615485..908be7f 100644 --- a/app/app.vue +++ b/app/app.vue @@ -4,33 +4,79 @@ const { user, logout } = useAuth() const notices = useNotices() const connection = computed(() => - isMockServer ? t('app.mock') : ws.is_opened.value ? t('app.connected') : t('app.offline'), + isMockServer + ? { text: t('app.mock'), tone: 'bg-amber-100 text-amber-800' } + : ws.is_opened.value + ? { text: t('app.connected'), tone: 'bg-emerald-100 text-emerald-800' } + : { text: t('app.offline'), tone: 'bg-rose-100 text-rose-800' }, ) +const toastTone = { + success: 'border-emerald-200 bg-emerald-50 text-emerald-900', + error: 'border-rose-200 bg-rose-50 text-rose-900', + warning: 'border-amber-200 bg-amber-50 text-amber-900', + info: 'border-parchment-300 bg-white text-ink-900', +} + useHead({ title: () => t('app.title') }) diff --git a/app/components/ui/AuthCard.vue b/app/components/ui/AuthCard.vue new file mode 100644 index 0000000..c4333ee --- /dev/null +++ b/app/components/ui/AuthCard.vue @@ -0,0 +1,26 @@ + + + + diff --git a/app/pages/login.vue b/app/pages/login.vue index b534cd1..9476995 100644 --- a/app/pages/login.vue +++ b/app/pages/login.vue @@ -23,19 +23,22 @@ async function submit() { diff --git a/app/pages/register.vue b/app/pages/register.vue index c4fc8b9..dd594ff 100644 --- a/app/pages/register.vue +++ b/app/pages/register.vue @@ -24,22 +24,26 @@ async function submit() { diff --git a/app/pages/worlds.vue b/app/pages/worlds.vue index d4584a4..2a6559a 100644 --- a/app/pages/worlds.vue +++ b/app/pages/worlds.vue @@ -16,33 +16,46 @@ async function resetMock() { diff --git a/i18n/locales/en.ts b/i18n/locales/en.ts index d39c275..76ca9df 100644 --- a/i18n/locales/en.ts +++ b/i18n/locales/en.ts @@ -9,6 +9,7 @@ export default { }, common: { loading: 'Loading…', + clear: 'Clear', }, resources: { wood: 'Wood', diff --git a/i18n/pages/auth.ts b/i18n/pages/auth.ts index b3115ff..ffb7f0f 100644 --- a/i18n/pages/auth.ts +++ b/i18n/pages/auth.ts @@ -7,6 +7,7 @@ export default { email: 'Email', password: 'Password', mock_hint: 'Mock server: any email and password work.', + tagline: 'Plan your village, one building at a time.', login: { title: 'Log in', submit: 'Log in', diff --git a/i18n/pages/worlds.ts b/i18n/pages/worlds.ts index b5e668c..38b237b 100644 --- a/i18n/pages/worlds.ts +++ b/i18n/pages/worlds.ts @@ -4,8 +4,11 @@ export default { en: { worlds: { title: 'Worlds', + subtitle: 'Each world has its own map, speed and players.', name: 'World', speed: 'Speed', + speed_value: 'Speed {speed}×', + joined: 'Your village is here', village: 'Your village', join: 'Join', open: 'Open village',