polish(admin): 抽出后台控件包并统一各页布局与交互
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1681,6 +1681,197 @@ a.j13-mention-token:hover {
|
||||
|
||||
.btn-sm { padding: 7px 14px; font-size: 13px; }
|
||||
|
||||
/* ----- 成功操作(审核通过等) ----- */
|
||||
.btn-ok {
|
||||
background: var(--ok-soft);
|
||||
color: var(--ok);
|
||||
}
|
||||
.btn-ok:hover:not(:disabled) {
|
||||
background: var(--ok);
|
||||
color: #fff;
|
||||
}
|
||||
.dark .btn-ok:hover:not(:disabled) {
|
||||
color: #0a1a10;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
管理后台控件(仅 /admin;颜色全部走令牌)
|
||||
============================================================ */
|
||||
.admin-switch {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
width: 2.75rem;
|
||||
height: 1.625rem;
|
||||
border-radius: 999px;
|
||||
border: none;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s ease;
|
||||
background: var(--line-2);
|
||||
}
|
||||
.admin-switch[aria-checked="true"] {
|
||||
background: var(--accent);
|
||||
}
|
||||
.admin-switch:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.admin-switch:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.admin-switch-knob {
|
||||
position: absolute;
|
||||
top: 0.125rem;
|
||||
left: 0.125rem;
|
||||
width: 1.375rem;
|
||||
height: 1.375rem;
|
||||
border-radius: 999px;
|
||||
background: var(--panel);
|
||||
box-shadow: var(--shadow-sm);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
.admin-switch[aria-checked="true"] .admin-switch-knob {
|
||||
transform: translateX(1.125rem);
|
||||
}
|
||||
|
||||
.admin-seg {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.375rem;
|
||||
padding: 0.5rem 0.875rem;
|
||||
border-radius: 999px;
|
||||
border: none;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
line-height: 1.35;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s ease, color 0.15s ease;
|
||||
color: var(--ink-2);
|
||||
background: var(--panel-2);
|
||||
}
|
||||
.admin-seg:hover:not(:disabled):not([aria-selected="true"]):not([aria-pressed="true"]) {
|
||||
color: var(--ink);
|
||||
background: var(--tint);
|
||||
}
|
||||
.admin-seg[aria-selected="true"],
|
||||
.admin-seg[aria-pressed="true"],
|
||||
.admin-seg[aria-current="page"] {
|
||||
background: var(--nav-active-bg);
|
||||
color: var(--nav-active-ink);
|
||||
}
|
||||
.admin-seg:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.admin-seg:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.admin-seg-count {
|
||||
min-width: 1.25rem;
|
||||
padding: 0 0.375rem;
|
||||
border-radius: 999px;
|
||||
font-size: 11px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
line-height: 1.7;
|
||||
background: var(--panel);
|
||||
color: var(--ink-3);
|
||||
}
|
||||
.admin-seg[aria-selected="true"] .admin-seg-count,
|
||||
.admin-seg[aria-pressed="true"] .admin-seg-count,
|
||||
.admin-seg[aria-current="page"] .admin-seg-count {
|
||||
color: var(--nav-active-ink);
|
||||
}
|
||||
.admin-seg-sm {
|
||||
padding: 0.375rem 0.75rem;
|
||||
font-size: 12.5px;
|
||||
}
|
||||
|
||||
.admin-icon-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
border-radius: 999px;
|
||||
border: none;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
color: var(--ink-3);
|
||||
background: transparent;
|
||||
transition: background 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
.admin-icon-btn:hover:not(:disabled) {
|
||||
background: var(--accent-soft);
|
||||
color: var(--accent);
|
||||
}
|
||||
.admin-icon-btn.is-danger:hover:not(:disabled) {
|
||||
background: var(--danger-soft);
|
||||
color: var(--danger);
|
||||
}
|
||||
.admin-icon-btn.is-danger.is-active,
|
||||
.admin-icon-btn.is-danger[aria-pressed="true"] {
|
||||
color: var(--danger);
|
||||
}
|
||||
.admin-icon-btn.is-accent {
|
||||
color: var(--accent);
|
||||
}
|
||||
.admin-icon-btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.admin-icon-btn:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.admin-status {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
padding: 0.125rem 0.5rem;
|
||||
border-radius: 999px;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
line-height: 1.55;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.admin-status.is-ok {
|
||||
background: var(--ok-soft);
|
||||
color: var(--ok);
|
||||
}
|
||||
.admin-status.is-warn {
|
||||
background: var(--gold-soft);
|
||||
color: var(--gold);
|
||||
}
|
||||
.admin-status.is-danger {
|
||||
background: var(--danger-soft);
|
||||
color: var(--danger);
|
||||
}
|
||||
.admin-status.is-muted {
|
||||
background: var(--tint);
|
||||
color: var(--ink-3);
|
||||
}
|
||||
.admin-status.is-accent {
|
||||
background: var(--accent-soft);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.admin-toolbar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
padding: 0.75rem 1rem;
|
||||
border-bottom: 1px solid var(--line);
|
||||
background: var(--panel);
|
||||
}
|
||||
@media (min-width: 640px) {
|
||||
.admin-toolbar {
|
||||
padding: 0.875rem 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----- 点赞按钮:未赞描边态,hover 同色系填充;已赞为浅底实心态 ----- */
|
||||
.j13-like {
|
||||
border-color: var(--line-2);
|
||||
|
||||
Reference in New Issue
Block a user