Files
kmtnflower/src/app/admin/admin.component.scss
T

604 lines
11 KiB
SCSS

@use '../../styles/variables' as *;
@use '../../styles/mixins' as *;
.admin-page {
min-height: calc(100vh - 80px);
background: $neutral-cream;
padding: $spacing-xl 0;
}
.admin-header {
text-align: center;
margin-bottom: $spacing-xl;
h1 {
font-family: $font-heading;
color: $primary-blue;
font-size: 2rem;
margin: 0 0 $spacing-xs;
}
p {
color: $neutral-medium;
margin: 0;
}
}
// ── Tabs ─────────────────────────────────────────────────
.admin-tabs {
display: flex;
justify-content: center;
gap: $spacing-sm;
margin-bottom: $spacing-xl;
}
.tab-btn {
background: $neutral-white;
border: 1px solid $neutral-light;
border-radius: $radius-md;
padding: $spacing-sm $spacing-xl;
font-size: 0.95rem;
font-weight: 600;
color: $neutral-dark;
cursor: pointer;
transition: all $transition-fast;
&:hover {
border-color: $primary-blue-muted;
color: $primary-blue;
}
&.active {
background: $primary-blue;
border-color: $primary-blue;
color: $neutral-white;
}
}
// ── Tab content ──────────────────────────────────────────
.tab-content {
@include card-style;
padding: $spacing-lg;
}
.tab-toolbar {
@include flex-between;
margin-bottom: $spacing-lg;
h2 {
font-family: $font-heading;
color: $primary-blue;
font-size: 1.3rem;
margin: 0;
}
}
.btn-add {
@include button-style($success-green, $neutral-white, darken($success-green, 8%));
}
// ── Table ────────────────────────────────────────────────
.admin-table {
width: 100%;
border-collapse: collapse;
thead th {
text-align: left;
font-size: 0.8rem;
font-weight: 600;
text-transform: uppercase;
color: $neutral-medium;
padding: $spacing-sm $spacing-md;
border-bottom: 2px solid $neutral-light;
}
tbody td {
padding: $spacing-sm $spacing-md;
border-bottom: 1px solid $neutral-light;
font-size: 0.95rem;
color: $neutral-dark;
vertical-align: middle;
}
.benefits-cell {
max-width: 300px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.slot-badge {
display: inline-block;
background: rgba($primary-blue, 0.1);
color: $primary-blue;
font-size: 0.75rem;
font-family: var(--font-mono, monospace);
padding: 2px 8px;
border-radius: 10px;
margin: 2px;
white-space: nowrap;
}
.empty-row {
text-align: center;
color: $neutral-medium;
padding: $spacing-xl !important;
}
.actions {
display: flex;
gap: $spacing-xs;
white-space: nowrap;
}
}
.btn-icon {
border: none;
padding: $spacing-xs $spacing-sm;
border-radius: $radius-sm;
font-size: 0.85rem;
cursor: pointer;
transition: background $transition-fast;
}
.btn-edit {
background: rgba($info-blue, 0.1);
color: $info-blue;
&:hover {
background: rgba($info-blue, 0.2);
}
}
.btn-delete {
background: rgba($danger-red, 0.1);
color: $danger-red;
&:hover {
background: rgba($danger-red, 0.2);
}
}
.loading-message {
text-align: center;
padding: $spacing-3xl;
color: $neutral-medium;
font-size: 1.1rem;
}
// ── Station config view ──────────────────────────────────
.station-config-view {
.config-row {
display: flex;
padding: $spacing-sm 0;
border-bottom: 1px solid $neutral-light;
&:last-child {
border-bottom: none;
}
}
.config-label {
font-weight: 600;
color: $neutral-medium;
width: 140px;
flex-shrink: 0;
font-size: 0.9rem;
}
.config-value {
color: $neutral-dark;
font-size: 0.95rem;
}
}
// ── Responsive ───────────────────────────────────────────
@include responsive(md) {
.admin-table {
font-size: 0.85rem;
thead th,
tbody td {
padding: $spacing-xs $spacing-sm;
}
}
.tab-toolbar {
flex-direction: column;
align-items: flex-start;
gap: $spacing-sm;
}
}
// ── Theme tab ────────────────────────────────────────────
.theme-panel {
.theme-harmony-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: $spacing-md;
background: rgba($primary-blue, 0.05);
border-radius: $radius-md;
margin-bottom: $spacing-lg;
flex-wrap: wrap;
gap: $spacing-sm;
.harmony-info {
display: flex;
align-items: center;
gap: $spacing-sm;
.harmony-label {
font-weight: 600;
color: $neutral-medium;
font-size: 0.9rem;
}
.harmony-rule {
color: $primary-blue;
font-weight: 600;
font-size: 0.95rem;
}
}
.auto-variants-toggle {
display: flex;
align-items: center;
gap: $spacing-sm;
font-size: 0.875rem;
color: $neutral-dark;
cursor: pointer;
input[type="checkbox"] {
width: 16px;
height: 16px;
cursor: pointer;
}
}
}
.theme-message {
padding: $spacing-sm $spacing-md;
border-radius: $radius-md;
font-size: 0.875rem;
margin-bottom: $spacing-md;
text-align: center;
&.theme-success {
background: rgba($success-green, 0.1);
color: $success-green;
}
&.theme-error {
background: rgba($danger-red, 0.1);
color: $danger-red;
}
}
}
// Color grid
.color-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: $spacing-md;
margin-bottom: $spacing-xl;
}
.color-card {
display: flex;
align-items: center;
gap: $spacing-sm;
padding: $spacing-sm $spacing-md;
background: $neutral-white;
border: 2px solid $neutral-light;
border-radius: $radius-md;
transition: border-color $transition-fast, box-shadow $transition-fast;
&.has-issue {
border-color: #e6a817;
box-shadow: 0 0 0 1px rgba(230, 168, 23, 0.3);
}
&:hover {
border-color: $primary-blue-muted;
}
}
.color-swatch {
position: relative;
width: 40px;
height: 40px;
border-radius: $radius-sm;
flex-shrink: 0;
cursor: pointer;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
transition: transform $transition-fast;
&:hover {
transform: scale(1.1);
}
input[type="color"] {
position: absolute;
inset: 0;
opacity: 0;
width: 100%;
height: 100%;
cursor: pointer;
border: none;
padding: 0;
background: none;
}
}
.color-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
.color-name {
font-size: 0.85rem;
font-weight: 600;
color: $neutral-dark;
white-space: nowrap;
}
.color-hex {
font-size: 0.75rem;
color: $neutral-medium;
font-family: var(--font-mono, monospace);
}
}
.color-status {
font-size: 1.1rem;
flex-shrink: 0;
width: 24px;
text-align: center;
.harmony-ok {
color: $success-green;
}
.harmony-warn {
color: #e6a817;
}
}
// Theme actions
.theme-actions {
display: flex;
justify-content: flex-end;
gap: $spacing-sm;
flex-wrap: wrap;
padding-top: $spacing-md;
border-top: 1px solid $neutral-light;
}
.btn-save-theme {
@include button-style($primary-blue, $neutral-white, $primary-blue-light);
&:disabled {
opacity: 0.6;
cursor: not-allowed;
}
}
.btn-outline-theme {
background: transparent;
border: 2px solid $primary-blue;
color: $primary-blue;
border-radius: $radius-md;
padding: $spacing-sm $spacing-lg;
font-size: 0.95rem;
font-weight: 600;
cursor: pointer;
transition: background $transition-fast, color $transition-fast;
&:hover {
background: $primary-blue;
color: $neutral-white;
}
}
// ── Mobile builds tab ───────────────────────────────────
.mobile-builds-panel {
display: grid;
gap: $spacing-lg;
}
.mobile-build-grid {
display: grid;
grid-template-columns: 1fr 2fr;
gap: $spacing-md;
}
.build-card {
background: $neutral-white;
border: 1px solid $neutral-light;
border-radius: $radius-md;
padding: $spacing-md;
h3,
h4 {
color: $primary-blue;
margin-top: 0;
}
}
.derived-list {
display: grid;
gap: $spacing-xs;
font-size: 0.92rem;
}
.form-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: $spacing-sm;
margin-bottom: $spacing-sm;
label {
display: flex;
flex-direction: column;
gap: 6px;
font-size: 0.85rem;
color: $neutral-dark;
font-weight: 600;
}
input[type='text'],
input[type='file'] {
border: 1px solid $neutral-light;
border-radius: $radius-sm;
padding: $spacing-xs $spacing-sm;
font-size: 0.88rem;
}
}
.platform-row {
grid-template-columns: auto auto;
label {
flex-direction: row;
align-items: center;
font-weight: 600;
}
}
.status {
border-radius: $radius-sm;
padding: $spacing-sm;
margin: $spacing-sm 0;
font-size: 0.9rem;
&.success {
background: rgba($success-green, 0.1);
color: $success-green;
}
&.error {
background: rgba($danger-red, 0.1);
color: $danger-red;
}
ul {
margin: $spacing-xs 0 0 $spacing-md;
}
}
.selected-build {
background: rgba($primary-blue, 0.06);
}
.tab-toolbar.compact {
margin-bottom: $spacing-sm;
}
.action-group {
display: flex;
gap: $spacing-xs;
}
.artifact-list {
display: grid;
gap: $spacing-sm;
margin-bottom: $spacing-md;
}
.artifact-row {
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid $neutral-light;
border-radius: $radius-sm;
padding: $spacing-sm;
}
.artifact-meta {
font-size: 0.78rem;
color: $neutral-medium;
}
.build-log {
background: $neutral-black;
color: $neutral-white;
border-radius: $radius-sm;
padding: $spacing-sm;
max-height: 280px;
overflow: auto;
font-size: 0.8rem;
}
// ── Theme export status ──────────────────────────────────
.theme-status-ok,
.theme-status-missing {
padding: $spacing-sm $spacing-md;
border-radius: $radius-sm;
margin-bottom: $spacing-sm;
font-size: 0.88rem;
color: $neutral-dark;
}
.theme-status-ok {
background: rgba($success-green, 0.08);
border: 1px solid rgba($success-green, 0.25);
display: grid;
gap: 2px;
}
.theme-status-missing p {
margin: 0 0 $spacing-xs;
&:last-child {
margin-bottom: 0;
}
}
.theme-status-missing {
background: rgba($accent-orange, 0.08);
border: 1px solid rgba($accent-orange, 0.25);
}
.btn-outline {
background: transparent;
border: 2px solid $primary-blue;
color: $primary-blue;
border-radius: $radius-md;
padding: $spacing-xs $spacing-md;
font-size: 0.875rem;
font-weight: 600;
cursor: pointer;
transition: background $transition-fast, color $transition-fast;
margin-top: $spacing-sm;
&:hover:not(:disabled) {
background: $primary-blue;
color: $neutral-white;
}
&:disabled {
opacity: 0.6;
cursor: not-allowed;
}
}
@include responsive(md) {
.mobile-build-grid {
grid-template-columns: 1fr;
}
.action-group {
flex-wrap: wrap;
}
}