基本功能复刻完成
All checks were successful
build / build (api, amd64, linux) (push) Successful in -47s
build / build (api, arm64, linux) (push) Successful in -47s
build / build (api.exe, amd64, windows) (push) Successful in -48s

This commit is contained in:
CN-JS-HuiBai
2026-04-17 12:24:00 +08:00
parent 06da23fbbc
commit 981ee4f406
37 changed files with 11737 additions and 770 deletions

View File

@@ -1,37 +1,36 @@
:root {
/* Nebula Dark Palette */
--bg: #07101b;
--panel: rgba(9, 20, 35, 0.78);
--panel-strong: rgba(11, 24, 41, 0.92);
--text: #eef6ff;
--text-dim: rgba(227, 239, 255, 0.72);
--text-faint: rgba(227, 239, 255, 0.54);
--border: rgba(152, 192, 255, 0.16);
--shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
--shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.22);
/* Xboard/Ant Design Professional Palette */
--bg: #f0f2f5;
--panel: #ffffff;
--text: #000000d9;
--text-dim: #000000a6;
--text-faint: #00000073;
--border: #d9d9d9;
--border-light: #f0f0f0;
--shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);
--shadow-card: 0 1px 2px -2px rgba(0, 0, 0, 0.16), 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09);
/* Brand/Accent */
--accent: #6ce5ff;
--accent-strong: #21b8ff;
--accent-soft: rgba(108, 229, 255, 0.12);
--accent-rgb: 108, 229, 255;
/* Brand/Accent (Ant Design Blue) */
--accent: #1677ff;
--accent-hover: #4096ff;
--accent-active: #0958d9;
--accent-soft: #e6f4ff;
/* Indicators */
--success: #65f0b7;
--warn: #ffca7a;
--danger: #ff8db5;
--success: #52c41a;
--warn: #faad14;
--danger: #ff4d4f;
/* Radius */
--radius-xl: 28px;
--radius-lg: 20px;
--radius-md: 14px;
--radius-lg: 8px;
--radius-md: 6px;
--radius-sm: 4px;
/* Sidebar */
--sidebar: #091221;
--sidebar-active: #ffffff;
--sidebar-muted: rgba(227, 239, 255, 0.5);
--sidebar-bg: #ffffff;
--sidebar-item-active: #e6f4ff;
font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
-webkit-font-smoothing: antialiased;
}
@@ -41,257 +40,165 @@
html, body {
margin: 0;
min-height: 100%;
background:
radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.12), transparent 30%),
radial-gradient(circle at top right, rgba(255, 201, 122, 0.08), transparent 22%),
linear-gradient(180deg, #050d16 0%, #07101b 100%);
min-height: 100vh;
background: var(--bg);
color: var(--text);
overflow-x: hidden;
}
body::before {
content: "";
position: fixed;
inset: 0;
background-image:
linear-gradient(rgba(155, 192, 255, 0.04) 1px, transparent 1px),
linear-gradient(90deg, rgba(155, 192, 255, 0.04) 1px, transparent 1px);
background-size: 64px 64px;
mask-image: radial-gradient(circle at top center, black, transparent 80%);
pointer-events: none;
z-index: -1;
}
a {
color: inherit;
text-decoration: none;
transition: opacity 0.2s ease;
}
a:hover {
opacity: 0.8;
}
button, input, select, textarea {
font: inherit;
background: transparent;
color: inherit;
}
/* Glass Component Base */
.glass-card {
background: var(--panel);
backdrop-filter: blur(18px);
border: 1px solid var(--border);
box-shadow: var(--shadow-soft);
font-size: 14px;
line-height: 1.5715;
}
/* Main Layout */
.admin-shell {
display: flex;
min-height: 100vh;
display: grid;
grid-template-columns: 280px minmax(0, 1fr);
gap: 0;
}
/* Sidebar */
.admin-sidebar {
position: sticky;
top: 0;
height: 100vh;
background: var(--sidebar);
border-right: 1px solid var(--border);
padding: 32px 20px;
width: 260px;
background: var(--sidebar-bg);
border-right: 1px solid var(--border-light);
display: flex;
flex-direction: column;
gap: 32px;
position: fixed;
height: 100vh;
z-index: 1000;
}
.sidebar-brand {
padding: 0 12px;
}
.sidebar-brand-mark {
display: inline-flex;
padding: 6px 12px;
background: var(--accent-soft);
color: var(--accent);
border: 1px solid rgba(var(--accent-rgb), 0.2);
border-radius: 999px;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
margin-bottom: 14px;
.sidebar-header {
padding: 24px 20px;
display: flex;
flex-direction: column;
}
.sidebar-brand strong {
display: block;
font-size: 26px;
font-weight: 800;
letter-spacing: -0.02em;
line-height: 1.1;
font-size: 20px;
font-weight: 600;
color: var(--text);
}
.sidebar-brand span {
display: block;
font-size: 13px;
font-size: 12px;
color: var(--text-faint);
margin-top: 8px;
}
.sidebar-nav-label {
display: block;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.12em;
color: var(--text-faint);
margin: 24px 12px 12px;
}
.sidebar-nav {
display: grid;
gap: 6px;
flex: 1;
padding: 12px 8px;
overflow-y: auto;
}
.sidebar-nav-label {
padding: 8px 16px;
font-size: 12px;
color: var(--text-faint);
text-transform: uppercase;
letter-spacing: 0.1em;
}
.sidebar-item-wrap {
margin-bottom: 4px;
}
.sidebar-item {
display: block;
padding: 12px 16px;
display: flex;
align-items: center;
padding: 10px 16px;
border-radius: var(--radius-md);
color: var(--sidebar-muted);
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
border: 1px solid transparent;
color: var(--text-dim);
text-decoration: none;
transition: all 0.2s;
cursor: pointer;
}
.sidebar-item:hover {
background: rgba(255, 255, 255, 0.04);
background: rgba(0, 0, 0, 0.04);
color: var(--text);
transform: translateX(4px);
}
.sidebar-item.active {
background: var(--accent-soft);
background: var(--sidebar-item-active);
color: var(--accent);
border-color: rgba(var(--accent-rgb), 0.24);
box-shadow: inset 0 0 12px rgba(var(--accent-rgb), 0.08);
font-weight: 500;
}
.sidebar-item strong {
display: block;
font-size: 15px;
font-weight: 700;
}
.sidebar-item span {
display: block;
font-size: 12px;
opacity: 0.7;
margin-top: 2px;
font-size: 14px;
}
/* Main Content */
.admin-main {
padding: 32px 40px;
min-width: 0;
flex: 1;
margin-left: 260px;
padding: 24px;
max-width: 100%;
}
.topbar {
padding: 24px 28px;
border-radius: var(--radius-xl);
margin-bottom: 32px;
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 24px;
margin-bottom: 24px;
}
.topbar-copy h1 {
margin: 0;
font-size: 32px;
font-weight: 800;
letter-spacing: -0.03em;
line-height: 1.1;
font-size: 24px;
font-weight: 600;
color: var(--text);
}
.topbar-copy p {
margin: 10px 0 0;
font-size: 15px;
margin: 4px 0 0;
color: var(--text-dim);
}
.topbar-eyebrow {
display: inline-flex;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.15em;
color: var(--accent);
margin-bottom: 10px;
}
.topbar-meta {
display: flex;
gap: 12px;
margin-top: 16px;
}
.topbar-chip {
padding: 6px 12px;
border-radius: 999px;
background: rgba(255,255,255,0.05);
border: 1px solid var(--border);
font-size: 12px;
color: var(--text-dim);
}
/* Cards & Grid */
.grid {
display: grid;
gap: 20px;
}
.grid-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
/* Cards */
.card {
padding: 28px;
border-radius: var(--radius-xl);
background: var(--panel);
border-radius: var(--radius-lg);
padding: 24px;
border: 1px solid var(--border-light);
box-shadow: var(--shadow);
margin-bottom: 24px;
}
.card h2 {
font-size: 22px;
font-weight: 700;
margin: 0 0 14px;
font-size: 16px;
font-weight: 600;
margin: 0 0 16px;
color: var(--text);
}
/* Stats Grid */
.grid {
display: grid;
gap: 16px;
margin-bottom: 24px;
}
.grid-3 {
grid-template-columns: repeat(3, 1fr);
}
.stat-card {
display: flex;
flex-direction: column;
gap: 12px;
}
.stat-card strong {
font-size: 34px;
font-weight: 800;
letter-spacing: -0.04em;
color: var(--accent);
padding: 16px 24px;
}
.stat-card span {
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-faint);
font-size: 14px;
color: var(--text-dim);
}
/* Table Design */
.stat-card strong {
display: block;
font-size: 24px;
font-weight: 600;
margin-top: 4px;
}
/* Tables */
.table-wrap {
background: #fff;
border-radius: var(--radius-lg);
border: 1px solid var(--border);
background: rgba(255, 255, 255, 0.02);
border: 1px solid var(--border-light);
overflow: hidden;
}
@@ -300,56 +207,45 @@ table {
border-collapse: collapse;
}
th, td {
padding: 16px 20px;
th {
background: #fafafa;
padding: 12px 16px;
text-align: left;
border-bottom: 1px solid var(--border);
font-weight: 600;
color: var(--text-dim);
border-bottom: 1px solid var(--border-light);
}
th {
background: rgba(255, 255, 255, 0.04);
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--text-faint);
td {
padding: 12px 16px;
border-bottom: 1px solid var(--border-light);
color: var(--text);
vertical-align: middle;
}
tbody tr:hover {
background: rgba(255, 255, 255, 0.02);
background: #fafafa;
}
tbody tr:last-child td {
border-bottom: 0;
/* Node Hierarchy */
.node-child {
background: #fafafa;
}
/* Forms & Inputs */
.field {
display: grid;
gap: 8px;
margin-bottom: 18px;
.node-child td:first-child {
padding-left: 40px;
position: relative;
}
.field label {
font-size: 13px;
font-weight: 600;
color: var(--text-dim);
}
.field input, .field select, .field textarea {
width: 100%;
padding: 14px 16px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid var(--border);
border-radius: var(--radius-md);
transition: all 0.2s ease;
}
.field input:focus, .field select:focus {
border-color: var(--accent);
background: rgba(255, 255, 255, 0.08);
box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
outline: none;
.node-child td:first-child::before {
content: "";
position: absolute;
left: 20px;
top: 0;
bottom: 50%;
width: 10px;
border-left: 1px solid var(--border);
border-bottom: 1px solid var(--border);
}
/* Buttons */
@@ -357,131 +253,251 @@ tbody tr:last-child td {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 12px 24px;
border-radius: var(--radius-md);
font-weight: 700;
height: 32px;
padding: 4px 15px;
font-size: 14px;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
border-radius: var(--radius-md);
cursor: pointer;
transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
border: 1px solid transparent;
}
.btn:active {
transform: scale(0.98);
user-select: none;
}
.btn-primary {
background: linear-gradient(135deg, var(--accent), var(--accent-strong));
color: #050d16;
box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.24);
background-color: var(--accent);
color: #fff;
border-color: var(--accent);
}
.btn-primary:hover {
background-color: var(--accent-hover);
border-color: var(--accent-hover);
}
.btn-secondary {
background: rgba(255,255,255,0.05);
background-color: #fff;
border-color: var(--border);
color: var(--text);
}
.btn-ghost {
background: transparent;
.btn-secondary:hover {
color: var(--accent);
border-color: var(--accent);
}
.btn-ghost {
color: var(--accent);
padding: 8px 12px;
}
.btn-ghost:hover {
background: var(--accent-soft);
}
/* Status Badges */
/* Form Elements */
.field {
margin-bottom: 16px;
}
.field label {
display: block;
margin-bottom: 8px;
font-weight: 500;
}
.field input, .field select, .field textarea {
width: 100%;
padding: 4px 11px;
border: 1px solid var(--border);
border-radius: var(--radius-md);
transition: all 0.2s;
}
.field input:focus, .field select:focus {
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
outline: 0;
}
/* Toggle Switch (Ant Design Style) */
.switch {
position: relative;
display: inline-block;
width: 44px;
height: 22px;
vertical-align: middle;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.25);
transition: .2s;
border-radius: 100px;
}
.slider:before {
position: absolute;
content: "";
height: 18px;
width: 18px;
left: 2px;
bottom: 2px;
background-color: white;
transition: .2s;
border-radius: 50%;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
input:checked + .slider {
background-color: var(--accent);
}
input:checked + .slider:before {
transform: translateX(22px);
}
/* Status Pills */
.status-pill {
padding: 6px 12px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
display: inline-flex;
padding: 0 7px;
font-size: 12px;
line-height: 20px;
border-radius: 4px;
display: inline-block;
}
.status-ok { background: rgba(101, 240, 183, 0.12); color: var(--success); border: 1px solid rgba(101, 240, 183, 0.2); }
.status-warn { background: rgba(255, 202, 122, 0.12); color: var(--warn); border: 1px solid rgba(255, 202, 122, 0.2); }
.status-danger { background: rgba(255, 141, 181, 0.12); color: var(--danger); border: 1px solid rgba(255, 141, 181, 0.2); }
/* Progress */
.progress-bar {
height: 8px;
background: rgba(255, 255, 255, 0.06);
border-radius: 999px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--accent), var(--accent-strong));
box-shadow: 0 0 12px var(--accent-soft);
}
.status-ok { background: #f6ffed; border: 1px solid #b7eb8f; color: #52c41a; }
.status-warn { background: #fffbe6; border: 1px solid #ffe58f; color: #faad14; }
.status-danger { background: #fff1f0; border: 1px solid #ffa39e; color: #ff4d4f; }
/* Modal */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(8px);
z-index: 100;
display: grid;
place-items: center;
padding: 24px;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1000;
background-color: rgba(0, 0, 0, 0.45);
display: flex;
align-items: flex-start;
justify-content: center;
padding-top: 100px;
}
.modal-card {
width: min(100%, 640px);
animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
background: #fff;
border-radius: var(--radius-lg);
box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
width: 520px;
overflow: hidden;
animation: modalIn 0.2s cubic-bezier(0.075, 0.82, 0.165, 1);
}
@keyframes modalIn {
from { opacity: 0; transform: scale(0.9) translateY(20px); }
to { opacity: 1; transform: scale(1) translateY(0); }
from { opacity: 0; transform: scale(0.9); }
to { opacity: 1; transform: scale(1); }
}
/* Pagination */
.pagination-shell {
/* Loading busy state */
.btn.busy {
opacity: 0.6;
cursor: not-allowed;
pointer-events: none;
}
/* Sidebar Submenus */
.sidebar-submenu {
margin-top: 2px;
padding-left: 24px;
}
.sidebar-submenu.collapsed {
display: none;
}
.sidebar-nav-item-header {
display: flex;
align-items: center;
gap: 12px;
margin-top: 24px;
justify-content: space-between;
padding: 10px 16px;
cursor: pointer;
border-radius: var(--radius-md);
color: var(--text-dim);
}
.page-btn {
width: 40px;
.sidebar-nav-item-header:hover {
background: rgba(0, 0, 0, 0.04);
}
/* Login Page Styling */
.login-container {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #f0f2f5;
}
.login-card {
width: 400px;
padding: 40px;
background: #fff;
border-radius: var(--radius-lg);
box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.login-header h1 {
text-align: center;
font-size: 32px;
font-weight: 600;
margin: 0 0 8px;
}
.login-header p {
text-align: center;
color: var(--text-faint);
margin-bottom: 32px;
}
.login-field {
margin-bottom: 24px;
}
.login-field label {
display: block;
margin-bottom: 8px;
color: var(--text-dim);
}
.input-wrapper input {
height: 40px;
display: grid;
place-items: center;
border-radius: 12px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid var(--border);
transition: all 0.2s ease;
}
.page-btn.active {
background: var(--accent);
color: #050d16;
border-color: var(--accent);
.btn-login {
width: 100%;
height: 40px;
font-size: 16px;
}
/* Responsive */
@media (max-width: 1024px) {
.admin-shell { grid-template-columns: 1fr; }
.admin-sidebar { position: static; height: auto; display: none; } /* Mobile sidebar handled differently */
.admin-main { padding: 24px; }
.grid-3 { grid-template-columns: 1fr; }
}
/* Animation Utilities */
.fade-in {
animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
@media (max-width: 900px) {
.admin-sidebar {
display: none;
}
.admin-main {
margin-left: 0;
}
.grid-3 {
grid-template-columns: 1fr;
}
}