video-shuoshan/web/src/pages/TeamsPage.module.css
seaislee1209 727be720b4
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 17m15s
feat: v0.13.0 主副管理员 + 素材引用 bug 修复 + admin 保护
【主副管理员】
①User 加 is_team_owner 字段,现有团管自动升为主管
②主管可指定/取消副管理员,副管不能再指定别人
③副管不能禁用/修改其他管理员
④超管团队详情支持三种角色显示和切换

【素材引用 bug 修复】
⑤span.replaceWith('') → span.remove(),删除引用后标签真正移除
⑥switchMode 时清空 assetMentions,切换模式不带旧素材
⑦fallback 只在纯文本时生效,用户删标签后不再偷偷加回
⑧后端跳过未解析的 asset:// URL,不发给火山 API

【admin 保护】
⑨admin 账号不可被任何人禁用
⑩admin 密码不可被其他超管重置

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 00:14:58 +08:00

277 lines
9.1 KiB
CSS

.page { max-width: none; }
.title { font-size: 22px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 20px; }
.filters { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.searchGroup { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.searchInput {
padding: 8px 12px; background: var(--color-bg-card); border: 1px solid var(--color-border-card);
border-radius: 8px; color: var(--color-text-primary); font-size: 13px; width: 240px; outline: none;
}
.searchInput:focus { border-color: var(--color-primary); }
.refreshBtn {
padding: 8px 16px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: all 0.15s;
background: transparent; border: 1px solid var(--color-border-card); color: var(--color-text-secondary);
}
.refreshBtn:hover { background: var(--color-sidebar-hover); }
.createBtn { padding: 8px 16px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: all 0.15s; background: var(--color-success); border: none; color: #fff; font-weight: 500; }
.createBtn:hover { opacity: 0.9; }
.tableWrapper {
background: var(--color-bg-card); border: 1px solid var(--color-border-card);
border-radius: var(--radius-card); overflow-x: auto;
}
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { padding: 12px 16px; text-align: left; color: var(--color-text-secondary); font-weight: 500; border-bottom: 1px solid var(--color-border-card); white-space: nowrap; }
.table td { padding: 12px 16px; color: var(--color-text-primary); border-bottom: 1px solid rgba(42, 42, 56, 0.5); white-space: nowrap; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.teamNameLink { background: none; border: none; color: var(--color-primary); cursor: pointer; font-size: 13px; text-decoration: underline; }
.statusBadge { padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.active { background: rgba(0, 184, 148, 0.15); color: var(--color-success); }
.disabled { background: rgba(231, 76, 60, 0.15); color: var(--color-danger); }
.actions { display: flex; gap: 6px; }
.editBtn, .toggleBtn, .topupBtn, .adminBtn { padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; transition: all 0.15s; }
.topupBtn { background: transparent; border: 1px solid var(--color-primary); color: var(--color-primary); }
.topupBtn:hover { background: rgba(0, 184, 230, 0.1); }
.adminBtn { background: transparent; border: 1px solid #a78bfa; color: #a78bfa; }
.adminBtn:hover { background: rgba(167, 139, 250, 0.1); }
.disableBtn { background: transparent; border: 1px solid var(--color-danger); color: var(--color-danger); }
.disableBtn:hover { background: rgba(231, 76, 60, 0.1); }
.enableBtn { background: transparent; border: 1px solid var(--color-success); color: var(--color-success); }
.enableBtn:hover { background: rgba(0, 184, 148, 0.1); }
.empty { text-align: center; color: var(--color-text-secondary); padding: 40px; }
.skeletonCell { height: 16px; background: var(--color-border-card); border-radius: 4px; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.secondsMain { color: var(--color-text-primary); font-weight: 500; }
.secondsSub { color: var(--color-text-secondary); font-size: 11px; margin-left: 4px; }
/* Modal */
.modalOverlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 300; }
.modal { background: #16161e; border: 1px solid var(--color-border-card); border-radius: var(--radius-card); padding: 24px; width: 400px; max-width: 90vw; }
.modalTitle { font-size: 16px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 20px; }
.formGroup { margin-bottom: 16px; }
.formGroup label { display: block; color: var(--color-text-secondary); font-size: 13px; margin-bottom: 6px; }
.formGroup input { width: 100%; padding: 8px 12px; background: var(--color-bg-page); border: 1px solid var(--color-border-card); border-radius: 8px; color: var(--color-text-primary); font-size: 14px; outline: none; box-sizing: border-box; }
.formGroup input:focus { border-color: var(--color-primary); }
.modalActions { display: flex; justify-content: flex-end; gap: 8px; }
.cancelBtn { padding: 8px 16px; background: transparent; border: 1px solid var(--color-border-card); border-radius: 8px; color: var(--color-text-secondary); font-size: 13px; cursor: pointer; }
.saveBtn { padding: 8px 16px; background: var(--color-primary); border: none; border-radius: 8px; color: #fff; font-size: 13px; cursor: pointer; }
.formRow { display: flex; gap: 12px; }
.formRow .formGroup { flex: 1; }
.formError { color: var(--color-danger); font-size: 13px; margin-bottom: 12px; }
.formHint { color: var(--color-text-secondary); font-size: 12px; margin-top: 4px; }
/* ══════════════════════════════════════
Team Detail Modal (follows VideoDetailModal spec)
══════════════════════════════════════ */
.detailOverlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.65);
display: flex;
align-items: center;
justify-content: center;
z-index: 300;
animation: overlayIn 0.2s ease-out;
}
@keyframes overlayIn {
from { opacity: 0; }
to { opacity: 1; }
}
.detailModal {
background: rgba(22, 22, 30, 0.92);
backdrop-filter: blur(24px) saturate(180%);
-webkit-backdrop-filter: blur(24px) saturate(180%);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 16px;
width: 1280px;
max-width: 96vw;
min-height: 70vh;
max-height: 90vh;
display: flex;
flex-direction: column;
box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
animation: modalIn 0.25s ease;
}
@keyframes modalIn {
from { opacity: 0; transform: scale(0.96) translateY(12px); }
to { opacity: 1; transform: scale(1) translateY(0); }
}
/* ── Header ── */
.detailHeader {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 28px;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
flex-shrink: 0;
}
.detailHeader h3 {
font-size: 17px;
font-weight: 600;
color: var(--color-text-primary);
display: flex;
align-items: center;
gap: 10px;
margin: 0;
}
.detailClose {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 8px;
background: rgba(255, 255, 255, 0.06);
border: none;
color: rgba(255, 255, 255, 0.5);
cursor: pointer;
transition: color 0.15s, background 0.15s;
}
.detailClose:hover {
color: #fff;
background: rgba(255, 255, 255, 0.12);
}
/* ── Body ── */
.detailBody {
flex: 1;
overflow-y: auto;
padding: 28px;
}
/* ── Stats grid ── */
.detailGrid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 14px;
margin-bottom: 28px;
}
.detailItem {
display: flex;
flex-direction: column;
gap: 8px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 10px;
padding: 16px 18px;
transition: background 0.15s;
}
.detailItem:hover {
background: rgba(255, 255, 255, 0.06);
}
.detailLabel {
color: #8b8ea8;
font-size: 12px;
font-weight: 500;
line-height: 1;
}
.detailValue {
color: #f1f0ff;
font-size: 18px;
font-weight: 600;
display: flex;
align-items: center;
gap: 8px;
}
.editPoolBtn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
border-radius: 6px;
background: rgba(255, 255, 255, 0.06);
border: none;
color: rgba(255, 255, 255, 0.4);
cursor: pointer;
transition: color 0.15s, background 0.15s;
flex-shrink: 0;
}
.editPoolBtn:hover {
color: var(--color-primary);
background: rgba(0, 184, 230, 0.12);
}
/* ── Members section ── */
.membersTitle {
font-size: 14px;
font-weight: 600;
color: var(--color-text-primary);
margin-top: 20px;
margin-bottom: 14px;
padding-bottom: 12px;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.memberTableWrapper {
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 10px;
overflow: hidden;
}
.memberTable {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}
.memberTable th {
padding: 12px 18px;
text-align: left;
color: #8b8ea8;
font-weight: 500;
font-size: 13px;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
background: rgba(255, 255, 255, 0.02);
white-space: nowrap;
}
.memberTable td {
padding: 14px 18px;
color: #f1f0ff;
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.memberTable tr:last-child td { border-bottom: none; }
.memberTable tr:hover td {
background: rgba(255, 255, 255, 0.04);
}
.ownerBadge {
background: rgba(0, 184, 230, 0.15);
color: var(--color-primary, #00b8e6);
padding: 3px 10px;
border-radius: 6px;
font-size: 12px;
font-weight: 500;
}
.adminBadge {
background: rgba(167, 139, 250, 0.15);
color: #a78bfa;
padding: 3px 10px;
border-radius: 6px;
font-size: 12px;
font-weight: 500;
}