Spaces:
Sleeping
Sleeping
Gaurav vashistha commited on
Commit ·
02b24fc
1
Parent(s): 80c48aa
fix: robust history toggle logic
Browse files
stitch_continuity_dashboard/code.html
CHANGED
|
@@ -268,24 +268,22 @@
|
|
| 268 |
|
| 269 |
// Init
|
| 270 |
loadPreferences();
|
| 271 |
-
const drawer = document.getElementById('gallery-drawer');
|
| 272 |
-
const overlay = document.getElementById('drawer-overlay');
|
| 273 |
|
| 274 |
function toggleDrawer(show) {
|
|
|
|
|
|
|
|
|
|
| 275 |
if (show) {
|
| 276 |
-
// Ensure drawer exists
|
| 277 |
-
const d = document.getElementById('gallery-drawer');
|
| 278 |
-
const o = document.getElementById('drawer-overlay');
|
| 279 |
if (d && o) {
|
| 280 |
-
d.classList.
|
|
|
|
| 281 |
o.classList.remove('hidden');
|
| 282 |
fetchHistory();
|
| 283 |
}
|
| 284 |
} else {
|
| 285 |
-
const d = document.getElementById('gallery-drawer');
|
| 286 |
-
const o = document.getElementById('drawer-overlay');
|
| 287 |
if (d && o) {
|
| 288 |
-
d.classList.
|
|
|
|
| 289 |
o.classList.add('hidden');
|
| 290 |
}
|
| 291 |
}
|
|
|
|
| 268 |
|
| 269 |
// Init
|
| 270 |
loadPreferences();
|
|
|
|
|
|
|
| 271 |
|
| 272 |
function toggleDrawer(show) {
|
| 273 |
+
const d = document.getElementById('gallery-drawer');
|
| 274 |
+
const o = document.getElementById('drawer-overlay');
|
| 275 |
+
|
| 276 |
if (show) {
|
|
|
|
|
|
|
|
|
|
| 277 |
if (d && o) {
|
| 278 |
+
d.classList.remove('drawer-closed');
|
| 279 |
+
d.classList.add('drawer-open');
|
| 280 |
o.classList.remove('hidden');
|
| 281 |
fetchHistory();
|
| 282 |
}
|
| 283 |
} else {
|
|
|
|
|
|
|
| 284 |
if (d && o) {
|
| 285 |
+
d.classList.remove('drawer-open');
|
| 286 |
+
d.classList.add('drawer-closed');
|
| 287 |
o.classList.add('hidden');
|
| 288 |
}
|
| 289 |
}
|