Sync dock panel visibility fix
This commit is contained in:
parent
c80dee98a7
commit
2f28570334
@ -81,6 +81,7 @@ style.textContent = `
|
||||
font-family: Georgia, 'Times New Roman', serif;
|
||||
}
|
||||
#dock-overlay[hidden] { display: none; }
|
||||
#dock-overlay [hidden] { display: none !important; }
|
||||
.dock-backdrop {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@ -239,7 +240,11 @@ const panels = [...overlay.querySelectorAll('[data-panel]')];
|
||||
let latestState = null;
|
||||
|
||||
const setPanel = (name = 'home') => {
|
||||
panels.forEach((panel) => { panel.hidden = panel.dataset.panel !== name; });
|
||||
panels.forEach((panel) => {
|
||||
const active = panel.dataset.panel === name;
|
||||
panel.hidden = !active;
|
||||
panel.setAttribute('aria-hidden', active ? 'false' : 'true');
|
||||
});
|
||||
};
|
||||
|
||||
const actionButton = (label, action, extra = {}, disabled = false) => {
|
||||
|
||||
@ -280,6 +280,9 @@ test('mobile controls enter a dock hub before shipyard, trade, or missions', asy
|
||||
assert.match(dockUi, /MISSIONS/);
|
||||
assert.match(dockUi, /TRADE/);
|
||||
assert.match(dockUi, /SHIPYARD/);
|
||||
assert.match(dockUi, /#dock-overlay \[hidden\] \{ display: none !important; \}/);
|
||||
assert.match(dockUi, /panel\.hidden = !active/);
|
||||
assert.match(dockUi, /panel\.setAttribute\('aria-hidden'/);
|
||||
assert.match(dockUi, /dispatchAction\('open-shipyard'\)/);
|
||||
assert.match(hud, /buyButton\.textContent = badges\.length/);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user