(cardId, zoneId)
| 53 | localStorage.setItem(LAYOUT_KEY, JSON.stringify(layout || {})); |
| 54 | } |
| 55 | function setLayoutFor(cardId, zoneId) { |
| 56 | const layout = readLayout(); |
| 57 | const prevZone = layout[cardId]; |
| 58 | layout[cardId] = zoneId; |
| 59 | if (ORDER_TRACKED_ZONES.includes(zoneId)) captureZoneOrder(layout, zoneId); |
| 60 | if ( |
| 61 | prevZone && |
| 62 | prevZone !== zoneId && |
| 63 | ORDER_TRACKED_ZONES.includes(prevZone) |
| 64 | ) { |
| 65 | captureZoneOrder(layout, prevZone); |
| 66 | } |
| 67 | writeLayout(layout); |
| 68 | } |
| 69 | |
| 70 | function themeToggleButton(btn) { |
| 71 | if (!btn) return; |
no test coverage detected