Extract hardcoded rgba colors and inline styles to CSS classes
- Add .inline-error and .inline-warning utility classes to dashboard.css with correctly-matched terminal palette rgba values (replaces off-palette rgba(231,76,60,0.1) and rgba(241,196,15,0.1)) - Add .key-generated-alert class for the new API key display frame - Add base .dependency-item, .dependency-group h4, .dependency-item a, .dependency-title, .btn-small overrides to ticket.css - Remove all inline styles from the dependency list template in ticket.js — layout, colors, and sizing now come from CSS classes - Update CreateTicketView.php and ApiKeysView.php to use the new classes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4642,6 +4642,27 @@ table td:nth-child(4) {
|
||||
border-top: 1px solid var(--terminal-green);
|
||||
}
|
||||
|
||||
/* ===== INLINE ALERT BOXES ===== */
|
||||
|
||||
.inline-error {
|
||||
color: var(--priority-1);
|
||||
border: 2px solid var(--priority-1);
|
||||
padding: 1rem;
|
||||
background: rgba(255, 68, 68, 0.1);
|
||||
}
|
||||
|
||||
.inline-warning {
|
||||
border: 2px solid var(--terminal-amber);
|
||||
background: rgba(255, 176, 0, 0.1);
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
/* New API key display — amber tinted alert frame */
|
||||
.key-generated-alert {
|
||||
background: rgba(255, 176, 0, 0.1);
|
||||
border-color: var(--terminal-amber);
|
||||
}
|
||||
|
||||
/* ===== RELATIVE TIMESTAMP CELLS ===== */
|
||||
|
||||
/* Inline spans with data-ts show relative time; title attr has the full date */
|
||||
|
||||
@@ -2139,6 +2139,38 @@ span.ts-cell {
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
/* Dependency list items */
|
||||
.dependency-group h4 {
|
||||
color: var(--terminal-amber);
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
|
||||
.dependency-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0.5rem;
|
||||
border-bottom: 1px dashed var(--terminal-green-dim);
|
||||
}
|
||||
|
||||
.dependency-item a {
|
||||
color: var(--terminal-green);
|
||||
}
|
||||
|
||||
.dependency-item .dependency-title {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
.dependency-item .status-badge {
|
||||
margin-left: 0.5rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.dependency-item .btn-small {
|
||||
padding: 0.25rem 0.5rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
/* Upload progress */
|
||||
.upload-progress {
|
||||
margin-top: 1rem;
|
||||
|
||||
@@ -627,19 +627,19 @@ function renderDependencies(dependencies) {
|
||||
if (items.length > 0) {
|
||||
hasAny = true;
|
||||
html += `<div class="dependency-group">
|
||||
<h4 style="color: var(--terminal-amber); margin: 0.5rem 0;">${typeLabels[type]}</h4>`;
|
||||
<h4>${typeLabels[type]}</h4>`;
|
||||
|
||||
items.forEach(dep => {
|
||||
const statusClass = 'status-' + dep.status.toLowerCase().replace(/ /g, '-');
|
||||
html += `<div class="dependency-item" style="display: flex; justify-content: space-between; align-items: center; padding: 0.5rem; border-bottom: 1px dashed var(--terminal-green-dim);">
|
||||
html += `<div class="dependency-item">
|
||||
<div>
|
||||
<a href="/ticket/${lt.escHtml(dep.depends_on_id)}" style="color: var(--terminal-green);">
|
||||
<a href="/ticket/${lt.escHtml(dep.depends_on_id)}">
|
||||
#${lt.escHtml(dep.depends_on_id)}
|
||||
</a>
|
||||
<span style="margin-left: 0.5rem;">${lt.escHtml(dep.title)}</span>
|
||||
<span class="status-badge ${statusClass}" style="margin-left: 0.5rem; font-size: 0.8rem;">${lt.escHtml(dep.status)}</span>
|
||||
<span class="dependency-title">${lt.escHtml(dep.title)}</span>
|
||||
<span class="status-badge ${statusClass}">${lt.escHtml(dep.status)}</span>
|
||||
</div>
|
||||
<button data-action="remove-dependency" data-dependency-id="${dep.dependency_id}" class="btn btn-small" style="padding: 0.25rem 0.5rem; font-size: 0.8rem;">REMOVE</button>
|
||||
<button data-action="remove-dependency" data-dependency-id="${dep.dependency_id}" class="btn btn-small">REMOVE</button>
|
||||
</div>`;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user