fix(题目列表): 排序里多了个用不上的「按题号」,原来的最早创建、最多 / 最少提交、通过都没了——换回原来那一套
Deploy / deploy (push) Canceled after 0s

最新创建 / 最早创建 / 最多人做过 / 最少人做过 / 最多人做对 / 最少人做对。排序值和原来一样,
旧链接照样能用;「最多 / 最少」改成按人数,和最后一列「做对 / 做过」对得上。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-09 12:58:26 +08:00
1 parent 97426f0895
commit e852bf4498
3 files changed
+33 -23

No files matched your search

+12 -2
View File
@@ -439,8 +439,18 @@ export const problemListSchema = paginatedSchema(problemListItemSchema)
/** 题目列表「全部类型」下拉:有参考图 / 画流程图 / 语法要求 */
export const problemTypeFilterSchema = z.enum(["reference", "flowchart", "ast"])
/** 题目列表的排序。空串是默认:按最新创建 */
export const problemListSortSchema = z.enum(["", "id", "new", "popular"])
/**
* 题目列表的排序。值沿用原来的(旧链接照样能用):空串 = 最新创建、create_time = 最早创建,
* ±submission_number / ±accepted_number 是做过 / 做对的**人数**,带 - 是从多到少
*/
export const problemListSortSchema = z.enum([
"",
"create_time",
"-submission_number",
"submission_number",
"-accepted_number",
"accepted_number",
])
/**
* 题目列表顶上那行和左栏的进度。**只说做到了什么**:做对几道、这周新做对几道、