Stage 7 (wip): UI shell, libs, mock transport, screens (lobby->game), e2e smoke

- plain Svelte 5 + TS + Vite (no SvelteKit); CSS-token design system (Telegram-ready), hash router, IndexedDB session
- pure libs: domain model, premium/value maps ported from solver, board replay, placement state machine, i18n en/ru
- in-memory mock transport + seed data; pnpm start runs lobby->active game->board with no backend
- board: pointer-drag + tap placement, MakeMove (popup / 1s-hold commit), two-state zoom, blank chooser, exchange, hint, word-check, chat
- Playwright smoke (mock) green; svelte-check clean; mock bundle ~37 KB gzip
This commit is contained in:
Ilia Denisov
2026-06-03 00:32:50 +02:00
parent 19ae8f04a2
commit 453ddc5e94
48 changed files with 5696 additions and 0 deletions
+67
View File
@@ -0,0 +1,67 @@
<script lang="ts">
import Header from '../components/Header.svelte';
import { app, logout } from '../lib/app.svelte';
import { t } from '../lib/i18n/index.svelte';
</script>
<Header title={t('profile.title')} back="/" />
<main class="page">
{#if app.profile}
<div class="name">{app.profile.displayName}</div>
{#if app.profile.isGuest}<span class="badge">{t('profile.guest')}</span>{/if}
<dl>
<dt>{t('profile.language')}</dt>
<dd>{app.profile.preferredLanguage}</dd>
<dt>{t('profile.timezone')}</dt>
<dd>{app.profile.timeZone}</dd>
<dt>{t('profile.hintBalance')}</dt>
<dd>{app.profile.hintBalance}</dd>
</dl>
<p class="muted">{t('profile.readonly')}</p>
<button class="logout" onclick={() => logout()}>{t('login.title')} / logout</button>
{/if}
</main>
<style>
.page {
padding: var(--pad);
}
.name {
font-size: 1.4rem;
font-weight: 700;
}
.badge {
display: inline-block;
margin-top: 4px;
padding: 2px 8px;
border-radius: 999px;
background: var(--surface-2);
color: var(--text-muted);
font-size: 0.8rem;
}
dl {
display: grid;
grid-template-columns: auto 1fr;
gap: 6px 16px;
margin: 20px 0;
}
dt {
color: var(--text-muted);
}
dd {
margin: 0;
text-align: right;
}
.muted {
color: var(--text-muted);
font-size: 0.9rem;
}
.logout {
margin-top: 16px;
padding: 8px 14px;
border: 1px solid var(--border);
background: var(--surface);
color: var(--text);
border-radius: var(--radius-sm);
}
</style>