diff --git a/backend/cmd/server/VERSION b/backend/cmd/server/VERSION index 49e7ca57..d6418142 100644 --- a/backend/cmd/server/VERSION +++ b/backend/cmd/server/VERSION @@ -1 +1 @@ -0.1.110.21 +0.1.110.23 diff --git a/frontend/src/components/account/CreateAccountModal.vue b/frontend/src/components/account/CreateAccountModal.vue index e83e061e..e3d2d19a 100644 --- a/frontend/src/components/account/CreateAccountModal.vue +++ b/frontend/src/components/account/CreateAccountModal.vue @@ -1477,10 +1477,47 @@ - -
+ +
-

{{ t('admin.accounts.quotaLimit') }}

+

{{ t('admin.accounts.quotaControl.title') }}

+

+ {{ t('admin.accounts.quotaControl.hint') }} +

+
+ +
+ + +
+
+

{{ t('admin.accounts.quotaControl.title') }}

{{ t('admin.accounts.quotaLimitHint') }}

@@ -1489,6 +1526,7 @@ :totalLimit="editQuotaLimit" :dailyLimit="editQuotaDailyLimit" :weeklyLimit="editQuotaWeeklyLimit" + :quotaNotifyGlobalEnabled="quotaNotifyGlobalEnabled" :dailyResetMode="editDailyResetMode" :dailyResetHour="editDailyResetHour" :weeklyResetMode="editWeeklyResetMode" @@ -1823,7 +1861,7 @@
- +
{ webSearchGlobalEnabled.value = cfg?.enabled === true && (cfg?.providers?.length ?? 0) > 0 }).catch(() => { webSearchGlobalEnabled.value = false }) + +adminAPI.settings.getSettings().then(settings => { + quotaNotifyGlobalEnabled.value = settings.account_quota_notify_enabled === true +}).catch(() => { quotaNotifyGlobalEnabled.value = false }) const mixedScheduling = ref(false) // For antigravity accounts: enable mixed scheduling const allowOverages = ref(false) // For antigravity accounts: enable AI Credits overages const antigravityAccountType = ref<'oauth' | 'upstream'>('oauth') // For antigravity: oauth or upstream diff --git a/frontend/src/components/account/EditAccountModal.vue b/frontend/src/components/account/EditAccountModal.vue index 74e5fc1f..89f1fb18 100644 --- a/frontend/src/components/account/EditAccountModal.vue +++ b/frontend/src/components/account/EditAccountModal.vue @@ -1190,6 +1190,7 @@ :weeklyResetDay="editWeeklyResetDay" :weeklyResetHour="editWeeklyResetHour" :resetTimezone="editResetTimezone" + :quotaNotifyGlobalEnabled="quotaNotifyGlobalEnabled" :quotaNotifyDailyEnabled="editQuotaNotifyDailyEnabled" :quotaNotifyDailyThreshold="editQuotaNotifyDailyThreshold" :quotaNotifyDailyThresholdType="editQuotaNotifyDailyThresholdType" @@ -1240,6 +1241,7 @@ :weeklyResetDay="editWeeklyResetDay" :weeklyResetHour="editWeeklyResetHour" :resetTimezone="editResetTimezone" + :quotaNotifyGlobalEnabled="quotaNotifyGlobalEnabled" :quotaNotifyDailyEnabled="editQuotaNotifyDailyEnabled" :quotaNotifyDailyThreshold="editQuotaNotifyDailyThreshold" :quotaNotifyDailyThresholdType="editQuotaNotifyDailyThresholdType" @@ -1991,11 +1993,16 @@ const codexCLIOnlyEnabled = ref(false) const anthropicPassthroughEnabled = ref(false) const webSearchEmulationMode = ref('default') const webSearchGlobalEnabled = ref(false) +const quotaNotifyGlobalEnabled = ref(false) -// Load web search global state once +// Load global feature states once adminAPI.settings.getWebSearchEmulationConfig().then(cfg => { webSearchGlobalEnabled.value = cfg?.enabled === true && (cfg?.providers?.length ?? 0) > 0 }).catch(() => { webSearchGlobalEnabled.value = false }) + +adminAPI.settings.getSettings().then(settings => { + quotaNotifyGlobalEnabled.value = settings.account_quota_notify_enabled === true +}).catch(() => { quotaNotifyGlobalEnabled.value = false }) const editQuotaLimit = ref(null) const editQuotaDailyLimit = ref(null) const editQuotaWeeklyLimit = ref(null) diff --git a/frontend/src/components/account/QuotaLimitCard.vue b/frontend/src/components/account/QuotaLimitCard.vue index 64bdb08a..38ab6479 100644 --- a/frontend/src/components/account/QuotaLimitCard.vue +++ b/frontend/src/components/account/QuotaLimitCard.vue @@ -15,6 +15,7 @@ const props = withDefaults(defineProps<{ weeklyResetDay: number | null weeklyResetHour: number | null resetTimezone: string | null + quotaNotifyGlobalEnabled?: boolean quotaNotifyDailyEnabled?: boolean | null quotaNotifyDailyThreshold?: number | null quotaNotifyDailyThresholdType?: string | null @@ -25,6 +26,7 @@ const props = withDefaults(defineProps<{ quotaNotifyTotalThreshold?: number | null quotaNotifyTotalThresholdType?: string | null }>(), { + quotaNotifyGlobalEnabled: false, quotaNotifyDailyEnabled: null, quotaNotifyDailyThreshold: null, quotaNotifyDailyThresholdType: null, @@ -234,7 +236,7 @@ const onWeeklyModeChange = (e: Event) => {

{

{

{{ t('admin.accounts.quotaTotalLimitHint') }}