fix(backup): one config-fields grid for location fields, divider under config-backup banner

Render a backup location's connection fields in a single .config-fields grid like /config's renderer, instead of chunking every 3 fields. The chunking left ragged blocks whose columns stopped lining up once any field was hidden (PATH_MODE/SSH/etc.) — the grid handles row layout and drops hidden fields cleanly. Also add a config-divider below the "Keep your config backed up offline" warning banner.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
librelad 2026-05-22 13:46:03 +01:00
parent b448bcd431
commit a7aa050528

View File

@ -772,6 +772,7 @@ class BackupPage {
Export Repository Passwords
</button>
</div>
<div class="config-divider"></div>
<div id="config-section" class="backup-embedded-config"></div>
`;
@ -1280,18 +1281,17 @@ class BackupPage {
KEEP_YEARLY: loc.keep_yearly
};
// Single .config-fields grid, exactly like /config's renderer — the grid
// (repeat(3, 1fr)) handles the row layout itself, and hidden fields
// (PATH_MODE/SSH/etc.) drop out cleanly without leaving column gaps.
let html = '<div class="config-fields">';
let inBlock = 0;
for (const suffix of suffixes) {
const def = BACKUP_LOC_FIELD_DEFS[suffix];
if (!def) continue;
const key = `CFG_BACKUP_LOC_${idx}_${suffix}`;
const value = (locValueLookup[suffix] ?? '').toString();
const fieldId = `config-${key}`;
// Three-up grouping mirrors /config's row layout.
if (inBlock > 0 && inBlock % 3 === 0) html += '</div><div class="config-fields">';
html += ConfigShared.generateField(fieldId, key, value, def.title, def.description, {}, {});
inBlock++;
}
html += '</div>';
return html;