feat(ui): offline-first foundations — bundled dicts + local-guest identity
The additive groundwork for the native offline-first experience (ANDROID_PLAN.md §D). Inert until the native cold-boot lands: on the web these paths never fire, so web / VK / Telegram behaviour is unchanged. - ui/scripts/bundle-dicts.mjs copies the scrabble-dictionary release DAWGs into dist/dict/<variant>@<version>.dawg for the native pipeline (run after `pnpm build`, before `cap sync`). - The dict loader gains a bundled tier between the IndexedDB and network tiers, attempted only on a native channel (a packaged app serves ./dict/<key>.dawg from its assets). Native-gated rather than the plan's "404 on the web" because the relative path would otherwise hit the gateway's own session-gated /dict/ route. - __DICT_VERSION__ Vite define (from VITE_DICT_VERSION, default "dev") + its ambient declaration; the offline vs_ai / hotseat creates in NewGame fall back to it when a device-local guest has no profile-advertised version. - New lib/localguest.ts: a persisted device-local guest id (no DB row); the offline vs_ai human seat uses it (and the localized common.guest name) when there is no server session. svelte-check clean, vitest green, native + web builds clean. The cold-boot rewrite, reconciliation, the Profile soft-sign-in gating and the offline-first e2e follow.
This commit is contained in:
@@ -34,6 +34,7 @@ export const en = {
|
||||
'common.loading': 'Loading…',
|
||||
'common.retry': 'Retry',
|
||||
'common.you': 'You',
|
||||
'common.guest': 'Guest',
|
||||
'common.save': 'Save',
|
||||
|
||||
'login.title': 'Sign in',
|
||||
|
||||
@@ -35,6 +35,7 @@ export const ru: Record<MessageKey, string> = {
|
||||
'common.loading': 'Загрузка…',
|
||||
'common.retry': 'Повторить',
|
||||
'common.you': 'Вы',
|
||||
'common.guest': 'Гость',
|
||||
'common.save': 'Сохранить',
|
||||
|
||||
'login.title': 'Вход',
|
||||
|
||||
Reference in New Issue
Block a user