Files
Genarrative/src/components/game-distribution/gameReviews.css
T
lhk229 b60aea4e71
Project CI / AI game creator shell Rust crates (push) Successful in 1m43s
Project CI / AI game creator shell Rust lane 2/2 (push) Failing after 2m7s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m55s
Project CI / AI game creator shell Rust lane 1/2 (push) Failing after 3m23s
Project CI / Frontend tests (push) Successful in 3m3s
Project CI / Repository checks (push) Successful in 3m42s
Project CI / AI game creator shell web tests (push) Successful in 2m3s
Project CI / Backend tests (push) Successful in 6m19s
Project CI / Native shell tests (push) Successful in 8m7s
实现网站游戏评分与评价 (#561)
公开游戏详情页新增评分与评价:登录用户可提交并修改自己对每款游戏的唯一一条 1–10 分评价,评论可空且最多 4000 个 Unicode 码点;游客可分页浏览评价并查看平均分与评分人数。

- 新增私有评价表及共享 DTO/API,事务内校验游戏公开可见性、保证唯一性,并计算分页与全量评分统计;下架或封禁后关闭读写,重新公开及更新版本保留评价。
- 详情页支持编辑预填、取消、提交期间冻结输入、失败保留草稿,以及保存、翻页和账号/游戏切换时的旧响应隔离;复用现有认证与公共组件。
- 同步主规范、里程碑、实施计划、生成绑定、表目录和验收脚本。不扩展 AGC、外部 API、评论审核或评分缓存。

验证:
- 本轮审查复跑前端定向测试 40 项、评价领域测试 2 项,均通过。
- 网站 typecheck、Rust/TypeScript DTO 对齐、SpacetimeDB schema、文档索引、编码与 diff 检查通过。
- 实施文档另记录本地隔离数据库/API 49 项及桌面/移动视口浏览器 smoke 通过;本轮审查未重跑这些运行时验收,也未运行完整测试套件。

发布说明:新增 SpacetimeDB 表,部署时需同步 module 与 API。尚未部署 dev/production,待用户验收。

Reviewed-on: https://git.genarrative.world/git/GenarrativeAI/Genarrative/pulls/561
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-10-01 19:19:58 +08:00

125 lines
2.4 KiB
CSS

.game-reviews {
display: grid;
gap: 28px;
margin-top: 28px;
}
.game-reviews h2 {
margin: 0 0 16px;
}
.game-reviews__personal,
.game-reviews__public {
min-width: 0;
}
.game-reviews__heading {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 16px;
}
.game-review-card {
padding: 16px 0;
border-bottom: 1px solid var(--platform-surface-border);
}
.game-review-card__header {
display: flex;
gap: 10px;
align-items: center;
}
.game-review-card .game-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: inherit;
}
.game-review-score {
margin-left: auto;
font-weight: 600;
}
.game-review-comment {
margin-top: 8px;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.game-review-card small {
display: block;
margin-top: 12px;
opacity: 0.7;
}
.game-review-rating {
border: 0;
padding: 0;
margin: 0 0 16px;
}
.game-review-rating legend {
margin-bottom: 10px;
}
.game-review-rating__options {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.game-review-rating__options label {
position: relative;
}
.game-review-rating__options input {
position: absolute;
opacity: 0;
width: 100%;
height: 100%;
margin: 0;
cursor: pointer;
}
.game-review-rating__options span {
display: grid;
place-items: center;
min-width: 40px;
min-height: 40px;
border: 1px solid var(--platform-surface-border);
border-radius: 8px;
}
.game-review-rating__options input:checked + span {
background: var(--platform-button-primary-fill);
color: var(--platform-button-primary-text);
}
.game-review-rating__options input:focus-visible + span {
outline: 2px solid currentColor;
outline-offset: 3px;
}
.game-review-rating:disabled {
opacity: 0.6;
}
.game-review-comment-label {
display: flex;
justify-content: space-between;
gap: 12px;
margin-bottom: 8px;
}
.game-reviews textarea {
box-sizing: border-box;
width: 100%;
resize: vertical;
padding: 12px;
font: inherit;
color: inherit;
background: transparent;
border: 1px solid var(--platform-surface-border);
border-radius: 8px;
}
.game-reviews textarea[aria-invalid='true'] {
border-color: #ba3325;
}
.game-review-actions,
.game-review-pagination {
display: flex;
align-items: center;
gap: 12px;
margin-top: 16px;
}
.game-review-pagination {
justify-content: center;
flex-wrap: wrap;
}
.game-reviews__personal > button {
margin-top: 12px;
}