feat(ui): explicit offline state inside an online game (+ offline word check) #260

Merged
developer merged 4 commits from feature/offline-ingame-ux into development 2026-07-14 07:51:08 +00:00
Showing only changes of commit c522e77599 - Show all commits
+3 -1
View File
@@ -3,7 +3,6 @@
import { gateway } from '../lib/gateway';
import { gameSource, isLocalGameId } from '../lib/gamesource';
import { connection } from '../lib/connection.svelte';
import { localWordCheck } from '../lib/dict/check';
import { handleError, showToast } from '../lib/app.svelte';
import { t } from '../lib/i18n/index.svelte';
import { alphabetLetters } from '../lib/alphabet';
@@ -57,6 +56,9 @@
// pinned dictionary read on-device: exact when that dawg is cached/bundled, otherwise the check
// is unavailable. A local game already resolves checkWord on-device, so it keeps that path.
if (!isLocalGameId(id) && !connection.online) {
// Dynamically imported so the dawg reader/loader stays out of the app entry bundle (the dict
// subsystem is lazy everywhere else too); it loads only when an offline check actually runs.
const { localWordCheck } = await import('../lib/dict/check');
const legal = await localWordCheck(variant, dictVersion, w);
if (legal === null) {
result = null;