完善后台样式
This commit is contained in:
+406
-100
@@ -1,44 +1,130 @@
|
|||||||
/* 平台超管后台 · 仅补充 admin 专属的少量样式;外壳/导航/卡片全部复用 design-restraint.css 共享类。
|
/* 平台后台 · 对齐影擎工作台:白顶栏、冷灰底、Klein 选中、黑胶囊分段。
|
||||||
遵守铁律:只用 token,不写裸 hex,8px 圆角,单橙 accent。 */
|
选择器收敛在 .admin-app / .admin-page,不改共享 .btn/.pill/.input 定义。 */
|
||||||
|
|
||||||
/* 品牌下方的超管标记(mono 品牌签名) */
|
.admin-app {
|
||||||
.admin-badge {
|
--klein: #002fa7;
|
||||||
margin: 2px 0 14px;
|
--klein-hover: #002680;
|
||||||
padding: 0 4px;
|
--st-black: #101012;
|
||||||
font-size: 11px;
|
--st-muted: #6f747c;
|
||||||
color: var(--black-alpha-48);
|
--st-text: #17181a;
|
||||||
|
--st-line: rgba(34, 42, 54, 0.10);
|
||||||
|
--st-wash: rgba(34, 42, 54, 0.045);
|
||||||
|
--st-hover: rgba(34, 42, 54, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-app .sidebar .nav-panel {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: calc(100vh - 116px);
|
||||||
|
min-height: 0;
|
||||||
|
padding: 10px 0 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-rail {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 0 16px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-rail-mark {
|
||||||
|
margin: 4px 8px 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--st-muted);
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-nav-group {
|
.admin-nav-group { margin-top: 10px; }
|
||||||
margin-bottom: 2px;
|
|
||||||
|
.admin-group {
|
||||||
|
margin: 0 8px 4px;
|
||||||
|
padding: 8px 4px 2px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--st-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-link {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 38px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 0 12px;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: transparent;
|
||||||
|
color: rgba(39, 42, 47, 0.62);
|
||||||
|
font: inherit;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: left;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: color 180ms ease, background 180ms ease, transform 180ms ease;
|
||||||
|
}
|
||||||
|
.admin-link svg {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
color: currentColor;
|
||||||
|
}
|
||||||
|
.admin-link:hover {
|
||||||
|
color: var(--klein);
|
||||||
|
background: rgba(0, 47, 167, 0.055);
|
||||||
|
transform: translateX(2px);
|
||||||
|
}
|
||||||
|
.admin-link.active {
|
||||||
|
color: var(--klein);
|
||||||
|
background: rgba(0, 47, 167, 0.09);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 侧栏底部:返回工作台 + 超管身份 + 退出 */
|
|
||||||
.admin-foot {
|
.admin-foot {
|
||||||
|
flex-shrink: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
padding: 12px 16px 16px;
|
||||||
|
border-top: 1px solid var(--st-line);
|
||||||
|
background: rgba(28, 34, 43, 0.02);
|
||||||
}
|
}
|
||||||
.admin-back {
|
.admin-back {
|
||||||
align-self: flex-start;
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
height: 36px;
|
||||||
|
padding: 0 10px;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--st-muted);
|
||||||
|
font: inherit;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 500;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.admin-back:hover { color: var(--st-text); background: var(--st-hover); }
|
||||||
|
.admin-back svg { width: 16px; height: 16px; }
|
||||||
|
|
||||||
.admin-user {
|
.admin-user {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
padding: 8px;
|
padding: 8px 10px 8px 8px;
|
||||||
border-radius: var(--r-md);
|
border-radius: 999px;
|
||||||
|
background: #f3f4f7;
|
||||||
}
|
}
|
||||||
.admin-user .av {
|
.admin-user .av {
|
||||||
width: 30px;
|
width: 36px;
|
||||||
height: 30px;
|
height: 36px;
|
||||||
border-radius: 6px;
|
border-radius: 50%;
|
||||||
background: var(--heat-12);
|
background: var(--st-black);
|
||||||
color: var(--heat);
|
color: #fff;
|
||||||
display: grid;
|
display: grid;
|
||||||
place-items: center;
|
place-items: center;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
@@ -51,74 +137,267 @@
|
|||||||
.admin-user-meta .nm {
|
.admin-user-meta .nm {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--accent-black);
|
color: var(--st-text);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
.admin-user-meta .rl {
|
.admin-user-meta .rl {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: var(--black-alpha-48);
|
color: var(--st-muted);
|
||||||
letter-spacing: 0.02em;
|
|
||||||
}
|
}
|
||||||
.admin-logout {
|
.admin-logout {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--st-muted);
|
||||||
|
cursor: pointer;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
.admin-logout:hover { color: var(--st-text); background: var(--st-hover); }
|
||||||
|
|
||||||
/* 概览页快捷入口网格(复用 .shortcut 卡片) */
|
.admin-app .topbar {
|
||||||
.admin-tip {
|
height: 116px;
|
||||||
margin-bottom: 0;
|
min-height: 116px;
|
||||||
|
padding: 0 28px;
|
||||||
|
background: #fff;
|
||||||
|
border-bottom: 1px solid rgba(27, 32, 40, 0.08);
|
||||||
}
|
}
|
||||||
.admin-shortcut-grid {
|
.admin-crumb {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--st-muted);
|
||||||
|
}
|
||||||
|
.admin-crumb button {
|
||||||
|
border: 0;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--st-muted);
|
||||||
|
font: inherit;
|
||||||
|
font-size: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.admin-crumb button:hover { color: var(--st-text); }
|
||||||
|
.admin-crumb span {
|
||||||
|
color: var(--st-text);
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
.admin-crumb span::before {
|
||||||
|
content: "/";
|
||||||
|
margin-right: 10px;
|
||||||
|
color: var(--st-muted);
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
.admin-mode {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 32px;
|
||||||
|
padding: 0 12px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(0, 47, 167, 0.08);
|
||||||
|
color: var(--klein);
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-page {
|
||||||
|
width: 100%;
|
||||||
|
max-width: none;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: -24px -28px -60px;
|
||||||
|
padding: 52px clamp(40px, 3.2vw, 68px) 48px;
|
||||||
|
}
|
||||||
|
.admin-page .page-head {
|
||||||
|
margin-bottom: 28px;
|
||||||
|
}
|
||||||
|
.admin-page .page-head h1 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 32px;
|
||||||
|
line-height: 1.2;
|
||||||
|
letter-spacing: -.02em;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--accent-black);
|
||||||
|
}
|
||||||
|
.admin-page .page-head .sub,
|
||||||
|
.admin-page .page-head p {
|
||||||
|
margin: 10px 0 0;
|
||||||
|
font-size: 15px;
|
||||||
|
color: var(--st-muted);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.admin-page .page-head .sub .mono {
|
||||||
|
color: var(--st-muted);
|
||||||
|
letter-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-overview {
|
||||||
|
width: min(1220px, 100%);
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.admin-welcome {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 22px;
|
||||||
|
}
|
||||||
|
.admin-welcome h1 {
|
||||||
|
margin: 0 0 8px;
|
||||||
|
font-size: 28px;
|
||||||
|
line-height: 1.2;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: -.02em;
|
||||||
|
color: var(--accent-black);
|
||||||
|
}
|
||||||
|
.admin-welcome p {
|
||||||
|
margin: 0;
|
||||||
|
color: #363a41;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.admin-groups {
|
||||||
|
width: 100%;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
gap: 14px;
|
gap: 22px 18px;
|
||||||
margin-top: 24px;
|
align-items: start;
|
||||||
}
|
}
|
||||||
.admin-shortcut-text {
|
.admin-col {
|
||||||
|
display: grid;
|
||||||
|
gap: 18px;
|
||||||
|
align-content: start;
|
||||||
|
}
|
||||||
|
.admin-group-block { display: grid; gap: 8px; }
|
||||||
|
.admin-group-label {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
gap: 8px;
|
||||||
|
padding-left: 2px;
|
||||||
|
}
|
||||||
|
.admin-group-label strong {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--accent-black);
|
||||||
|
}
|
||||||
|
.admin-group-label span {
|
||||||
|
color: var(--st-muted);
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
.admin-entry-pair {
|
||||||
|
display: grid;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
.admin-entry {
|
||||||
|
width: 100%;
|
||||||
|
height: 68px;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 24px minmax(0, 1fr) 16px;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 0 14px;
|
||||||
|
border: 1px solid rgba(203, 208, 216, 0.72);
|
||||||
|
border-radius: 10px;
|
||||||
|
background: rgba(249, 250, 252, 0.9);
|
||||||
|
color: #263247;
|
||||||
|
font: inherit;
|
||||||
|
text-align: left;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.96),
|
||||||
|
0 6px 16px rgba(20, 27, 38, 0.07);
|
||||||
|
transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
|
||||||
|
}
|
||||||
|
.admin-entry:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
background: rgba(252, 253, 254, 0.94);
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 #fff,
|
||||||
|
0 10px 22px rgba(42, 53, 74, 0.12);
|
||||||
|
}
|
||||||
|
.admin-entry svg {
|
||||||
|
display: block;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
color: var(--klein);
|
||||||
|
}
|
||||||
|
.admin-entry svg:last-child { color: #263247; width: 16px; height: 16px; }
|
||||||
|
.admin-entry-copy {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
gap: 2px;
|
||||||
|
min-width: 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.admin-entry-copy strong {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: -.01em;
|
||||||
|
}
|
||||||
|
.admin-entry-copy small {
|
||||||
|
overflow: hidden;
|
||||||
|
color: #727b8a;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.35;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 顶栏面包屑链接可点 */
|
|
||||||
.admin-app .topbar .crumbs a {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── 邀请码页:筛选条 + 表格 + 弹窗 ── */
|
|
||||||
.admin-toolbar {
|
.admin-toolbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
margin: 4px 0 16px;
|
margin: 4px 0 16px;
|
||||||
}
|
}
|
||||||
/* 类型筛选 = 模式切换段控(模式切换用黑激活,不抢主橙) */
|
|
||||||
.tabs-sub {
|
.tabs-sub {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
background: var(--surface);
|
background: var(--st-wash);
|
||||||
border: 1px solid var(--border-faint);
|
border: 1px solid var(--st-line);
|
||||||
border-radius: var(--r-md);
|
border-radius: 8px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
.tab-sub {
|
.tab-sub {
|
||||||
height: 28px;
|
height: 32px;
|
||||||
padding: 0 14px;
|
padding: 0 14px;
|
||||||
border: 0;
|
border: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
font-size: 12.5px;
|
font-size: 13px;
|
||||||
color: var(--black-alpha-56);
|
font-weight: 500;
|
||||||
|
color: var(--st-muted);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background var(--t-base), color var(--t-base);
|
transition: background 160ms ease, color 160ms ease;
|
||||||
}
|
}
|
||||||
.tab-sub:hover { background: var(--black-alpha-4); color: var(--accent-black); }
|
.tab-sub:hover { background: var(--st-hover); color: var(--st-text); }
|
||||||
.tab-sub.active { background: var(--accent-black); color: var(--accent-white); }
|
.tab-sub.active { background: var(--st-black); color: #fff; }
|
||||||
|
|
||||||
|
.admin-search { width: 220px; margin-left: auto; }
|
||||||
|
|
||||||
.admin-table-wrap { overflow-x: auto; }
|
.admin-table-wrap { overflow-x: auto; }
|
||||||
.admin-table { width: 100%; }
|
.admin-page table.t.admin-table {
|
||||||
|
background: #fff;
|
||||||
|
border-color: var(--st-line);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
.admin-page table.t.admin-table thead th {
|
||||||
|
background: var(--st-wash);
|
||||||
|
border-bottom-color: var(--st-line);
|
||||||
|
text-transform: none;
|
||||||
|
letter-spacing: 0;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--st-muted);
|
||||||
|
}
|
||||||
.admin-table .admin-code { font-size: 12.5px; color: var(--accent-black); letter-spacing: 0.02em; }
|
.admin-table .admin-code { font-size: 12.5px; color: var(--accent-black); letter-spacing: 0.02em; }
|
||||||
.admin-table .col-time { color: var(--black-alpha-56); font-size: 12px; }
|
.admin-table .col-time { color: var(--st-muted); font-size: 12px; }
|
||||||
.admin-table .col-actions { text-align: right; white-space: nowrap; }
|
.admin-table .col-actions { text-align: right; white-space: nowrap; }
|
||||||
.admin-table td .muted { color: var(--black-alpha-32); }
|
.admin-table td .muted { color: var(--black-alpha-32); }
|
||||||
.admin-table .btn-ghost.danger:hover { color: var(--accent-crimson); }
|
.admin-table .btn-ghost.danger:hover { color: var(--accent-crimson); }
|
||||||
@@ -130,8 +409,6 @@
|
|||||||
margin: 0 0 16px;
|
margin: 0 0 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── 团队 / 用户管理 ── */
|
|
||||||
.admin-search { width: 220px; margin-left: auto; }
|
|
||||||
.modal.modal-wide { max-width: 640px; }
|
.modal.modal-wide { max-width: 640px; }
|
||||||
.admin-detail-meta {
|
.admin-detail-meta {
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -140,18 +417,19 @@
|
|||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
.admin-detail-meta > div { display: flex; flex-direction: column; gap: 3px; }
|
.admin-detail-meta > div { display: flex; flex-direction: column; gap: 3px; }
|
||||||
.admin-detail-meta .k { font-size: 11.5px; color: var(--black-alpha-48); font-family: var(--font-mono); }
|
.admin-detail-meta .k { font-size: 11.5px; color: var(--st-muted); }
|
||||||
.admin-detail-meta .v { font-size: 14px; color: var(--accent-black); }
|
.admin-detail-meta .v { font-size: 14px; color: var(--accent-black); }
|
||||||
.admin-detail-subhead { font-size: 13px; font-weight: 500; color: var(--accent-black); margin: 8px 0 10px; }
|
.admin-detail-subhead { font-size: 13px; font-weight: 500; color: var(--accent-black); margin: 8px 0 10px; }
|
||||||
.admin-inline-pill { margin-left: 8px; }
|
.admin-inline-pill { margin-left: 8px; }
|
||||||
|
|
||||||
/* ── 质量词:按 stage 分组 + 编辑模式 chip ── */
|
|
||||||
.qw-stages { display: flex; flex-direction: column; gap: 16px; }
|
.qw-stages { display: flex; flex-direction: column; gap: 16px; }
|
||||||
.qw-stage { padding: 18px 20px; }
|
.qw-stage {
|
||||||
|
padding: 18px 20px;
|
||||||
|
}
|
||||||
.qw-stage-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
|
.qw-stage-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
|
||||||
.qw-stage-title { font-size: 14px; font-weight: 500; color: var(--accent-black); }
|
.qw-stage-title { font-size: 14px; font-weight: 500; color: var(--accent-black); }
|
||||||
.qw-stage-hint { font-size: 11px; color: var(--black-alpha-48); }
|
.qw-stage-hint { font-size: 11px; color: var(--st-muted); }
|
||||||
.qw-empty { font-size: 12px; color: var(--black-alpha-48); }
|
.qw-empty { font-size: 12px; color: var(--st-muted); }
|
||||||
.qw-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
.qw-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
||||||
.qw-chip {
|
.qw-chip {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
@@ -159,13 +437,13 @@
|
|||||||
gap: 6px;
|
gap: 6px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
padding: 0 12px;
|
padding: 0 12px;
|
||||||
background: var(--heat-12);
|
background: rgba(0, 47, 167, 0.07);
|
||||||
border: 1px solid var(--heat-20);
|
border: 1px solid rgba(0, 47, 167, 0.16);
|
||||||
border-radius: var(--r-pill);
|
border-radius: var(--r-pill);
|
||||||
font-size: 12.5px;
|
font-size: 12.5px;
|
||||||
color: var(--heat);
|
color: var(--klein);
|
||||||
}
|
}
|
||||||
.qw-chip.editing { background: var(--surface); border-color: var(--border-faint); padding: 0 6px 0 10px; }
|
.qw-chip.editing { background: var(--surface); border-color: var(--st-line); padding: 0 6px 0 10px; }
|
||||||
.qw-chip-input {
|
.qw-chip-input {
|
||||||
border: 0;
|
border: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -190,13 +468,12 @@
|
|||||||
height: 18px;
|
height: 18px;
|
||||||
border: 0;
|
border: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--black-alpha-48);
|
color: var(--st-muted);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
.qw-del:hover { color: var(--accent-crimson); background: var(--black-alpha-4); }
|
.qw-del:hover { color: var(--accent-crimson); background: var(--black-alpha-4); }
|
||||||
|
|
||||||
/* ── 资产审核队列 ── */
|
|
||||||
.admin-table .col-check { width: 36px; text-align: center; }
|
.admin-table .col-check { width: 36px; text-align: center; }
|
||||||
.admin-thumb-btn {
|
.admin-thumb-btn {
|
||||||
display: block;
|
display: block;
|
||||||
@@ -210,7 +487,7 @@
|
|||||||
}
|
}
|
||||||
.admin-thumb-btn:focus-visible {
|
.admin-thumb-btn:focus-visible {
|
||||||
outline: none;
|
outline: none;
|
||||||
box-shadow: 0 0 0 2px var(--background-base), 0 0 0 4px var(--heat-40);
|
box-shadow: 0 0 0 2px var(--background-base), 0 0 0 4px rgba(0, 47, 167, 0.28);
|
||||||
}
|
}
|
||||||
.admin-thumb {
|
.admin-thumb {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
@@ -218,7 +495,7 @@
|
|||||||
border-radius: var(--r-md);
|
border-radius: var(--r-md);
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
background: var(--background-lighter);
|
background: var(--background-lighter);
|
||||||
border: 1px solid var(--border-faint);
|
border: 1px solid var(--st-line);
|
||||||
display: block;
|
display: block;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
@@ -235,8 +512,6 @@
|
|||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
cursor: help;
|
cursor: help;
|
||||||
}
|
}
|
||||||
/* 独立类名,避开商品库/项目页全局黑底 `.bulk-bar button`(白字透明边),
|
|
||||||
否则管理台白底浮条上按钮文字不可见,只剩一条扁边框。 */
|
|
||||||
.admin-bulk-bar {
|
.admin-bulk-bar {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
@@ -247,9 +522,8 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
padding: 10px 16px;
|
padding: 10px 16px;
|
||||||
background: var(--surface-raised);
|
background: var(--surface-raised);
|
||||||
border: 1px solid var(--border-faint);
|
border: 1px solid var(--st-line);
|
||||||
border-radius: var(--r-md);
|
border-radius: var(--r-md);
|
||||||
box-shadow: var(--shadow-floating);
|
|
||||||
z-index: 50;
|
z-index: 50;
|
||||||
}
|
}
|
||||||
.admin-bulk-count {
|
.admin-bulk-count {
|
||||||
@@ -259,12 +533,11 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── 任务监控 ── */
|
|
||||||
.admin-anomaly-chip { height: 28px; padding: 0 14px; font-size: 12.5px; cursor: pointer; }
|
.admin-anomaly-chip { height: 28px; padding: 0 14px; font-size: 12.5px; cursor: pointer; }
|
||||||
.admin-drawer { width: 620px; max-width: 92vw; }
|
.admin-drawer { width: 620px; max-width: 92vw; }
|
||||||
.admin-json {
|
.admin-json {
|
||||||
background: var(--background-lighter);
|
background: var(--st-wash);
|
||||||
border: 1px solid var(--border-faint);
|
border: 1px solid var(--st-line);
|
||||||
border-radius: var(--r-md);
|
border-radius: var(--r-md);
|
||||||
padding: 12px 14px;
|
padding: 12px 14px;
|
||||||
margin: 0 0 16px;
|
margin: 0 0 16px;
|
||||||
@@ -281,22 +554,20 @@
|
|||||||
.admin-attempt-list {
|
.admin-attempt-list {
|
||||||
margin: 0 0 20px;
|
margin: 0 0 20px;
|
||||||
background: var(--surface);
|
background: var(--surface);
|
||||||
border: 1px solid var(--border-muted);
|
border: 1px solid var(--st-line);
|
||||||
border-radius: var(--r-md);
|
border-radius: var(--r-md);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.admin-attempt {
|
.admin-attempt { padding: 14px 16px; }
|
||||||
padding: 14px 16px;
|
.admin-attempt + .admin-attempt { border-top: 1px solid var(--st-line); }
|
||||||
}
|
|
||||||
.admin-attempt + .admin-attempt { border-top: 1px solid var(--border-faint); }
|
|
||||||
.admin-attempt-head {
|
.admin-attempt-head {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
.admin-attempt-seq { color: var(--black-alpha-48); font-size: 11px; }
|
.admin-attempt-seq { color: var(--st-muted); font-size: 11px; }
|
||||||
.admin-attempt-kind { margin-left: auto; color: var(--black-alpha-56); font-size: 11px; }
|
.admin-attempt-kind { margin-left: auto; color: var(--st-muted); font-size: 11px; }
|
||||||
.admin-attempt-model {
|
.admin-attempt-model {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
@@ -312,7 +583,7 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 4px 14px;
|
gap: 4px 14px;
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
color: var(--black-alpha-48);
|
color: var(--st-muted);
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
.admin-attempt-error {
|
.admin-attempt-error {
|
||||||
@@ -334,7 +605,6 @@
|
|||||||
.admin-attempt-kind { width: 100%; margin-left: 0; }
|
.admin-attempt-kind { width: 100%; margin-left: 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── 计费 / 额度策略 ── */
|
|
||||||
.admin-switch-row {
|
.admin-switch-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -345,9 +615,8 @@
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
.admin-switch-row input { width: 14px; height: 14px; accent-color: var(--heat); }
|
.admin-switch-row input { width: 14px; height: 14px; accent-color: var(--klein); }
|
||||||
|
|
||||||
/* ── 治理:数据体检卡 + 项目监控 ── */
|
|
||||||
.gov-integrity {
|
.gov-integrity {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
||||||
@@ -359,32 +628,69 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
padding: 16px 18px;
|
padding: 16px 18px;
|
||||||
background: var(--surface);
|
background: #fff;
|
||||||
border: 1px solid var(--border-faint);
|
border: 1px solid var(--st-line);
|
||||||
border-radius: var(--r-md);
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
.gov-card.warn { border-color: var(--heat-20); background: var(--heat-12); }
|
.gov-card.warn { border-color: rgba(0, 47, 167, 0.22); background: rgba(0, 47, 167, 0.06); }
|
||||||
.gov-count { font-size: 28px; font-weight: 500; color: var(--accent-black); font-variant-numeric: tabular-nums; line-height: 1.1; }
|
.gov-count { font-size: 28px; font-weight: 500; color: var(--accent-black); font-variant-numeric: tabular-nums; line-height: 1.1; }
|
||||||
.gov-card.warn .gov-count { color: var(--heat); }
|
.gov-card.warn .gov-count { color: var(--klein); }
|
||||||
.gov-label { font-size: 12px; color: var(--black-alpha-56); }
|
.gov-label { font-size: 12px; color: var(--st-muted); }
|
||||||
.gov-total { margin-left: auto; font-size: 12px; color: var(--black-alpha-48); }
|
.gov-total { margin-left: auto; font-size: 12px; color: var(--st-muted); }
|
||||||
|
|
||||||
/* 提示词模板页(仅 token,8px 圆角,单橙 accent) */
|
|
||||||
.pt-list { display: flex; flex-direction: column; gap: 14px; }
|
.pt-list { display: flex; flex-direction: column; gap: 14px; }
|
||||||
.pt-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
|
.pt-card {
|
||||||
|
padding: 16px 18px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
.pt-card.pt-off { opacity: .6; }
|
.pt-card.pt-off { opacity: .6; }
|
||||||
.pt-head { display: flex; align-items: center; gap: 10px; }
|
.pt-head { display: flex; align-items: center; gap: 10px; }
|
||||||
.pt-title { font-size: 14px; font-weight: 600; color: var(--accent-black); }
|
.pt-title { font-size: 14px; font-weight: 600; color: var(--accent-black); }
|
||||||
.pt-key { font-size: 11.5px; color: var(--black-alpha-40); }
|
.pt-key { font-size: 11.5px; color: var(--st-muted); }
|
||||||
.pt-head .spacer { flex: 1; }
|
.pt-head .spacer { flex: 1; }
|
||||||
.pt-enabled { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--black-alpha-56); cursor: pointer; }
|
.pt-enabled { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--st-muted); cursor: pointer; }
|
||||||
.pt-vars { font-size: 11.5px; color: var(--black-alpha-48); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
|
.pt-vars { font-size: 11.5px; color: var(--st-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
|
||||||
.pt-vars code { background: var(--heat-12); color: var(--heat); border-radius: var(--r-sm); padding: 1px 6px; }
|
.pt-vars code {
|
||||||
.pt-vars-hint { color: var(--black-alpha-40); }
|
background: rgba(0, 47, 167, 0.08);
|
||||||
.pt-textarea { width: 100%; box-sizing: border-box; background: var(--background-base); border: 1px solid var(--border-faint); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13px; line-height: 1.6; color: var(--accent-black); font-family: var(--font-mono); resize: vertical; outline: none; transition: border-color var(--t-base), box-shadow var(--t-base); }
|
color: var(--klein);
|
||||||
.pt-textarea:focus { border-color: var(--heat); box-shadow: 0 0 0 3px var(--heat-12); }
|
border-radius: var(--r-sm);
|
||||||
|
padding: 1px 6px;
|
||||||
|
}
|
||||||
|
.pt-vars-hint { color: var(--st-muted); }
|
||||||
|
.pt-textarea {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: var(--st-wash);
|
||||||
|
border: 1px solid var(--st-line);
|
||||||
|
border-radius: var(--r-sm);
|
||||||
|
padding: 10px 12px;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: var(--accent-black);
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
resize: vertical;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
.pt-textarea:focus { border-color: var(--klein); box-shadow: 0 0 0 3px rgba(0, 47, 167, 0.12); }
|
||||||
.pt-foot { display: flex; align-items: center; gap: 8px; }
|
.pt-foot { display: flex; align-items: center; gap: 8px; }
|
||||||
.pt-ratio-label { font-size: 11.5px; color: var(--black-alpha-48); }
|
.pt-ratio-label { font-size: 11.5px; color: var(--st-muted); }
|
||||||
.pt-ratios { display: inline-flex; gap: 6px; }
|
.pt-ratios { display: inline-flex; gap: 6px; }
|
||||||
.pt-ratio-na { font-size: 12px; color: var(--black-alpha-40); }
|
.pt-ratio-na { font-size: 12px; color: var(--st-muted); }
|
||||||
.pt-foot .spacer { flex: 1; }
|
.pt-foot .spacer { flex: 1; }
|
||||||
|
|
||||||
|
.admin-page .card-hard {
|
||||||
|
background: #fff;
|
||||||
|
border-color: var(--st-line);
|
||||||
|
}
|
||||||
|
.admin-page .empty-state {
|
||||||
|
padding: 56px 24px;
|
||||||
|
background: var(--st-wash);
|
||||||
|
border: 1px dashed var(--st-line);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1100px) {
|
||||||
|
.admin-page { margin: -28px -24px -48px; padding: 28px 24px 40px; }
|
||||||
|
.admin-groups { grid-template-columns: 1fr; }
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import { ArrowLeft, ArrowRight, LogOut } from "lucide-react";
|
||||||
import { IconKitSvg } from "../../components/IconKitSvg";
|
import { IconKitSvg } from "../../components/IconKitSvg";
|
||||||
import { CornerMarks, Decorations, ToastLike } from "../../components/app-shell";
|
import { CornerMarks, Decorations, ToastLike } from "../../components/app-shell";
|
||||||
|
import { ConfirmModal } from "../../components/overlays";
|
||||||
import type { Team, User } from "../../types";
|
import type { Team, User } from "../../types";
|
||||||
import type { NavigateFn } from "../route-config";
|
import type { NavigateFn } from "../route-config";
|
||||||
import { AdminLedgersPage, AdminQuotaPage } from "./admin-billing";
|
import { AdminLedgersPage, AdminQuotaPage } from "./admin-billing";
|
||||||
@@ -15,8 +17,8 @@ import { AdminTeamsPage, AdminUsersPage } from "./admin-teams-users";
|
|||||||
|
|
||||||
export type AdminNotify = (type: "success" | "error" | "info", text: string) => void;
|
export type AdminNotify = (type: "success" | "error" | "info", text: string) => void;
|
||||||
|
|
||||||
// 平台超管后台 · 分阶段上线。section slug 与 URL /admin/<slug> 对应("" = 概览)。
|
// 平台超管后台 · section slug 与 URL /admin/<slug> 对应("" = 概览)。
|
||||||
// 视觉一律复用 restraint 外壳类(.app/.sidebar/.topbar/.content/.nav-section),只加极少 admin 专属样式。
|
// 外壳对齐影擎侧栏 / 顶栏,页面样式收敛在 admin-page.css。
|
||||||
export type AdminSection = {
|
export type AdminSection = {
|
||||||
slug: string;
|
slug: string;
|
||||||
label: string;
|
label: string;
|
||||||
@@ -41,7 +43,29 @@ export const ADMIN_SECTIONS: AdminSection[] = [
|
|||||||
{ slug: "governance", label: "治理", icon: "sliders", group: "系统", phase: 9 }
|
{ slug: "governance", label: "治理", icon: "sliders", group: "系统", phase: 9 }
|
||||||
];
|
];
|
||||||
|
|
||||||
const SECTION_GROUPS = ["概览", "团队 · 用户", "内容", "生成", "财务", "系统"];
|
const SECTION_GROUPS = ["团队 · 用户", "内容", "生成", "财务", "系统"];
|
||||||
|
|
||||||
|
const SECTION_BLURB: Record<string, string> = {
|
||||||
|
invites: "发放开团队码,开通新团队",
|
||||||
|
teams: "团队状态、成员与定价系数",
|
||||||
|
users: "停用账号、重置登录密码",
|
||||||
|
prompts: "生图 / 视频提示词模板",
|
||||||
|
quality: "各生成阶段的画质与风格词",
|
||||||
|
reviews: "人像资产送审与结果",
|
||||||
|
tasks: "生成任务、重试与异常",
|
||||||
|
providers: "模型供应商与可用模型",
|
||||||
|
billing: "积分流水与手动调额",
|
||||||
|
quota: "团队额度与消耗策略",
|
||||||
|
governance: "数据体检与项目监控"
|
||||||
|
};
|
||||||
|
|
||||||
|
const GROUP_HINT: Record<string, string> = {
|
||||||
|
"团队 · 用户": "邀请开通、团队状态与账号",
|
||||||
|
"内容": "提示词、质量词与人像审核",
|
||||||
|
"生成": "任务队列与模型供应商",
|
||||||
|
"财务": "积分流水与额度策略",
|
||||||
|
"系统": "数据体检与项目监控"
|
||||||
|
};
|
||||||
|
|
||||||
type AdminAppProps = {
|
type AdminAppProps = {
|
||||||
section: string;
|
section: string;
|
||||||
@@ -55,6 +79,7 @@ type AdminAppProps = {
|
|||||||
export function AdminApp({ section, user, team, navigateAdmin, navigate, logout }: AdminAppProps) {
|
export function AdminApp({ section, user, team, navigateAdmin, navigate, logout }: AdminAppProps) {
|
||||||
const active = ADMIN_SECTIONS.find((s) => s.slug === section) || ADMIN_SECTIONS[0];
|
const active = ADMIN_SECTIONS.find((s) => s.slug === section) || ADMIN_SECTIONS[0];
|
||||||
const [toast, setToast] = useState<{ type: "success" | "error" | "info"; text: string } | null>(null);
|
const [toast, setToast] = useState<{ type: "success" | "error" | "info"; text: string } | null>(null);
|
||||||
|
const [logoutOpen, setLogoutOpen] = useState(false);
|
||||||
const notify: AdminNotify = (type, text) => setToast({ type, text });
|
const notify: AdminNotify = (type, text) => setToast({ type, text });
|
||||||
|
|
||||||
// 进后台任一页都滚到顶,行为与主壳 navigate 一致
|
// 进后台任一页都滚到顶,行为与主壳 navigate 一致
|
||||||
@@ -85,86 +110,86 @@ export function AdminApp({ section, user, team, navigateAdmin, navigate, logout
|
|||||||
<span className="brand-clip"><img className="brand-logo" src="/assets/yz/logo-horizontal.png" alt="影擎" /></span>
|
<span className="brand-clip"><img className="brand-logo" src="/assets/yz/logo-horizontal.png" alt="影擎" /></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div className="admin-badge mono">[ PLATFORM ADMIN ]</div>
|
<div className="nav-panel">
|
||||||
{SECTION_GROUPS.map((group) => {
|
<div className="admin-rail">
|
||||||
const items = ADMIN_SECTIONS.filter((s) => s.group === group);
|
<p className="admin-rail-mark">平台后台</p>
|
||||||
if (items.length === 0) return null;
|
|
||||||
return (
|
|
||||||
<div key={group} className="admin-nav-group">
|
|
||||||
<div className="nav-section">{group}</div>
|
|
||||||
<nav>
|
|
||||||
{items.map((item) => (
|
|
||||||
<a
|
|
||||||
key={item.slug || "overview"}
|
|
||||||
href={item.slug ? `/admin/${item.slug}` : "/admin"}
|
|
||||||
className={active.slug === item.slug ? "active" : ""}
|
|
||||||
title={item.label}
|
|
||||||
aria-label={item.label}
|
|
||||||
onClick={(event) => {
|
|
||||||
event.preventDefault();
|
|
||||||
navigateAdmin(item.slug);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<IconKitSvg name={item.icon} />
|
|
||||||
<span>{item.label}</span>
|
|
||||||
</a>
|
|
||||||
))}
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
<div className="aside-foot admin-foot">
|
|
||||||
{team && (
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="btn btn-ghost btn-sm admin-back"
|
className={`admin-link${active.slug === "" ? " active" : ""}`}
|
||||||
onClick={() => navigate("dashboard")}
|
onClick={() => navigateAdmin("")}
|
||||||
>
|
>
|
||||||
<IconKitSvg name="chevronLeft" size={14} /> 返回工作台
|
<IconKitSvg name="dashboard" />
|
||||||
|
<span>概览</span>
|
||||||
</button>
|
</button>
|
||||||
)}
|
{SECTION_GROUPS.map((group) => {
|
||||||
<div className="admin-user">
|
const items = ADMIN_SECTIONS.filter((s) => s.group === group);
|
||||||
<div className="av">{(user.username || "A").slice(0, 1).toUpperCase()}</div>
|
if (items.length === 0) return null;
|
||||||
<div className="admin-user-meta">
|
return (
|
||||||
<span className="nm">{user.username}</span>
|
<div key={group} className="admin-nav-group">
|
||||||
<span className="rl mono">平台超管</span>
|
<div className="admin-group">{group}</div>
|
||||||
|
{items.map((item) => (
|
||||||
|
<button
|
||||||
|
key={item.slug}
|
||||||
|
type="button"
|
||||||
|
className={`admin-link${active.slug === item.slug ? " active" : ""}`}
|
||||||
|
onClick={() => navigateAdmin(item.slug)}
|
||||||
|
>
|
||||||
|
<IconKitSvg name={item.icon} />
|
||||||
|
<span>{item.label}</span>
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
<div className="admin-foot">
|
||||||
|
{team && (
|
||||||
|
<button type="button" className="admin-back" onClick={() => navigate("dashboard")}>
|
||||||
|
<ArrowLeft size={16} strokeWidth={1.8} />
|
||||||
|
返回工作台
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
<div className="admin-user">
|
||||||
|
<div className="av">{(user.username || "A").slice(0, 1).toUpperCase()}</div>
|
||||||
|
<div className="admin-user-meta">
|
||||||
|
<span className="nm">{user.username}</span>
|
||||||
|
<span className="rl">平台超管</span>
|
||||||
|
</div>
|
||||||
|
<button type="button" className="admin-logout" title="退出登录" aria-label="退出登录" onClick={() => setLogoutOpen(true)}>
|
||||||
|
<LogOut size={16} strokeWidth={1.8} />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" className="icon-btn admin-logout" title="退出登录" aria-label="退出登录" onClick={logout}>
|
|
||||||
<IconKitSvg name="logOut" size={16} />
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
<main>
|
<main>
|
||||||
<Decorations />
|
<Decorations />
|
||||||
<header className="topbar">
|
<header className="topbar">
|
||||||
<div className="crumbs">
|
<div className="admin-crumb">
|
||||||
<a
|
<button type="button" onClick={() => navigateAdmin("")}>平台后台</button>
|
||||||
href="/admin"
|
{active.slug ? <span>{active.label}</span> : null}
|
||||||
onClick={(event) => {
|
|
||||||
event.preventDefault();
|
|
||||||
navigateAdmin("");
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
平台后台
|
|
||||||
</a>
|
|
||||||
{active.slug && (
|
|
||||||
<>
|
|
||||||
<span className="sep">/</span>
|
|
||||||
<span className="here">{active.label}</span>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<div className="right">
|
<div className="right">
|
||||||
<span className="pill info"><span className="dot" />超管模式</span>
|
<span className="admin-mode">超管模式</span>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div className="content" id="page-content">
|
<div className="content" id="page-content">
|
||||||
<CornerMarks />
|
<CornerMarks />
|
||||||
{toast && <ToastLike notice={toast} />}
|
{toast && <ToastLike notice={toast} />}
|
||||||
<AdminSectionView section={active} navigateAdmin={navigateAdmin} notify={notify} />
|
<div className="admin-page">
|
||||||
|
<AdminSectionView section={active} navigateAdmin={navigateAdmin} notify={notify} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
<ConfirmModal
|
||||||
|
open={logoutOpen}
|
||||||
|
title="退出登录"
|
||||||
|
icon={<LogOut size={16} />}
|
||||||
|
detail="确定退出当前超管账号?退出后需要重新登录才能进入平台后台。"
|
||||||
|
confirmText="确认退出"
|
||||||
|
onCancel={() => setLogoutOpen(false)}
|
||||||
|
onConfirm={() => { setLogoutOpen(false); logout(); }}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -210,34 +235,54 @@ function AdminSectionView({ section, navigateAdmin, notify }: { section: AdminSe
|
|||||||
return <AdminPlaceholder section={section} />;
|
return <AdminPlaceholder section={section} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
function AdminOverview({ navigateAdmin }: { navigateAdmin: (s: string) => void }) {
|
const OVERVIEW_COLS = [
|
||||||
const shortcuts = ADMIN_SECTIONS.filter((s) => s.slug);
|
["团队 · 用户", "财务"],
|
||||||
|
["内容", "系统"],
|
||||||
|
["生成"]
|
||||||
|
];
|
||||||
|
|
||||||
|
function OverviewGroup({ group, navigateAdmin }: { group: string; navigateAdmin: (s: string) => void }) {
|
||||||
|
const items = ADMIN_SECTIONS.filter((s) => s.group === group);
|
||||||
|
if (items.length === 0) return null;
|
||||||
return (
|
return (
|
||||||
<>
|
<section className="admin-group-block">
|
||||||
<div className="page-head">
|
<div className="admin-group-label">
|
||||||
<div>
|
<strong>{group}</strong>
|
||||||
<h1>平台概览</h1>
|
<span>{GROUP_HINT[group]}</span>
|
||||||
<div className="sub">
|
|
||||||
<span className="mono">跨团队后台</span> · 邀请码、团队用户、内容审核、生成与计费治理
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="tip admin-tip">
|
<div className="admin-entry-pair">
|
||||||
<strong>欢迎进入平台后台</strong>
|
{items.map((s) => (
|
||||||
各模块正在分阶段上线 —— 你可从左侧导航进入。已就绪的模块可直接操作,未就绪的会标注上线阶段。
|
<button key={s.slug} className="admin-entry" type="button" onClick={() => navigateAdmin(s.slug)}>
|
||||||
</div>
|
<IconKitSvg name={s.icon} size={22} strokeWidth={1.8} />
|
||||||
<div className="admin-shortcut-grid">
|
<span className="admin-entry-copy">
|
||||||
{shortcuts.map((s) => (
|
<strong>{s.label}</strong>
|
||||||
<button key={s.slug} type="button" className="shortcut" onClick={() => navigateAdmin(s.slug)}>
|
<small>{SECTION_BLURB[s.slug] || s.slug}</small>
|
||||||
<span className="ic"><IconKitSvg name={s.icon} size={16} /></span>
|
|
||||||
<span className="admin-shortcut-text">
|
|
||||||
<span className="t">{s.label}</span>
|
|
||||||
<span className="d">{s.slug}</span>
|
|
||||||
</span>
|
</span>
|
||||||
|
<ArrowRight size={18} strokeWidth={1.8} />
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</section>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function AdminOverview({ navigateAdmin }: { navigateAdmin: (s: string) => void }) {
|
||||||
|
return (
|
||||||
|
<div className="admin-overview">
|
||||||
|
<section className="admin-welcome">
|
||||||
|
<h1>平台概览</h1>
|
||||||
|
<p>团队、内容、生成与计费,集中在这里处理</p>
|
||||||
|
</section>
|
||||||
|
<div className="admin-groups">
|
||||||
|
{OVERVIEW_COLS.map((col) => (
|
||||||
|
<div className="admin-col" key={col[0]}>
|
||||||
|
{col.map((group) => (
|
||||||
|
<OverviewGroup key={group} group={group} navigateAdmin={navigateAdmin} />
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,9 +292,7 @@ function AdminPlaceholder({ section }: { section: AdminSection }) {
|
|||||||
<div className="page-head">
|
<div className="page-head">
|
||||||
<div>
|
<div>
|
||||||
<h1>{section.label}</h1>
|
<h1>{section.label}</h1>
|
||||||
<div className="sub">
|
<p>admin · {section.slug}</p>
|
||||||
<span className="mono">admin · {section.slug}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="empty-state show">
|
<div className="empty-state show">
|
||||||
|
|||||||
Reference in New Issue
Block a user