ui: make Tech Debt and Resolved Errors visually distinct with styled badges

This commit is contained in:
Riz Ashraf committed 2026-09-29 18:50:11 +01:00
1 parent 4c8e2f6414
commit 6b25592c1b
1 file changed
+11 -5
+11 -5
View File
@@ -21,9 +21,12 @@
--btn-border: #dcdde1; --btn-border: #dcdde1;
--btn-hover: #f8f9fa; --btn-hover: #f8f9fa;
--search-hover: #f0f2f5; --search-hover: #f0f2f5;
--input-bg: white;
--input-text: #2c3e50; --input-text: #2c3e50;
--inspector-bg: rgba(255,255,255,0.98); --inspector-bg: rgba(255,255,255,0.98);
--success-color: #27ae60;
--warning-color: #f39c12;
--error-color: #e74c3c;
--open-color: #e67e22;
} }
[data-theme="dark"] { [data-theme="dark"] {
@@ -42,9 +45,12 @@
--btn-border: #3d4a57; --btn-border: #3d4a57;
--btn-hover: #3d4a57; --btn-hover: #3d4a57;
--search-hover: #2c3643; --search-hover: #2c3643;
--input-bg: #171b21;
--input-text: #d1d8e0; --input-text: #d1d8e0;
--inspector-bg: rgba(30, 36, 43, 0.98); --inspector-bg: rgba(30, 36, 43, 0.98);
--success-color: #2ecc71;
--warning-color: #f1c40f;
--error-color: #e74c3c;
--open-color: #e67e22;
} }
body { body {
@@ -1133,7 +1139,7 @@
`); `);
loadGenericList('/api/tech_debts', 'techdebt-container', item => ` loadGenericList('/api/tech_debts', 'techdebt-container', item => `
<strong>${item.id}</strong> ${item.is_resolved ? '<span style="color:var(--success-color);">(Resolved)</span>' : '<span style="color:var(--error-color);">(Open)</span>'} <strong>${item.id}</strong> ${item.is_resolved ? '<span style="color:var(--success-color); font-weight:bold; background: rgba(46, 204, 113, 0.1); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--success-color); margin-left: 8px;">(Resolved)</span>' : '<span style="color:var(--open-color); font-weight:bold; background: rgba(230, 126, 34, 0.1); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--open-color); margin-left: 8px;">(Open)</span>'}
<div style="margin-top:5px;"><strong>Description:</strong> ${item.description}</div> <div style="margin-top:5px;"><strong>Description:</strong> ${item.description}</div>
<div style="margin-top:5px;"><strong>Ideal Solution:</strong> ${item.ideal_solution}</div> <div style="margin-top:5px;"><strong>Ideal Solution:</strong> ${item.ideal_solution}</div>
<div style="margin-top:10px;"> <div style="margin-top:10px;">
@@ -1143,8 +1149,8 @@
`); `);
loadGenericList('/api/error_fixes', 'errorfixes-container', item => ` loadGenericList('/api/error_fixes', 'errorfixes-container', item => `
<strong>${item.signature || 'Error'}</strong> <strong>${item.signature || 'Error'}</strong> <span style="color:var(--success-color); font-weight:bold; background: rgba(46, 204, 113, 0.1); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--success-color); margin-left: 8px;">(Resolved)</span>
<div style="font-size:0.9em; margin-bottom:8px;"><em>Solution:</em> ${item.solution || ''}</div> <div style="font-size:0.9em; margin-bottom:8px; margin-top:5px;"><em>Solution:</em> ${item.solution || ''}</div>
<div style="font-family:monospace; font-size:0.85em; color:#e74c3c;">Commit: ${item.git_commit || 'None'}</div> <div style="font-family:monospace; font-size:0.85em; color:#e74c3c;">Commit: ${item.git_commit || 'None'}</div>
`); `);