Some checks failed
Run Tests / test (push) Failing after 1m51s
- Introduced a new table `application_setting` to store configurable application options. - Implemented functions to manage CSS color settings, including loading, updating, and reading environment overrides. - Added a new settings view to render and manage theme colors. - Updated UI to include a settings page with theme color management and environment overrides display. - Enhanced CSS styles for the settings page and sidebar navigation. - Created unit and end-to-end tests for the new settings functionality and CSS management.
776 lines
14 KiB
CSS
776 lines
14 KiB
CSS
:root {
|
|
--color-background: #f4f5f7;
|
|
--color-surface: #ffffff;
|
|
--color-text-primary: #2a1f33;
|
|
--color-text-secondary: #624769;
|
|
--color-text-muted: #64748b;
|
|
--color-text-subtle: #94a3b8;
|
|
--color-text-invert: #ffffff;
|
|
--color-text-dark: #0f172a;
|
|
--color-text-strong: #111827;
|
|
--color-primary: #5f320d;
|
|
--color-primary-strong: #7e4c13;
|
|
--color-primary-stronger: #837c15;
|
|
--color-accent: #bff838;
|
|
--color-border: #e2e8f0;
|
|
--color-border-strong: #cbd5e1;
|
|
--color-highlight: #eef2ff;
|
|
--color-panel-shadow: rgba(15, 23, 42, 0.08);
|
|
--color-panel-shadow-deep: rgba(15, 23, 42, 0.12);
|
|
--color-surface-alt: #f8fafc;
|
|
--color-success: #047857;
|
|
--color-error: #b91c1c;
|
|
--space-2xs: 0.25rem;
|
|
--space-xs: 0.5rem;
|
|
--space-sm: 0.75rem;
|
|
--space-md: 1rem;
|
|
--space-lg: 1.5rem;
|
|
--space-xl: 2rem;
|
|
--space-2xl: 3rem;
|
|
--font-size-xs: 0.75rem;
|
|
--font-size-sm: 0.875rem;
|
|
--font-size-base: 1rem;
|
|
--font-size-lg: 1.25rem;
|
|
--font-size-xl: 1.5rem;
|
|
--font-size-2xl: 2rem;
|
|
--panel-radius: 12px;
|
|
--table-radius: 10px;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
|
background-color: var(--color-background);
|
|
color: var(--color-text-primary);
|
|
}
|
|
|
|
.app-layout {
|
|
display: flex;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.app-sidebar {
|
|
width: 264px;
|
|
background-color: var(--color-primary);
|
|
color: var(--color-text-invert);
|
|
display: flex;
|
|
flex-direction: column;
|
|
box-shadow: 4px 0 16px var(--color-panel-shadow-deep);
|
|
position: sticky;
|
|
top: 0;
|
|
height: 100vh;
|
|
}
|
|
|
|
.sidebar-inner {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
padding: 2.5rem 1.75rem 1.75rem;
|
|
gap: 2rem;
|
|
}
|
|
|
|
.sidebar-brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.brand-logo {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 44px;
|
|
height: 44px;
|
|
border-radius: 12px;
|
|
background: linear-gradient(
|
|
0deg,
|
|
var(--color-primary-stronger),
|
|
var(--color-accent)
|
|
);
|
|
color: var(--color-text-invert);
|
|
font-weight: 700;
|
|
font-size: 1.1rem;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
.brand-text {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.15rem;
|
|
}
|
|
|
|
.brand-title {
|
|
font-size: 1.35rem;
|
|
font-weight: 700;
|
|
margin: 0;
|
|
}
|
|
|
|
.brand-subtitle {
|
|
font-size: 0.85rem;
|
|
font-weight: 500;
|
|
color: rgba(255, 255, 255, 0.78);
|
|
}
|
|
|
|
.sidebar-nav {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.sidebar-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.35rem;
|
|
}
|
|
|
|
.sidebar-section + .sidebar-section {
|
|
margin-top: 1.4rem;
|
|
}
|
|
|
|
.sidebar-section-label {
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
letter-spacing: 0.06em;
|
|
text-transform: uppercase;
|
|
color: rgba(255, 255, 255, 0.52);
|
|
padding: 0 1rem;
|
|
}
|
|
|
|
.sidebar-section-links {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.sidebar-link-block {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.2rem;
|
|
}
|
|
|
|
.sidebar-link {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
padding: 0.75rem 1rem;
|
|
border-radius: 10px;
|
|
color: rgba(255, 255, 255, 0.88);
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
|
|
}
|
|
|
|
.sidebar-link:hover,
|
|
.sidebar-link:focus {
|
|
background: rgba(148, 197, 255, 0.28);
|
|
color: var(--color-text-invert);
|
|
transform: translateX(4px);
|
|
}
|
|
|
|
.sidebar-link.is-active {
|
|
background: rgba(148, 197, 255, 0.4);
|
|
color: var(--color-text-invert);
|
|
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
|
|
}
|
|
|
|
.sidebar-sublinks {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.2rem;
|
|
padding-left: 1.75rem;
|
|
}
|
|
|
|
.sidebar-sublink {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
color: rgba(255, 255, 255, 0.74);
|
|
font-weight: 500;
|
|
font-size: 0.9rem;
|
|
text-decoration: none;
|
|
padding: 0.35rem 0.75rem;
|
|
border-radius: 8px;
|
|
transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
|
|
}
|
|
|
|
.sidebar-sublink:hover,
|
|
.sidebar-sublink:focus {
|
|
background: rgba(148, 197, 255, 0.18);
|
|
color: var(--color-text-invert);
|
|
transform: translateX(3px);
|
|
}
|
|
|
|
.sidebar-sublink.is-active {
|
|
background: rgba(148, 197, 255, 0.28);
|
|
color: var(--color-text-invert);
|
|
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
|
|
}
|
|
|
|
.app-main {
|
|
background-color: var(--color-background);
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.app-content {
|
|
flex: 1;
|
|
width: min(1120px, 92%);
|
|
margin: 0 auto;
|
|
padding: 2.5rem 0 2rem;
|
|
}
|
|
|
|
.container {
|
|
width: min(960px, 92%);
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.app-content.container {
|
|
width: min(1120px, 92%);
|
|
}
|
|
|
|
.dashboard-header {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 1.5rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.dashboard-subtitle {
|
|
margin: 0.35rem 0 0;
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.dashboard-actions {
|
|
display: flex;
|
|
gap: 0.75rem;
|
|
align-items: center;
|
|
}
|
|
|
|
.page-header {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 1.5rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.page-subtitle {
|
|
margin-top: 0.35rem;
|
|
color: var(--color-text-muted);
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.settings-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
|
gap: 1.5rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.settings-card {
|
|
background: var(--color-surface);
|
|
border-radius: 12px;
|
|
padding: 1.5rem;
|
|
box-shadow: 0 4px 14px var(--color-panel-shadow);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.settings-card h2 {
|
|
margin: 0;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.settings-card p {
|
|
margin: 0;
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.settings-card-note {
|
|
font-size: 0.85rem;
|
|
color: var(--color-text-subtle);
|
|
}
|
|
|
|
.color-form-grid {
|
|
max-width: none;
|
|
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
|
}
|
|
|
|
.color-form-field {
|
|
background: var(--color-surface-alt);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: 10px;
|
|
padding: var(--space-sm);
|
|
box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.color-form-field.is-env-override {
|
|
background: rgba(191, 248, 56, 0.12);
|
|
border-color: var(--color-accent);
|
|
}
|
|
|
|
.color-field-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: var(--space-sm);
|
|
font-weight: 600;
|
|
color: var(--color-text-strong);
|
|
font-family: "Fira Code", "Consolas", "Courier New", monospace;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.color-field-default {
|
|
color: var(--color-text-muted);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.color-field-helper {
|
|
font-size: 0.8rem;
|
|
color: var(--color-text-subtle);
|
|
}
|
|
|
|
.color-env-flag {
|
|
font-size: 0.78rem;
|
|
font-weight: 600;
|
|
color: var(--color-accent);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
|
|
.color-input-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.color-value-input {
|
|
font-family: "Fira Code", "Consolas", "Courier New", monospace;
|
|
}
|
|
|
|
.color-value-input[disabled] {
|
|
background-color: rgba(148, 197, 255, 0.16);
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.color-preview {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--color-border-strong);
|
|
box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
|
|
}
|
|
|
|
.env-overrides-table table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.env-overrides-table th,
|
|
.env-overrides-table td {
|
|
padding: 0.65rem 0.75rem;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--color-border);
|
|
}
|
|
|
|
.env-overrides-table code {
|
|
font-family: "Fira Code", "Consolas", "Courier New", monospace;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.button-link {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: fit-content;
|
|
padding: 0.55rem 1.2rem;
|
|
border-radius: 999px;
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
background: var(--color-primary);
|
|
color: var(--color-text-invert);
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
}
|
|
|
|
.button-link:hover,
|
|
.button-link:focus {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 8px 18px var(--color-panel-shadow);
|
|
}
|
|
|
|
.dashboard-metrics-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
gap: 1rem;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.metric-card {
|
|
background: var(--color-surface);
|
|
border-radius: 12px;
|
|
padding: 1.2rem 1.4rem;
|
|
box-shadow: 0 4px 14px var(--color-panel-shadow);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.35rem;
|
|
}
|
|
|
|
.metric-label {
|
|
font-size: 0.82rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.metric-value {
|
|
font-size: 1.45rem;
|
|
font-weight: 700;
|
|
color: var(--color-text-dark);
|
|
}
|
|
|
|
.dashboard-charts {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
|
gap: 1.75rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.chart-card {
|
|
min-height: 320px;
|
|
position: relative;
|
|
}
|
|
|
|
.chart-card canvas {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.panel-header {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 0.75rem;
|
|
margin-bottom: 1.25rem;
|
|
}
|
|
|
|
.panel-header h3 {
|
|
margin: 0;
|
|
}
|
|
|
|
.chart-subtitle {
|
|
margin: 0.25rem 0 0;
|
|
color: var(--color-text-subtle);
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.dashboard-panel {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.dashboard-columns {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
|
gap: 1.75rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.metric-list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.metric-list li {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.striped-list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.striped-list li {
|
|
padding: 0.85rem 1rem;
|
|
border-radius: 10px;
|
|
background: var(--color-surface-alt);
|
|
box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.6);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.4rem;
|
|
}
|
|
|
|
.striped-list li + li {
|
|
margin-top: 0.75rem;
|
|
}
|
|
|
|
.list-title {
|
|
font-weight: 600;
|
|
color: var(--color-text-dark);
|
|
}
|
|
|
|
.list-detail {
|
|
color: var(--color-text-secondary);
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.btn.is-loading {
|
|
opacity: 0.75;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.btn.is-loading::after {
|
|
content: "";
|
|
width: 0.85rem;
|
|
height: 0.85rem;
|
|
border: 2px solid rgba(255, 255, 255, 0.6);
|
|
border-top-color: rgba(255, 255, 255, 1);
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
display: inline-block;
|
|
margin-left: 0.6rem;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
.panel {
|
|
background-color: var(--color-surface);
|
|
border-radius: var(--panel-radius);
|
|
padding: var(--space-xl);
|
|
box-shadow: 0 2px 8px var(--color-panel-shadow);
|
|
margin-bottom: var(--space-2xl);
|
|
}
|
|
|
|
.panel h2,
|
|
.panel h3 {
|
|
font-weight: 700;
|
|
color: var(--color-text-dark);
|
|
margin: 0 0 var(--space-sm);
|
|
}
|
|
|
|
.panel h2 {
|
|
font-size: var(--font-size-xl);
|
|
}
|
|
|
|
.panel h3 {
|
|
font-size: var(--font-size-lg);
|
|
}
|
|
|
|
.form-grid {
|
|
display: grid;
|
|
gap: var(--space-md);
|
|
max-width: 480px;
|
|
}
|
|
|
|
.form-grid label {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
font-weight: 600;
|
|
color: var(--color-text-strong);
|
|
}
|
|
|
|
.form-grid input,
|
|
.form-grid textarea,
|
|
.form-grid select {
|
|
padding: 0.6rem var(--space-sm);
|
|
border: 1px solid var(--color-border-strong);
|
|
border-radius: 8px;
|
|
font-size: var(--font-size-base);
|
|
}
|
|
|
|
.form-grid input:focus,
|
|
.form-grid textarea:focus,
|
|
.form-grid select:focus {
|
|
outline: 2px solid var(--color-primary-strong);
|
|
outline-offset: 1px;
|
|
}
|
|
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
padding: 0.65rem 1.25rem;
|
|
border-radius: 999px;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-weight: 600;
|
|
background-color: var(--color-border);
|
|
color: var(--color-text-dark);
|
|
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
}
|
|
|
|
.btn:hover,
|
|
.btn:focus {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 10px var(--color-panel-shadow);
|
|
}
|
|
|
|
.btn.primary {
|
|
background-color: var(--color-primary-strong);
|
|
color: var(--color-text-invert);
|
|
}
|
|
|
|
.btn.primary:hover,
|
|
.btn.primary:focus {
|
|
background-color: var(--color-primary-stronger);
|
|
}
|
|
|
|
.result-output {
|
|
background-color: var(--color-text-dark);
|
|
color: var(--color-surface-alt);
|
|
padding: 1rem;
|
|
border-radius: 8px;
|
|
font-family: "Fira Code", "Consolas", "Courier New", monospace;
|
|
overflow-x: auto;
|
|
margin-top: 1.5rem;
|
|
}
|
|
|
|
.monospace-input {
|
|
width: 100%;
|
|
font-family: "Fira Code", "Consolas", "Courier New", monospace;
|
|
min-height: 120px;
|
|
}
|
|
|
|
.button-row {
|
|
display: flex;
|
|
gap: 0.75rem;
|
|
flex-wrap: wrap;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.table-container {
|
|
margin-top: 1.5rem;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
background-color: var(--color-surface-alt);
|
|
}
|
|
|
|
thead {
|
|
background-color: var(--color-primary);
|
|
color: var(--color-text-invert);
|
|
}
|
|
|
|
th,
|
|
td {
|
|
padding: 0.75rem 1rem;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--color-border);
|
|
}
|
|
|
|
tbody tr:nth-child(even) {
|
|
background-color: var(--color-highlight);
|
|
}
|
|
|
|
.empty-state {
|
|
margin-top: 1.5rem;
|
|
color: var(--color-text-muted);
|
|
font-style: italic;
|
|
}
|
|
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.feedback {
|
|
margin-top: 1rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.feedback.success {
|
|
color: var(--color-success);
|
|
}
|
|
|
|
.feedback.error {
|
|
color: var(--color-error);
|
|
}
|
|
|
|
.site-footer {
|
|
background-color: var(--color-primary);
|
|
color: var(--color-text-invert);
|
|
margin-top: 3rem;
|
|
}
|
|
|
|
.footer-inner {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 1rem 0;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
@media (max-width: 1024px) {
|
|
.app-sidebar {
|
|
width: 240px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.app-layout {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.app-sidebar {
|
|
position: relative;
|
|
width: 100%;
|
|
height: auto;
|
|
box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
|
|
}
|
|
|
|
.sidebar-inner {
|
|
padding: 1.5rem 1.25rem;
|
|
}
|
|
|
|
.sidebar-brand {
|
|
justify-content: center;
|
|
}
|
|
|
|
.sidebar-nav {
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
gap: 0.75rem;
|
|
justify-content: center;
|
|
}
|
|
|
|
.sidebar-link {
|
|
flex: 1 1 140px;
|
|
justify-content: center;
|
|
}
|
|
|
|
.app-content {
|
|
width: min(100%, 94%);
|
|
padding-top: 2rem;
|
|
}
|
|
|
|
.dashboard-charts {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.dashboard-columns {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|