feat(排名): 全服 100 名以外不报具体名次,写「100 名以外」并提示再做对几道进前 100;赛道每行加高,条不再被挤成一小截
Deploy / deploy (push) Canceled after 0s
Deploy / deploy (push) Canceled after 0s
- 全服排在 100 名以外:「你」卡和下面的小名次写「100 名以外」,不给前一名、后一名和名次走势, 改成「再做对 N 道就进前 100」;名单上没有你这一行,图例和副标题也不再提「你」 - 赛道每行从 18px 加到 28px,头像、字、条都大一号(不必刻意塞进机房一屏); 「前一名 / 后一名 / 进步最大」挂到条的末端,不再单占一列把条挤短;领奖台台阶恢复原来的高度 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2553c6ddfe
commit
45d79ed366
6 files changed
+98
-37
No files matched your search
@@ -202,8 +202,11 @@ rankingRoutes.get("/rankings/board", optionalAuth, async (c) => {
|
||||
)
|
||||
}
|
||||
|
||||
// 全服 100 名以外:不报具体名次,前后一名、走势都不给,只给第 100 名算还差几道
|
||||
const beyond = !!(cap && me && me.rank > cap)
|
||||
|
||||
let trend: RankBoard["trend"] = null
|
||||
if (me && period.data !== "week") {
|
||||
if (me && !beyond && period.data !== "week") {
|
||||
const thisWeek = Date.parse(weekStart())
|
||||
const points = Array.from(
|
||||
{ length: TREND_WEEKS },
|
||||
@@ -237,9 +240,10 @@ rankingRoutes.get("/rankings/board", optionalAuth, async (c) => {
|
||||
rows: picked.map((row) => rowOf(row)!),
|
||||
complete: picked.length === listable.length,
|
||||
cap,
|
||||
lastListed: beyond ? rowOf(listable.at(-1)) : null,
|
||||
me: rowOf(me),
|
||||
ahead: rowOf(meIndex > 0 ? now[meIndex - 1] : undefined),
|
||||
behind: rowOf(meIndex >= 0 ? now[meIndex + 1] : undefined),
|
||||
ahead: beyond ? null : rowOf(meIndex > 0 ? now[meIndex - 1] : undefined),
|
||||
behind: beyond ? null : rowOf(meIndex >= 0 ? now[meIndex + 1] : undefined),
|
||||
trend,
|
||||
hidden: !!mine?.rankHiddenAt,
|
||||
hiddenUsers: hiddenUsers.map((row): SampleUser => sampleUser(row, null)),
|
||||
|
||||
Reference in new issue
Block a user