Route fuzz: leave the link panel's header city links out of the buttons both pages offer
They only change the view, and main's page has plain text there, so offering them would make the two pages diverge on a screen that routes the same.
This commit is contained in:
parent
d086fcbd92
commit
870227100d
1 changed files with 3 additions and 1 deletions
|
|
@ -56,7 +56,9 @@
|
|||
const screen = (w) => {
|
||||
if (w.where === 'modal') return btns($('modal'));
|
||||
if (w.where === 'city') { UI.sel = { type: 'city', id: w.city }; UI.tab = w.tab; renderAll(); return btns($('panel')); }
|
||||
if (w.where === 'link') { if (!S.links.some((l) => l.id === w.id)) return []; UI.sel = { type: 'link', id: w.id }; renderAll(); return btns($('panel')); }
|
||||
// The city names in a link panel's header open the city (#196); older pages have plain text there. They only change
|
||||
// the view, so neither page offers them, and both stay in lockstep.
|
||||
if (w.where === 'link') { if (!S.links.some((l) => l.id === w.id)) return []; UI.sel = { type: 'link', id: w.id }; renderAll(); const P = $('panel'); for (const h of P.querySelectorAll('.ph h2 [data-act]')) h.removeAttribute('data-act'); return btns(P); }
|
||||
if (w.where === 'dash') { $('dash').hidden = false; UI.dtab = w.tab; renderDash(); const b = btns($('dash')); return b; }
|
||||
if (w.where === 'left') {
|
||||
UI.left = w.tab; UI.leftOpen = true; renderLeft(); let b = btns($('leftBody'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue