feat: replace quota input with amount-first UI and atomic quota adjustment

- Refactor token, redemption, and user quota inputs to prioritize monetary
  amount entry, with raw quota input collapsed by default
- Add atomic quota adjustment modal for users with add/subtract/override modes,
  bypassing batch update queue for immediate DB consistency
- Make user quota fields readonly in edit form; all modifications go through
  the dedicated adjust-quota modal via POST /api/user/manage
- Add DecreaseUserQuota `db` parameter for direct DB writes, matching
  IncreaseUserQuota behavior
- Support negative quota display in amount conversion helpers
- Add i18n keys for all new UI strings across all locales
This commit is contained in:
CaIon
2026-04-09 22:44:53 +08:00
parent 0664bb3f65
commit 040e8c1da8
21 changed files with 493 additions and 149 deletions
+10
View File
@@ -825,6 +825,8 @@
"原密码": "Original Password",
"原生格式": "Native format",
"原生额度": "Raw quota",
"使用原生额度输入": "Use raw quota input",
"收起原生额度输入": "Hide raw quota input",
"去重完成:去重前 {{before}} 个密钥,去重后 {{after}} 个密钥": "Deduplication completed: {{before}} keys before deduplication, {{after}} keys after deduplication",
"参与官方同步": "Participate in official sync",
"参数": "parameter",
@@ -2166,6 +2168,14 @@
"添加键值对": "Add key-value pair",
"添加问答": "Add FAQ",
"添加额度": "Add quota",
"减少": "Subtract",
"覆盖": "Override",
"调整额度": "Adjust Quota",
"调整额度成功": "Quota adjusted successfully",
"当前额度": "Current quota",
"变更": "Change",
"预计结果": "Estimated result",
"正数为增加,负数为减少": "Positive to add, negative to subtract",
"清理不活跃缓存": "Clean up inactive cache",
"清理失败": "Cleanup failed",
"清理方式": "Cleanup Mode",