mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-01 16:29:29 +00:00
Merge pull request #2766 from DaydreamCoding/feat/user-platform-quota
feat(quota): 用户 × 平台 USD 配额
This commit is contained in:
@@ -634,6 +634,15 @@ export default {
|
||||
platformBreakdownEmpty: 'No platform usage yet',
|
||||
platformCount: '{count} platforms',
|
||||
platformOther: 'Other',
|
||||
platformQuota: {
|
||||
title: 'Quota Usage',
|
||||
daily: 'Daily',
|
||||
weekly: 'Weekly',
|
||||
monthly: 'Monthly (30-day rolling)',
|
||||
resetsAt: 'Resets {time}',
|
||||
noLimit: 'unlimited',
|
||||
disabled: 'Disabled',
|
||||
},
|
||||
tokenUsageTrend: 'Token Usage Trend',
|
||||
noDataAvailable: 'No data available',
|
||||
model: 'Model',
|
||||
@@ -1793,6 +1802,7 @@ export default {
|
||||
groups: 'Groups',
|
||||
subscriptions: 'Subscriptions',
|
||||
balance: 'Balance',
|
||||
balancePlatformQuota: 'Balance (Platform Quota)',
|
||||
usage: 'Usage',
|
||||
usageAnthropic: 'Usage (Claude)',
|
||||
usageOpenAI: 'Usage (OpenAI)',
|
||||
@@ -1985,6 +1995,41 @@ export default {
|
||||
failedToReorder: 'Failed to update order',
|
||||
keyExists: 'Attribute key already exists',
|
||||
dragToReorder: 'Drag to reorder'
|
||||
},
|
||||
platformQuota: {
|
||||
menuItem: 'Platform Quotas',
|
||||
title: 'Platform Quotas',
|
||||
subtitle: 'Configure daily / weekly / monthly USD usage limits for each upstream platform for user {email}',
|
||||
columns: {
|
||||
platform: 'Platform',
|
||||
daily: 'Daily (USD)',
|
||||
weekly: 'Weekly (USD)',
|
||||
monthly: 'Monthly (USD, 30-day rolling)',
|
||||
usage: 'Current Usage',
|
||||
},
|
||||
placeholder: 'unlimited',
|
||||
save: 'Save',
|
||||
saving: 'Saving...',
|
||||
cancel: 'Cancel',
|
||||
clearAll: 'Clear All (remove all limits)',
|
||||
clearAllConfirm: 'Clear daily / weekly / monthly limits for ALL platforms? All platforms will become "unlimited" with no local undo — you must manually re-enter values before saving.',
|
||||
reset: {
|
||||
button: 'Reset window',
|
||||
confirm: 'Reset the {window} usage for {platform} for this user? This is effective immediately.',
|
||||
success: 'Reset {platform} {window} usage',
|
||||
failed: 'Reset failed',
|
||||
},
|
||||
updateSuccess: 'Platform quotas updated',
|
||||
updateFailed: 'Save failed',
|
||||
loadFailed: 'Load failed',
|
||||
hint: 'Empty = no limit for that window.',
|
||||
windowDaily: 'daily',
|
||||
windowWeekly: 'weekly',
|
||||
windowMonthly: 'monthly',
|
||||
cellNotConfigured: 'Not configured',
|
||||
cellColumnTooltip: 'Only platforms with a limit are shown',
|
||||
subscriptionWarning: 'This user has an active subscription. Platform quotas only apply to balance (standard) mode requests; subscription mode requests are not subject to these limits.',
|
||||
invalidNumber: 'The following fields contain invalid numbers. Please fix them before saving: {fields}',
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5473,7 +5518,17 @@ export default {
|
||||
defaultSubscriptionsDuplicate:
|
||||
'Duplicate subscription group: {groupId}. Each group can only appear once.',
|
||||
subscriptionGroup: 'Subscription Group',
|
||||
subscriptionValidityDays: 'Validity (days)'
|
||||
subscriptionValidityDays: 'Validity (days)',
|
||||
defaultPlatformQuotas: 'Default Platform Quotas (on signup)',
|
||||
defaultPlatformQuotasHint: 'Automatically assigned to new users on signup; existing users are not affected. Leave blank = unlimited.',
|
||||
platformQuotaNotice: 'Monthly quota uses a 30-day rolling window, not a calendar month.',
|
||||
},
|
||||
platformQuota: {
|
||||
platform: 'Platform',
|
||||
daily: 'Daily (USD)',
|
||||
weekly: 'Weekly (USD)',
|
||||
monthly: 'Monthly (USD, 30d rolling)',
|
||||
placeholder: 'Unlimited',
|
||||
},
|
||||
claudeCode: {
|
||||
title: 'Claude Code Settings',
|
||||
@@ -6194,7 +6249,9 @@ export default {
|
||||
grantOnFirstBindHint: 'Grant default entitlements when an existing user first binds this source.',
|
||||
defaultSubscriptionsLabel: 'Default subscriptions',
|
||||
defaultSubscriptionsHint: 'Applies only to this auth source. Leave empty to skip source-specific subscriptions.',
|
||||
noSourceSubscriptions: 'No source-specific default subscriptions configured.'
|
||||
noSourceSubscriptions: 'No source-specific default subscriptions configured.',
|
||||
platformQuotasOverride: 'Platform Quota Overrides',
|
||||
platformQuotasOverrideHint: 'Blank fields inherit the system default. Set to 0 to fully block that window for this auth source.',
|
||||
},
|
||||
paymentVisibleMethods: {
|
||||
methodLabel: '{title} visible method',
|
||||
|
||||
@@ -633,6 +633,15 @@ export default {
|
||||
platformBreakdownEmpty: '暂无平台用量',
|
||||
platformCount: '{count} 个平台',
|
||||
platformOther: '其他',
|
||||
platformQuota: {
|
||||
title: '配额用量',
|
||||
daily: '日',
|
||||
weekly: '周',
|
||||
monthly: '月(近30天)',
|
||||
resetsAt: '{time} 重置',
|
||||
noLimit: '不限制',
|
||||
disabled: '已禁用',
|
||||
},
|
||||
tokenUsageTrend: 'Token 使用趋势',
|
||||
noDataAvailable: '暂无数据',
|
||||
model: '模型',
|
||||
@@ -1814,6 +1823,7 @@ export default {
|
||||
groups: '分组',
|
||||
subscriptions: '订阅分组',
|
||||
balance: '余额',
|
||||
balancePlatformQuota: '余额(平台配额)',
|
||||
usage: '用量',
|
||||
usageAnthropic: '用量 (Claude)',
|
||||
usageOpenAI: '用量 (OpenAI)',
|
||||
@@ -2038,6 +2048,41 @@ export default {
|
||||
failedToReorder: '更新排序失败',
|
||||
keyExists: '属性键已存在',
|
||||
dragToReorder: '拖拽排序'
|
||||
},
|
||||
platformQuota: {
|
||||
menuItem: '平台限额',
|
||||
title: '平台限额',
|
||||
subtitle: '为用户 {email} 配置各上游平台的日 / 周 / 月用量上限',
|
||||
columns: {
|
||||
platform: '平台',
|
||||
daily: '日 (USD)',
|
||||
weekly: '周 (USD)',
|
||||
monthly: '月 (USD, 30天滚动)',
|
||||
usage: '当前用量',
|
||||
},
|
||||
placeholder: '不限制',
|
||||
save: '保存',
|
||||
saving: '保存中...',
|
||||
cancel: '取消',
|
||||
clearAll: '全部清空(取消所有限额)',
|
||||
clearAllConfirm: '确认清空全部平台的日 / 周 / 月限额?所有平台将变为"无限额",本地无法撤销,需要在保存前手动重填。',
|
||||
reset: {
|
||||
button: '重置该窗口',
|
||||
confirm: '确认重置该用户 {platform} 平台的 {window} 用量?此操作立即生效。',
|
||||
success: '已重置 {platform} {window} 用量',
|
||||
failed: '重置失败',
|
||||
},
|
||||
updateSuccess: '平台限额已更新',
|
||||
updateFailed: '保存失败',
|
||||
loadFailed: '加载失败',
|
||||
hint: '留空 = 不限制该窗口。',
|
||||
windowDaily: '日',
|
||||
windowWeekly: '周',
|
||||
windowMonthly: '月',
|
||||
cellNotConfigured: '未配置',
|
||||
cellColumnTooltip: '仅展示已设限额的平台',
|
||||
subscriptionWarning: '此用户有活跃订阅,平台限额仅在余额(标准)模式下生效,订阅模式请求不受此限额约束。',
|
||||
invalidNumber: '以下字段填写不是合法数字,请修正后再保存:{fields}',
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5632,7 +5677,17 @@ export default {
|
||||
defaultSubscriptionsEmpty: '未配置默认订阅。新用户不会自动获得订阅套餐。',
|
||||
defaultSubscriptionsDuplicate: '默认订阅存在重复分组:{groupId}。每个分组只能出现一次。',
|
||||
subscriptionGroup: '订阅分组',
|
||||
subscriptionValidityDays: '有效期(天)'
|
||||
subscriptionValidityDays: '有效期(天)',
|
||||
defaultPlatformQuotas: '默认平台限额(注册时分配)',
|
||||
defaultPlatformQuotasHint: '新用户注册时自动写入平台限额记录;已有用户不受影响。留空 = 该平台该窗口不限制。',
|
||||
platformQuotaNotice: '月限额为 30 天滚动窗口,非自然月',
|
||||
},
|
||||
platformQuota: {
|
||||
platform: '平台',
|
||||
daily: '日限额 (USD)',
|
||||
weekly: '周限额 (USD)',
|
||||
monthly: '月限额 (USD, 30天滚动)',
|
||||
placeholder: '不限',
|
||||
},
|
||||
claudeCode: {
|
||||
title: 'Claude Code 设置',
|
||||
@@ -6352,7 +6407,9 @@ export default {
|
||||
grantOnFirstBindHint: '已有账号首次绑定该来源时发放默认权益。',
|
||||
defaultSubscriptionsLabel: '默认订阅',
|
||||
defaultSubscriptionsHint: '仅对当前认证来源生效,未配置时不追加来源专属订阅。',
|
||||
noSourceSubscriptions: '当前来源未配置专属默认订阅。'
|
||||
noSourceSubscriptions: '当前来源未配置专属默认订阅。',
|
||||
platformQuotasOverride: '平台限额覆盖',
|
||||
platformQuotasOverrideHint: '留空的字段继承「系统默认平台限额」;填 0 表示禁止该窗口使用。',
|
||||
},
|
||||
paymentVisibleMethods: {
|
||||
methodLabel: '{title} 可见方式',
|
||||
|
||||
Reference in New Issue
Block a user