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>`;
|
||||
});
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ $nonce = SecurityHeadersMiddleware::getNonce();
|
||||
<!-- ERROR SECTION -->
|
||||
<div class="ascii-content">
|
||||
<div class="ascii-frame-inner">
|
||||
<div class="error-message" style="color: var(--priority-1); border: 2px solid var(--priority-1); padding: 1rem; background: rgba(231, 76, 60, 0.1);">
|
||||
<div class="error-message inline-error">
|
||||
<strong>[ ! ] ERROR:</strong> <?php echo htmlspecialchars($error, ENT_QUOTES, 'UTF-8'); ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -109,7 +109,7 @@ $nonce = SecurityHeadersMiddleware::getNonce();
|
||||
<input type="text" id="title" name="title" class="editable" required placeholder="Enter a descriptive title for this ticket">
|
||||
</div>
|
||||
<!-- Duplicate Warning Area -->
|
||||
<div id="duplicateWarning" role="alert" aria-live="polite" aria-atomic="true" style="display: none; margin-top: 1rem; padding: 1rem; border: 2px solid var(--terminal-amber); background: rgba(241, 196, 15, 0.1);">
|
||||
<div id="duplicateWarning" class="inline-warning" role="alert" aria-live="polite" aria-atomic="true" style="display: none; margin-top: 1rem;">
|
||||
<div style="color: var(--terminal-amber); font-weight: bold; margin-bottom: 0.5rem;">
|
||||
Possible Duplicates Found
|
||||
</div>
|
||||
|
||||
@@ -67,7 +67,7 @@ $nonce = SecurityHeadersMiddleware::getNonce();
|
||||
</div>
|
||||
|
||||
<!-- New Key Display (hidden by default) -->
|
||||
<div id="newKeyDisplay" class="ascii-frame-inner" style="display: none; margin-bottom: 1.5rem; background: rgba(255, 176, 0, 0.1); border-color: var(--terminal-amber);">
|
||||
<div id="newKeyDisplay" class="ascii-frame-inner key-generated-alert" style="display: none; margin-bottom: 1.5rem;">
|
||||
<h3 style="color: var(--terminal-amber); margin-bottom: 0.5rem;">New API Key Generated</h3>
|
||||
<p style="color: var(--priority-1); margin-bottom: 1rem; font-size: 0.9rem;">
|
||||
Copy this key now. You won't be able to see it again!
|
||||
|
||||
Reference in New Issue
Block a user