Repository navigation
赞助可以选择在感谢墙上显示金额 - #341
Merged
Merged
赞助可以选择在感谢墙上显示金额#341
Conversation
群友希望感谢墙能显示具体金额。登记时多一个"在感谢墙上显示金额",默认勾选,本人在"我的赞助"里随时可以改(总体设计 §8.21)。 - 新列 sponsorships.show_amount(迁移 0072):以前登记的那时说过只显示档位,补录的本人没选过,都是不显示 - 感谢墙显示金额的便签把一周七个点换成金额;留言的字下面画线 - 运行费用的合计改由各项算出,约 ¥1238/年
公开的金额和今年的精确合计相减,人少时能推算出没公开的金额。维护者决定保留精确合计,在勾选框和说明里写明这一点。
JunieXD
enabled auto-merge (squash)
October 28, 2026 09:32
Merged
JunieXD
added a commit
that referenced
this pull request
Oct 28, 2026
机器一忙,徽章规则和背景的几个测试就超过 Vitest 的 5 秒:#341 第一次跑 CI 时有 3 个超时,本地负载高时也经常碰到。 改了什么(只改测试): - `badges/rules.test.ts`:读一个人的徽章不再顺带调 `checkBadges()`。每次检查要把 70 条规则全跑一遍,「共建」原来跑 10 遍,「夜行鼠」跑 9 遍;现在布置完跑一遍再读。收藏、层数、精华的测试照文件里别的门槛测试,改成几个帖子对照,检查一遍就够。 - `users/backgrounds.test.ts`:噪点动图只用两种颜色,生成从约 670ms 降到约 170ms,转出的方形图仍有约 1MB,超过 800KB 的上限。 验证: - `pnpm check` 全部通过。 - 本机全套测试里最慢的一个:改前负载 4.4 时 4.6 秒,改后负载 7 时 0.92 秒。 - 单独跑:「共建」742ms → 221ms,「夜行鼠」725ms → 217ms,「收藏」411ms → 150ms,背景 1.2s → 0.55s。 - 改写后的收藏测试让作者自己的收藏也凑满 5 个,确认会失败。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
群友希望感谢墙能显示具体金额。登记时多一个"在感谢墙上显示金额",默认勾选,本人在"我的赞助"里随时可以改(总体设计 §8.21)。
改了什么
sponsorships.show_amount(迁移 0072):先以DEFAULT false加列再去掉默认值,以后每次写入都要明确选。以前登记的那时说过只显示档位,补录的本人没选过,都是不显示docs/design.md§8.21 和 §13、docs/api.md、docs/data-model.md同步对调用方的影响
POST /sponsorships多一个必填的show_amount;GET /sponsorships每条多amount(没选显示的为null);/me/sponsorships多show_amount;PATCH /sponsorships/{id}可以带show_amount。这几个接口只在网页上用,插件不调。怎么验证的
pnpm check、pnpm db:codegen --verify、pnpm build、pnpm phone-check /sponsor /admin/sponsor在上一个提交上全部通过;最后一个提交只改文案和文档,本机负载高(load 25–34)时有个徽章测试 5 秒超时,单独跑通过