()
| 1109 | sb.style.display = (isZonesCollapsed() || !any) ? 'none' : 'block'; |
| 1110 | } |
| 1111 | function updateTopZoneLayout() { |
| 1112 | const top = getTopZone(); |
| 1113 | const left = getLeftCol(); |
| 1114 | const right = getRightCol(); |
| 1115 | const hasUpload = !!top?.querySelector('#uploadCard'); |
| 1116 | const hasFolder = !!top?.querySelector('#folderManagementCard'); |
| 1117 | |
| 1118 | if (left && right) { |
| 1119 | if (hasUpload && !hasFolder) { |
| 1120 | right.style.display = 'none'; |
| 1121 | left.style.display = ''; |
| 1122 | left.style.margin = '0 auto'; |
| 1123 | } else if (!hasUpload && hasFolder) { |
| 1124 | left.style.display = 'none'; |
| 1125 | right.style.display = ''; |
| 1126 | right.style.margin = '0 auto'; |
| 1127 | } else { |
| 1128 | left.style.display = ''; |
| 1129 | right.style.display = ''; |
| 1130 | left.style.margin = ''; |
| 1131 | right.style.margin = ''; |
| 1132 | } |
| 1133 | } |
| 1134 | if (top) top.style.display = (hasUpload || hasFolder) ? '' : 'none'; |
| 1135 | } |
| 1136 | |
| 1137 | // --- sidebar placeholder while dragging (only when empty) --- |
| 1138 | function ensureSidebarPlaceholder() { |
no test coverage detected