mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-03 00:33:13 +00:00
feat(monitor-ui): 配额模式表单、用量快照视图与 8 平台支持
管理端: - MonitorFormDialog:新增检查方式三态分段控件(探活/配额/探活+配额), provider 网格扩展至 8 平台(+antigravity/kimi/zhipu/deepseek), 国产平台默认 endpoint 预填、antigravity 强制 quota-only;配额模式 显示关联账号选择器(复用 adminAPI.accounts.list 按平台过滤), 隐藏 endpoint/api_key/模型等探活专属字段 - 新建共用 MonitorQuotaView:用量窗口进度条(阈值/样式对齐账号页 CNProviderQuotaCell)、多币种余额、plan_level 徽章与错误态; window/label 机器 token 走 i18n,未知 token 原样透出(前向兼容) - 列表主模型单元格内联 latest_quota;运行结果弹窗逐行展示配额; 筛选栏/模板管理/格式化 composable 同步 8 平台(配色对齐 utils/platformColors.ts);ProviderIcon 搬运 4 家官方 SVG 用户端: - MonitorCard 支持 latest_quota,渲染受 channel_monitor_show_quota 系统开关(isChannelMonitorQuotaVisible)控制,服务端剥离为第一道防线 设置与 i18n: - 管理设置页新增「向用户展示渠道用量/余额」开关(默认关闭); zh/en 全量补充 providers/checkMode/quota 文案
This commit is contained in:
22 files changed
+700
-37
No files matched your search
@@ -186,3 +186,14 @@ export function isChannelMonitorThroughputHidden(): boolean {
|
||||
const appStore = useAppStore()
|
||||
return Boolean(appStore.cachedPublicSettings?.channel_monitor_hide_throughput)
|
||||
}
|
||||
|
||||
/**
|
||||
* Show quota/balance snapshots on the user-facing monitor page
|
||||
* (channel_monitor_show_quota, default off). The backend strips
|
||||
* latest_quota server-side when the switch is off; this flag is
|
||||
* defense-in-depth only. Admin views always show quota.
|
||||
*/
|
||||
export function isChannelMonitorQuotaVisible(): boolean {
|
||||
const appStore = useAppStore()
|
||||
return appStore.cachedPublicSettings?.channel_monitor_show_quota === true
|
||||
}
|
||||
Reference in new issue
Block a user