Fix error panel buttons to display side by side

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-02-02 11:33:42 -08:00
parent eff2635725
commit c264969016
2 changed files with 12 additions and 3 deletions

View File

@@ -289,20 +289,24 @@ export function updateErrorPanel() {
timestampEl.textContent = 'First: ' + formatLocalTime(err.first_seen) + ' / Last: ' + formatLocalTime(err.last_seen);
item.appendChild(timestampEl);
const buttonsEl = document.createElement('div');
buttonsEl.className = 'error-buttons';
const node = tableData?.nodes?.find(n => n.id === err.node_id);
if (node && node.unreachable && !node.in_config) {
const removeBtn = document.createElement('button');
removeBtn.className = 'remove-btn';
removeBtn.textContent = 'Remove node';
removeBtn.addEventListener('click', () => removeNode(err.node_id));
item.appendChild(removeBtn);
buttonsEl.appendChild(removeBtn);
}
const dismissBtn = document.createElement('button');
dismissBtn.textContent = 'Dismiss';
dismissBtn.addEventListener('click', () => clearError(err.id));
item.appendChild(dismissBtn);
buttonsEl.appendChild(dismissBtn);
item.appendChild(buttonsEl);
listEl.appendChild(item);
});
}

View File

@@ -1157,8 +1157,13 @@ body.sacn-mode .node:not(.sacn-out):not(.sacn-in):hover .node-info-wrapper {
margin-top: 2px;
}
.error-item button {
.error-item .error-buttons {
display: flex;
gap: 6px;
align-self: flex-end;
}
.error-item button {
padding: 2px 6px;
border: none;
background: #555;