diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml index 6f76ef4f..d7e15377 100644 --- a/.github/workflows/backend-ci.yml +++ b/.github/workflows/backend-ci.yml @@ -17,6 +17,7 @@ jobs: go-version-file: backend/go.mod check-latest: false cache: true + cache-dependency-path: backend/go.sum - name: Verify Go version run: | go version | grep -q 'go1.26.2' @@ -36,6 +37,7 @@ jobs: go-version-file: backend/go.mod check-latest: false cache: true + cache-dependency-path: backend/go.sum - name: Verify Go version run: | go version | grep -q 'go1.26.2' diff --git a/README.md b/README.md index 3a56d089..74ab9af2 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,16 @@ Sub2API is an AI API gateway platform designed to distribute and manage API quot






- {{ t('admin.accounts.quotaLimitHint') }} + {{ t('admin.accounts.quotaControl.hint') }}
+ {{ t('admin.accounts.quotaLimitHint') }} +
++ {{ t('admin.accounts.anthropic.webSearchEmulationDesc') }} +
++ {{ t('admin.accounts.anthropic.webSearchEmulationDesc') }} +
++ {{ t('admin.accounts.quotaControl.hint') }} +
+{{ t('admin.accounts.quotaLimitHint') }}
@@ -1167,6 +1241,16 @@ :weeklyResetDay="editWeeklyResetDay" :weeklyResetHour="editWeeklyResetHour" :resetTimezone="editResetTimezone" + :quotaNotifyGlobalEnabled="quotaNotifyGlobalEnabled" + :quotaNotifyDailyEnabled="quotaNotifyState.daily.enabled" + :quotaNotifyDailyThreshold="quotaNotifyState.daily.threshold" + :quotaNotifyDailyThresholdType="quotaNotifyState.daily.thresholdType" + :quotaNotifyWeeklyEnabled="quotaNotifyState.weekly.enabled" + :quotaNotifyWeeklyThreshold="quotaNotifyState.weekly.threshold" + :quotaNotifyWeeklyThresholdType="quotaNotifyState.weekly.thresholdType" + :quotaNotifyTotalEnabled="quotaNotifyState.total.enabled" + :quotaNotifyTotalThreshold="quotaNotifyState.total.threshold" + :quotaNotifyTotalThresholdType="quotaNotifyState.total.thresholdType" @update:totalLimit="editQuotaLimit = $event" @update:dailyLimit="editQuotaDailyLimit = $event" @update:weeklyLimit="editQuotaWeeklyLimit = $event" @@ -1176,6 +1260,15 @@ @update:weeklyResetDay="editWeeklyResetDay = $event" @update:weeklyResetHour="editWeeklyResetHour = $event" @update:resetTimezone="editResetTimezone = $event" + @update:quotaNotifyDailyEnabled="quotaNotifyState.daily.enabled = $event" + @update:quotaNotifyDailyThreshold="quotaNotifyState.daily.threshold = $event" + @update:quotaNotifyDailyThresholdType="quotaNotifyState.daily.thresholdType = $event" + @update:quotaNotifyWeeklyEnabled="quotaNotifyState.weekly.enabled = $event" + @update:quotaNotifyWeeklyThreshold="quotaNotifyState.weekly.threshold = $event" + @update:quotaNotifyWeeklyThresholdType="quotaNotifyState.weekly.thresholdType = $event" + @update:quotaNotifyTotalEnabled="quotaNotifyState.total.enabled = $event" + @update:quotaNotifyTotalThreshold="quotaNotifyState.total.threshold = $event" + @update:quotaNotifyTotalThresholdType="quotaNotifyState.total.thresholdType = $event" />{{ hintRolling }}
+- {{ t('admin.accounts.quotaLimitToggleHint') }} -
++ {{ t('admin.accounts.quotaLimitToggleHint') }} +
+- - {{ t('admin.accounts.quotaDailyLimitHintFixed', { hour: String(dailyResetHour ?? 0).padStart(2, '0'), timezone: resetTimezone || 'UTC' }) }} - - - {{ t('admin.accounts.quotaDailyLimitHint') }} - -
-- - {{ t('admin.accounts.quotaWeeklyLimitHintFixed', { day: t('admin.accounts.dayOfWeek.' + (dayOptions.find(d => d.value === (weeklyResetDay ?? 1))?.key || 'monday')), hour: String(weeklyResetHour ?? 0).padStart(2, '0'), timezone: resetTimezone || 'UTC' }) }} - - - {{ t('admin.accounts.quotaWeeklyLimitHint') }} - -
-{{ t('admin.accounts.quotaTotalLimitHint') }}
-{{ t('payment.orders.amount') }}
-${{ order.amount.toFixed(2) }}
+{{ t('payment.orders.baseAmount') }}
+¥{{ baseAmount.toFixed(2) }}
+{{ t('payment.orders.fee') }} ({{ order.fee_rate }}%)
+¥{{ feeAmount.toFixed(2) }}
{{ t('payment.orders.payAmount') }}
-${{ order.pay_amount.toFixed(2) }}
+¥{{ order.pay_amount.toFixed(2) }}
+{{ t('payment.orders.creditedAmount') }}
+{{ order.order_type === 'balance' ? '$' : '¥' }}{{ order.amount.toFixed(2) }}
{{ t('payment.orders.paymentMethod') }}
@@ -31,10 +39,6 @@ {{ t('payment.methods.' + order.payment_type, order.payment_type) }}{{ t('payment.admin.feeRate') }}
-{{ (order.fee_rate * 100).toFixed(1) }}%
-{{ t('payment.admin.orderType') }}
@@ -73,7 +77,7 @@
+ {{ t('admin.channels.form.applyPricingToAccountStatsDesc') }} +
++ {{ t('admin.channels.form.webSearchEmulationHint') }} +
++ {{ t('admin.channels.form.noRulesConfigured') }} +
+ ++ {{ t('admin.channels.form.noGroupsInChannel') }} +
++ {{ t('admin.channels.form.ruleAccountsHint') }} +
+${{ formatCost(stats.today_actual_cost) }} + / + ${{ formatCost(stats.today_account_cost) }} + / - / ${{ formatCost(stats.today_cost) }}${{ formatCost(stats.today_cost) }}
${{ formatCost(stats.total_actual_cost) }} + / + ${{ formatCost(stats.total_account_cost) }} + / - / ${{ formatCost(stats.total_cost) }}${{ formatCost(stats.total_cost) }}
+ {{ t('admin.settings.webSearchEmulation.description') }} +
++ {{ t('admin.settings.webSearchEmulation.enabledHint') }} +
+{{ t('admin.settings.webSearchEmulation.quotaLimitHint') }}
+{{ t('admin.settings.webSearchEmulation.subscribedAtHint') }}
++ {{ t('admin.settings.webSearchEmulation.testResultProvider') }}: {{ wsTestResult.provider }} +
+{{ r.snippet }}
+{{ t('admin.settings.payment.balanceRechargeMultiplierHint') }}
+{{ t('admin.settings.payment.balanceRechargePreview', { usd: (Number(form.payment_balance_recharge_multiplier) || 1).toFixed(2) }) }}
+{{ t('admin.settings.payment.rechargeFeeRateHint') }}
+{{ t('admin.settings.payment.rechargeFeePreview', { fee: (Number(form.payment_recharge_fee_rate) || 0).toFixed(2) }) }}
+{{ t('admin.settings.payment.orderTimeoutHint') }}
+ {{ t('admin.settings.balanceNotify.description') }} +
+{{ t('admin.settings.balanceNotify.thresholdHint') }}
+{{ t('admin.settings.balanceNotify.rechargeUrlHint') }}
++ {{ t('admin.settings.quotaNotify.description') }} +
+{{ t('admin.settings.quotaNotify.emailsHint') }}
++ {{ t('payment.rechargeRatePreview', { usd: balanceRechargeMultiplier.toFixed(2) }) }} +
{{ errorMessage }}
@@ -110,9 +119,9 @@