所有需求实现完成

This commit is contained in:
Your Name
2026-02-01 15:57:42 +08:00
parent e651b92d7c
commit 6e1174a59a
16 changed files with 2354 additions and 173 deletions
+302 -108
View File
@@ -193,116 +193,163 @@ body {
/* ---------- 主应用 · 侧栏(类似播放器/歌单区) ---------- */
.app {
display: flex;
flex-direction: column;
min-height: 100vh;
background: var(--bg-base);
}
.sidebar {
width: 240px;
min-width: 240px;
background: var(--bg-elevated);
border-right: 1px solid var(--border);
color: var(--text);
display: flex;
flex-direction: column;
padding: var(--space-24) 0;
}
.sidebar-brand {
/* ---------- 页面右上角用户栏(集成在 header-actions 内) ---------- */
.topbar-user {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0 var(--space-24) var(--space-24);
border-bottom: 1px solid var(--border);
margin-bottom: var(--space-16);
gap: var(--space-16);
margin-left: var(--space-16);
padding-left: var(--space-16);
border-left: 1px solid var(--border);
}
.brand-icon {
font-size: 1.25rem;
color: var(--accent-violet-light);
font-weight: 300;
}
.brand-text {
font-family: var(--font-head);
.topbar-user .user-info {
font-size: 0.875rem;
font-weight: 400;
font-size: 0.95rem;
letter-spacing: 0.02em;
color: var(--text);
}
.sidebar-nav {
flex: 0 0 auto;
}
.nav-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.65rem var(--space-24);
color: var(--text-muted);
text-decoration: none;
transition: color 0.2s var(--ease), background 0.2s var(--ease);
margin: 0;
padding: 0;
}
.nav-item:hover {
color: var(--text);
background: var(--bg-hover);
}
.nav-item.active {
color: var(--accent-violet-light);
background: rgba(139, 92, 246, 0.12);
font-weight: 400;
}
.nav-icon {
font-size: 1rem;
opacity: 0.85;
color: var(--text-dim);
}
.nav-item.active .nav-icon {
color: var(--accent-violet-light);
}
.sidebar-footer {
padding: var(--space-16) var(--space-24) 0;
border-top: 1px solid var(--border);
}
.user-info {
display: block;
font-size: 0.75rem;
font-weight: 300;
color: var(--text-muted);
margin-bottom: var(--space-16);
padding: 0 var(--space-24);
}
.btn-logout {
width: calc(100% - var(--space-24) * 2);
margin: 0 var(--space-24);
padding: 0.5rem;
.topbar-user .btn-logout {
width: auto;
margin: 0;
padding: 0.4rem 0.85rem;
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text-muted);
font-size: 0.875rem;
font-size: 0.8125rem;
font-weight: 400;
cursor: pointer;
transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.btn-logout:hover {
.topbar-user .btn-logout:hover {
color: var(--text);
border-color: var(--accent-violet);
background: var(--bg-hover);
}
.topbar-user .topbar-link {
color: var(--accent-cyan);
text-decoration: none;
font-size: 0.875rem;
font-weight: 400;
transition: color 0.2s var(--ease);
}
.topbar-user .topbar-link:hover {
color: var(--accent-violet-light);
}
/* ---------- 用户弹窗 ---------- */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.5);
opacity: 0;
visibility: hidden;
transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
z-index: 200;
}
.modal-overlay.visible {
opacity: 1;
visibility: visible;
}
.modal {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 90%;
max-width: 400px;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow-soft);
z-index: 201;
opacity: 0;
visibility: hidden;
transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}
.modal.visible {
opacity: 1;
visibility: visible;
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--space-24);
border-bottom: 1px solid var(--border);
}
.modal-title {
font-family: var(--font-head);
font-size: 1.125rem;
font-weight: 400;
margin: 0;
color: var(--text);
}
.modal-close {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
background: none;
border: none;
border-radius: var(--radius-sm);
font-size: 1.25rem;
color: var(--text-muted);
cursor: pointer;
transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.modal-close:hover {
color: var(--text);
background: var(--bg-hover);
}
.modal-form {
padding: var(--space-24);
}
.modal-form .form-group {
margin-bottom: var(--space-16);
}
.modal-form .form-group label {
display: block;
font-size: 0.8125rem;
margin-bottom: 0.35rem;
color: var(--text-muted);
}
.modal-actions {
display: flex;
justify-content: flex-end;
gap: var(--space-16);
margin-top: var(--space-24);
padding-top: var(--space-16);
border-top: 1px solid var(--border);
}
/* ---------- 主内容区 ---------- */
.main {
flex: 1;
min-height: 0;
overflow: auto;
padding: var(--space-24) var(--space-32) var(--space-32);
background: var(--bg-base);
@@ -316,6 +363,157 @@ body {
display: block;
}
/* ---------- 统计页 ---------- */
.view-statistics .page-header {
margin-bottom: var(--space-24);
}
.stats-loading,
.stats-empty {
text-align: center;
padding: var(--space-32);
color: var(--text-muted);
}
.stats-empty .empty-icon {
font-size: 3rem;
display: block;
margin-bottom: var(--space-16);
}
.stats-desc {
margin: 0 0 var(--space-24);
font-size: 0.9375rem;
color: var(--text-muted);
}
.stats-cards {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: var(--space-24);
}
.stats-card {
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: var(--space-24);
box-shadow: var(--shadow-soft);
}
.stats-card-wide {
grid-column: 1 / -1;
max-width: 560px;
justify-self: start;
}
.stats-card-title {
font-family: var(--font-head);
font-size: 0.9375rem;
font-weight: 400;
color: var(--text-muted);
margin: 0 0 var(--space-16);
}
.stats-card-value {
font-family: var(--font-head);
font-size: 1.75rem;
font-weight: 400;
color: var(--accent-cyan);
margin-bottom: var(--space-16);
}
.stats-chart {
display: block;
max-width: 100%;
height: auto;
}
.stats-chart-pie {
max-height: 260px;
}
/* ---------- 全局统计页 ---------- */
.view-global-stats .page-header {
margin-bottom: var(--space-16);
}
.global-stats-desc {
margin: 0 0 var(--space-24);
font-size: 0.9375rem;
color: var(--text-muted);
}
.global-stats-tabs {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: var(--space-24);
border-bottom: 1px solid var(--border);
padding-bottom: 0.5rem;
}
.global-stats-tab {
padding: 0.5rem 1rem;
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text-muted);
font-size: 0.875rem;
cursor: pointer;
transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.global-stats-tab:hover {
color: var(--text);
border-color: var(--accent-violet);
background: var(--bg-hover);
}
.global-stats-tab.active {
color: var(--accent-cyan);
border-color: var(--accent-violet);
background: var(--bg-hover);
}
.global-stats-content {
min-height: 200px;
}
.global-stats-loading,
.global-stats-empty {
text-align: center;
padding: var(--space-32);
color: var(--text-muted);
}
.global-stats-empty .empty-icon {
font-size: 2.5rem;
display: block;
margin-bottom: var(--space-16);
}
.global-stats-total {
margin: 0 0 var(--space-16);
font-size: 1rem;
color: var(--accent-cyan);
}
.global-stats-charts-wrap {
margin-bottom: var(--space-24);
}
.global-stats-charts-loading {
text-align: center;
padding: var(--space-16);
color: var(--text-muted);
font-size: 0.9375rem;
}
.global-stats-cards {
margin-top: 0;
}
.page-header {
display: flex;
align-items: center;
@@ -394,6 +592,22 @@ body {
cursor: not-allowed;
}
.btn-secondary {
background: var(--accent-teal);
border-color: transparent;
color: #fff;
}
.btn-secondary:hover:not(:disabled) {
background: #0d9488;
box-shadow: 0 0 20px rgba(20, 184, 166, 0.35);
}
.btn-secondary:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn-ghost {
background: transparent;
color: var(--text-muted);
@@ -662,6 +876,13 @@ body {
color: var(--text-muted);
}
.pagination-page {
font-size: 0.8125rem;
font-weight: 300;
color: var(--text-muted);
margin-left: var(--space-16);
}
.pagination-btns {
display: flex;
gap: var(--space-16);
@@ -938,33 +1159,6 @@ body {
grid-template-columns: 1fr;
}
.sidebar {
width: 64px;
min-width: 64px;
padding: var(--space-16) 0;
}
.brand-text,
.nav-item span:not(.nav-icon),
.user-info,
.btn-logout {
display: none;
}
.sidebar-brand {
justify-content: center;
padding: 0 var(--space-16) var(--space-16);
}
.nav-item {
justify-content: center;
padding: 0.75rem;
}
.sidebar-footer {
padding: var(--space-16);
}
.drawer {
width: 100%;
}