fix(CommentsView): 移除固定高度并添加滚动条以改善用户体验

refactor(listComments): 简化评论排序逻辑

移除CommentsView中的固定高度限制并添加overflow-y属性,使内容可滚动
修改listComments的SQL查询,去除priority排序以简化逻辑
This commit is contained in:
anghunk
2026-01-21 21:25:18 +08:00
parent 3871620fed
commit 09f9800f2a
2 changed files with 2 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ export const listComments = async (c: Context<{ Bindings: Bindings }>) => {
.first<{ count: number }>();
const { results } = await c.env.CWD_DB.prepare(
`SELECT * FROM Comment ${whereSql} ORDER BY priority DESC, created DESC LIMIT ? OFFSET ?`
`SELECT * FROM Comment ${whereSql} ORDER BY created DESC LIMIT ? OFFSET ?`
)
.bind(...params, limit, offset)
.all();