Files
Genarrative/apps/admin-web/src/pages/adminGameDistributionReview.css
T
suzmii 620ac52461 后台游戏审核页展示游戏名与作者,不再只显示 gameId
- AdminGameDistributionReviewPage.tsx:待审列表只回版本字段,新增 resolveGameMeta 用既有后台作品列表接口按 gameId 反查标题/作者,逐游戏去重并按会话缓存;单个游戏取不到只回落显示 gameId,不阻断审核列表
- 同文件:loadReviews 在拿到 entries 后并行补齐本页 distinct gameId 的元数据
- 同文件:游戏列由单个 gameId 文本改为「游戏名(主行)+ 作者名与 user_id(副行,截断显示,完整值放 title)」
- adminGameDistributionReview.css:以 .admin-game-review-game 网格布局替换 .admin-game-review-game-id,保留窄视口截断与 title 出口
- AdminGameDistributionReviewPage.test.tsx:补 listAdminGameDistributionGames 的 mock 与游戏列表 fixture,断言由 gameId 改为游戏名
2026-10-04 16:15:24 +08:00

107 lines
2.9 KiB
CSS

/*
* 「游戏审核」待审版本表的页面专属样式。
*
* 目标:1280 / 1440 / 1920 三档视口下,「详情 / 通过 / 拒绝」三个版本级动作
* 都在面板可视带内、单行不换行,不依赖面板内横向滚动。
*
* 做法:只在本页表格上加自己的类,覆盖 `.admin-table-wide` 的 min-width 并固定列宽,
* 把动作列按内容取宽;gameId 最长(37 字符)用省略号截断并保留 title 作为完整值出口。
* 不改共享 `.admin-table-wide` 的全局语义,也不影响其它后台页面。
*/
/* `.admin-table-wide` 是共享类,用元素+类提升优先级覆盖它,只作用于本页表格。 */
table.admin-game-review-table {
width: 100%;
min-width: 0;
table-layout: fixed;
}
table.admin-game-review-table th:nth-child(2),
table.admin-game-review-table td:nth-child(2) {
/* `pending_review` 是最长状态值(约 120px + 单元格内边距),必须给足,否则会压到「发行包」列。 */
width: 148px;
}
table.admin-game-review-table th:nth-child(3),
table.admin-game-review-table td:nth-child(3) {
width: 124px;
}
table.admin-game-review-table th:nth-child(4),
table.admin-game-review-table td:nth-child(4) {
width: 172px;
white-space: nowrap;
}
table.admin-game-review-table th:nth-child(5),
table.admin-game-review-table td:nth-child(5) {
width: 240px;
}
/* 固定列宽下,任何溢出都应该在本列内被裁掉,而不是压到相邻列上。 */
table.admin-game-review-table td {
overflow: hidden;
}
table.admin-game-review-table td .admin-muted-text {
overflow-wrap: anywhere;
}
.admin-game-review-cell--actions {
white-space: nowrap;
}
.admin-game-review-cell--actions .admin-review-actions {
flex-wrap: nowrap;
justify-content: flex-end;
}
/* 游戏列:主行游戏名、副行作者(打码名 + user_id 截断,完整值放 title)。 */
.admin-game-review-game {
display: grid;
min-width: 0;
gap: 2px;
}
.admin-game-review-game-author {
display: flex;
min-width: 0;
align-items: baseline;
gap: 6px;
}
.admin-game-review-game-author-name {
flex: 0 1 auto;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.admin-game-review-game-author-id {
flex: 1 1 auto;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
opacity: 0.75;
}
/* 移动端/窄屏:动作列保持不换行,仍靠省略号吸收 gameId 的宽度。 */
@media (max-width: 980px) {
table.admin-game-review-table {
table-layout: auto;
}
table.admin-game-review-table th:nth-child(2),
table.admin-game-review-table td:nth-child(2),
table.admin-game-review-table th:nth-child(3),
table.admin-game-review-table td:nth-child(3),
table.admin-game-review-table th:nth-child(4),
table.admin-game-review-table td:nth-child(4),
table.admin-game-review-table th:nth-child(5),
table.admin-game-review-table td:nth-child(5) {
width: auto;
}
}