Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5689f7f6a3 |
@@ -20,7 +20,7 @@
|
||||
const m = await import('../lib/dict');
|
||||
const list = await m.listCachedDicts();
|
||||
const cached = list.length ? list.map((d) => `${d.key}=${(d.bytes / 1024).toFixed(0)}KB`).join(' ') : 'none';
|
||||
dictInfo = `local eval: ${m.LOCAL_EVAL_ENABLED ? 'on' : 'off'} breaker: ${m.dictLoadingDisabled() ? 'TRIPPED' : 'ok'}\ndicts cached: ${cached}`;
|
||||
dictInfo = `dict breaker: ${m.dictLoadingDisabled() ? 'TRIPPED' : 'ok'}\ndicts cached: ${cached}`;
|
||||
} catch {
|
||||
dictInfo = 'local eval: n/a';
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
// must never see the warm-up overlay, which would intercept the e2e's taps).
|
||||
if (import.meta.env.MODE !== 'mock') {
|
||||
void import('../lib/dict').then((m) => {
|
||||
if (m.LOCAL_EVAL_ENABLED) dict = m;
|
||||
dict = m;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
// Feature flag for the on-device move preview (the local eval). Default on; append
|
||||
// `?nolocal` to the URL to force the network preview instead, for a side-by-side
|
||||
// check on the test contour. The network preview is always the fallback, so
|
||||
// disabling the flag only removes the acceleration, never the feature.
|
||||
export const LOCAL_EVAL_ENABLED =
|
||||
typeof location === 'undefined' || !new URLSearchParams(location.search).has('nolocal');
|
||||
@@ -5,4 +5,3 @@
|
||||
export { evaluateLocal } from './eval';
|
||||
export { getDawg, peekDawg, hasDawg, dictLoadingDisabled, noteDictMiss, clearDictInstances, bustDictHttpCache } from './loader';
|
||||
export { clearDictCache, listCachedDicts } from './store';
|
||||
export { LOCAL_EVAL_ENABLED } from './config';
|
||||
|
||||
Reference in New Issue
Block a user