feat(HAI-105): polish dashboard UI styles and migrate inline styles to CSS
- Enhance CSS custom properties and add form control styling - Polish settings layout, sidebar, and auth card styles - Add checkbox styling, modal refinements, and migrate inline styles from SettingsModal - Add structural test assertions for new CSS classes in SettingsModal - Expand styles.css with ~170 new lines of maintainable, token-based CSS
This commit is contained in:
@@ -17,9 +17,15 @@
|
||||
--in-review: #3fb950;
|
||||
--done: #8b949e;
|
||||
|
||||
--color-success: #3fb950;
|
||||
--color-error: #f85149;
|
||||
--color-muted: #8b949e;
|
||||
|
||||
--radius: 8px;
|
||||
--radius-lg: 12px;
|
||||
--shadow: 0 4px 24px rgba(0,0,0,0.4);
|
||||
--transition-fast: 0.15s ease;
|
||||
--transition-normal: 0.2s ease;
|
||||
}
|
||||
|
||||
html, body {
|
||||
@@ -70,30 +76,31 @@ html, body {
|
||||
color: var(--text);
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s, border-color 0.15s;
|
||||
transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
|
||||
}
|
||||
.btn:hover { background: var(--card-hover); border-color: var(--text-muted); }
|
||||
.btn:active { transform: scale(0.97); }
|
||||
|
||||
.btn-primary {
|
||||
background: #238636;
|
||||
border-color: #2ea043;
|
||||
color: #fff;
|
||||
}
|
||||
.btn-primary:hover { background: #2ea043; }
|
||||
.btn-primary:hover { background: #2ea043; box-shadow: 0 0 8px rgba(46,160,67,0.3); }
|
||||
|
||||
.btn-danger {
|
||||
background: #da3633;
|
||||
border-color: #f85149;
|
||||
color: #fff;
|
||||
}
|
||||
.btn-danger:hover { background: #f85149; }
|
||||
.btn-danger:hover { background: #f85149; box-shadow: 0 0 8px rgba(248,81,73,0.3); }
|
||||
|
||||
.btn-warning {
|
||||
background: #d29922;
|
||||
border-color: #e3b341;
|
||||
color: #fff;
|
||||
}
|
||||
.btn-warning:hover { background: #e3b341; }
|
||||
.btn-warning:hover { background: #e3b341; box-shadow: 0 0 8px rgba(227,179,65,0.3); }
|
||||
|
||||
.btn-sm { padding: 4px 10px; font-size: 12px; }
|
||||
|
||||
@@ -418,8 +425,9 @@ html, body {
|
||||
align-items: center;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: rgba(0,0,0,0.1);
|
||||
}
|
||||
.modal-header h3 { font-size: 15px; font-weight: 600; }
|
||||
.modal-header h3 { font-size: 15px; font-weight: 600; letter-spacing: 0.3px; }
|
||||
|
||||
.modal-close {
|
||||
background: none;
|
||||
@@ -435,9 +443,10 @@ html, body {
|
||||
.modal-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
padding: 16px 20px;
|
||||
gap: 10px;
|
||||
padding: 14px 20px;
|
||||
border-top: 1px solid var(--border);
|
||||
background: rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
/* === Forms === */
|
||||
@@ -470,6 +479,7 @@ html, body {
|
||||
.form-group input:not([type="checkbox"]):focus,
|
||||
.form-group textarea:focus {
|
||||
border-color: var(--todo);
|
||||
box-shadow: 0 0 0 2px rgba(88,166,255,0.15);
|
||||
}
|
||||
.form-group input[type="checkbox"] {
|
||||
width: 16px;
|
||||
@@ -478,9 +488,75 @@ html, body {
|
||||
margin: 0;
|
||||
accent-color: var(--todo);
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
transition: box-shadow var(--transition-fast);
|
||||
}
|
||||
.form-group input[type="checkbox"]:focus-visible {
|
||||
box-shadow: 0 0 0 2px rgba(88,166,255,0.3);
|
||||
outline: none;
|
||||
}
|
||||
.checkbox-label {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
text-transform: none !important;
|
||||
letter-spacing: 0 !important;
|
||||
font-weight: 500 !important;
|
||||
color: var(--text) !important;
|
||||
font-size: 13px !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
.form-group textarea { resize: vertical; }
|
||||
|
||||
/* === Select Styling === */
|
||||
.form-group select {
|
||||
width: 100%;
|
||||
padding: 8px 32px 8px 12px;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
color: var(--text);
|
||||
font-size: 14px;
|
||||
font-family: inherit;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
appearance: none;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 10px center;
|
||||
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
|
||||
}
|
||||
.form-group select:focus {
|
||||
border-color: var(--todo);
|
||||
box-shadow: 0 0 0 2px rgba(88,166,255,0.15);
|
||||
}
|
||||
.form-group select:hover:not(:focus) {
|
||||
border-color: var(--text-dim);
|
||||
}
|
||||
.form-group select optgroup {
|
||||
background: var(--surface);
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
}
|
||||
.form-group select option {
|
||||
background: var(--surface);
|
||||
color: var(--text);
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
/* === Helper Text & Field Errors === */
|
||||
.form-group small {
|
||||
display: block;
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
line-height: 1.4;
|
||||
}
|
||||
.form-group .field-error {
|
||||
color: var(--color-error);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* === Settings Layout === */
|
||||
.settings-layout {
|
||||
display: flex;
|
||||
@@ -495,8 +571,9 @@ html, body {
|
||||
border-right: 1px solid var(--border);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 8px;
|
||||
padding: 10px 8px;
|
||||
gap: 2px;
|
||||
background: rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.settings-nav-item {
|
||||
@@ -508,33 +585,102 @@ html, body {
|
||||
color: var(--text-muted);
|
||||
background: none;
|
||||
border: none;
|
||||
border-radius: var(--radius);
|
||||
border-left: 3px solid transparent;
|
||||
border-radius: 0 var(--radius) var(--radius) 0;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
transition: background 0.15s, color 0.15s;
|
||||
transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
|
||||
}
|
||||
.settings-nav-item:hover {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
border-left-color: var(--border);
|
||||
}
|
||||
.settings-nav-item.active {
|
||||
background: var(--bg);
|
||||
color: var(--todo);
|
||||
font-weight: 600;
|
||||
border-left-color: var(--todo);
|
||||
}
|
||||
|
||||
.settings-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 8px;
|
||||
padding: 4px 0 12px;
|
||||
}
|
||||
.settings-content > * {
|
||||
animation: settingsFadeIn var(--transition-normal);
|
||||
}
|
||||
@keyframes settingsFadeIn {
|
||||
from { opacity: 0; transform: translateY(4px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.settings-section-heading {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
padding: 12px 20px 0;
|
||||
margin: 0;
|
||||
padding: 12px 20px 10px;
|
||||
margin: 0 20px 0 0;
|
||||
color: var(--text);
|
||||
border-bottom: 1px solid var(--border);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
/* === Auth Provider Cards === */
|
||||
.auth-provider-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 20px;
|
||||
margin: 0;
|
||||
border-bottom: 1px solid var(--border);
|
||||
transition: background var(--transition-fast);
|
||||
}
|
||||
.auth-provider-row:hover {
|
||||
background: rgba(255,255,255,0.02);
|
||||
}
|
||||
.auth-provider-row:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
.auth-provider-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.auth-status-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
.auth-status-badge.authenticated {
|
||||
background: rgba(63,185,80,0.15);
|
||||
color: var(--color-success);
|
||||
}
|
||||
.auth-status-badge.not-authenticated {
|
||||
background: rgba(248,81,73,0.15);
|
||||
color: var(--color-error);
|
||||
}
|
||||
.auth-hint {
|
||||
display: block;
|
||||
padding: 10px 20px 0;
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
.settings-empty-state {
|
||||
padding: 12px 20px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.settings-muted {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
.settings-loading {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* === Detail Modal === */
|
||||
|
||||
Reference in New Issue
Block a user