fix: 价格统一按中文写法显示,货币符号或代码一律在数字前 - #88
Merged
Merged
Conversation
This was referenced Oct 2, 2026
stqfdyr
force-pushed
the
fix/currency-display
branch
from
October 2, 2026 10:37
d6249ff to
117886a
Compare
stqfdyr
added a commit
to monitor-probe/monitor-theme-default
that referenced
this pull request
Oct 2, 2026
节点详情「续费」一栏的价格改用 `Intl.NumberFormat` 按 zh-CN 格式化,不再查五个币种的符号表。 - 符号或代码一律在数字前:`HK$38.00`、`NT$1,999.00`;中文里没有符号的写代码,如 `SGD 12.50` - 美元由 `$` 改为 `US$`,与港币、新台币等其它「元」区分开;日元写作 `JP¥`、整数价格不带 `.00`,不再和人民币的 `¥` 相同 - 加千分位:`US$12,345.60` - 小数最多两位,与价格的填写精度一致:日元填 `1200.5` 显示 `JP¥1,200.5`,不按日元的整数取整 - 地区固定为 zh-CN,不随访客的浏览器语言变 - hub 1.3.1 之前不校验货币,旧数据里不是三个字母的值会让 `Intl` 抛错,这时照原样显示为 `港币 9.90` lint / test / build 通过,`format.test.ts` 加了对应检查。浏览器语言设为 en-US 实测,1280 与 390 宽、深浅色下价格都单行显示,非法旧值不报错。 配套 monitor-probe/monitor#88
stqfdyr
added a commit
to monitor-probe/monitor-theme-serverstatus
that referenced
this pull request
Oct 2, 2026
展开行「续费」一栏的价格改用 `Intl.NumberFormat` 按 zh-CN 格式化,不再查五个币种的符号表。 - 符号或代码一律在数字前:`HK$38.00`、`NT$1,999.00`;中文里没有符号的写代码,如 `SGD 12.50` - 美元由 `$` 改为 `US$`,与港币、新台币等其它「元」区分开;日元写作 `JP¥`、整数价格不带 `.00`,不再和人民币的 `¥` 相同 - 加千分位:`US$12,345.60` - 小数最多两位,与价格的填写精度一致:日元填 `1200.5` 显示 `JP¥1,200.5`,不按日元的整数取整 - 地区固定为 zh-CN,不随访客的浏览器语言变 - hub 1.3.1 之前不校验货币,旧数据里不是三个字母的值会让 `Intl` 抛错,这时照原样显示为 `港币 9.90` lint / test / build 通过,`format.test.ts` 加了对应检查。浏览器语言设为 en-US 实测,1280 与 390 宽、深浅色下价格都单行显示,非法旧值不报错。 配套 monitor-probe/monitor#88
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.
面板节点列表的价格改用
Intl.NumberFormat按 zh-CN 格式化,不再查五个币种的符号表。HK$38.00、NT$1,999.00;中文里没有符号的写代码,如SGD 12.50$改为US$,与港币、新台币等其它「元」区分开;日元写作JP¥、整数价格不带.00,不再和人民币的¥相同US$12,345.601200.5显示JP¥1,200.5,不按日元的整数取整Intl抛错,这时照原样显示为港币 9.90;hub 里「主题不必防抛错」的那句注释同步改正面板 lint / test / build 与
cargo fmt通过。浏览器语言设为 en-US,实测 CNY、USD、HKD、JPY、TWD、SGD、EUR 与一条非法旧值,1280 与 390 宽、深浅色下价格都单行显示。配套 monitor-probe/monitor-theme-default#22、monitor-probe/monitor-theme-serverstatus#20、monitor-probe/monitor-document#35。
Closes #76