Keep lobby settings next to the guide when install controls appear (#413)

This commit is contained in:
sganggs committed 2026-10-09 23:57:05 +08:00
1 parent f3658a0dd4
commit 77cd29f07a
3 files changed
+9 -3

No files matched your search

+4
View File
@@ -271,6 +271,10 @@ same offer once. See [the prompt API](https://developer.mozilla.org/en-US/docs/W
and [installability requirements](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable). and [installability requirements](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable).
The existing original fortress favicon supplies correctly sized 192/512 px icons, shipped outside optional game art. The existing original fortress favicon supplies correctly sized 192/512 px icons, shipped outside optional game art.
No service worker or offline cache is installed; the server is still required. No service worker or offline cache is installed; the server is still required.
The lobby keeps Settings immediately before How to Play even when the optional install/recovery buttons appear;
the full browser run caught and corrected an initial insertion between that established pair.
The settings-entry check tests the absent board-style/background-music option labels, allowing the text-size help
to explain that the board keeps its scale.
Tests: offer lifecycle/disposal, actual PNG dimensions, real Chrome manifest and installability checks, and a synthetic Tests: offer lifecycle/disposal, actual PNG dimensions, real Chrome manifest and installability checks, and a synthetic
dismissed offer through the actual button. Initial incognito rejection was a test-environment limitation; the real dismissed offer through the actual button. Initial incognito rejection was a test-environment limitation; the real
+1 -1
View File
@@ -316,9 +316,9 @@ export function LobbyScreen() {
</div> </div>
<div class="topbar__right"> <div class="topbar__right">
<${Button} variant="secondary" size="sm" icon="chart" class="stats-entry" onClick=${openStats} title=${t('统计数据')} aria-label=${t('统计数据')}>${t('统计')}<//> <${Button} variant="secondary" size="sm" icon="chart" class="stats-entry" onClick=${openStats} title=${t('统计数据')} aria-label=${t('统计数据')}>${t('统计')}<//>
<${SettingsButton} class="lobby-settings" variant="secondary" label=${t('设置')} />
<${ResumeMatchButton} /> <${ResumeMatchButton} />
<${PwaInstallButton} class="lobby-pwa" /> <${PwaInstallButton} class="lobby-pwa" />
<${SettingsButton} class="lobby-settings" variant="secondary" label=${t('设置')} />
<${GuideButton} class="lobby-guide" variant="secondary" label=${t('玩法说明')} /> <${GuideButton} class="lobby-guide" variant="secondary" label=${t('玩法说明')} />
<${LoadoutButton} from="lobby" size="sm" class="lobby-loadout" label=${t('干员调配')} /> <${LoadoutButton} from="lobby" size="sm" class="lobby-loadout" label=${t('干员调配')} />
<div class="me-chip"> <div class="me-chip">
+4 -2
View File
@@ -61,8 +61,10 @@ describe('the settings entry of the lobby and the room', { skip: !ENABLED && 'se
assert.match(text, /设置/); assert.match(text, /设置/);
assert.match(text, /背景音乐/); assert.match(text, /背景音乐/);
assert.match(text, /快捷键/); assert.match(text, /快捷键/);
assert.doesNotMatch(text, /棋盘/, 'no board-style option (declined)'); // The text-size hint mentions the unchanged board scale; the declined options concern controls, not help copy.
assert.doesNotMatch(text, /后台/, 'no background-music option (declined)'); const optionLabels = await page.$$eval('.modal .set-row__label', (nodes) => nodes.map((n) => n.textContent).join(' '));
assert.doesNotMatch(optionLabels, /棋盘/, 'no board-style option (declined)');
assert.doesNotMatch(optionLabels, /后台/, 'no background-music option (declined)');
await page.keyboard.press('Escape'); await page.keyboard.press('Escape');
await sleep(300); await sleep(300);
assert.equal(await modalText(page), null, 'Esc closes it'); assert.equal(await modalText(page), null, 'Esc closes it');