fix(settings): align controls with their settings sections

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Zyy
2026-11-27 22:18:34 +08:00
co-authored by Codex
parent 81dacf603f
commit 62e9cd03c5
6 changed files with 9 additions and 29 deletions
@@ -389,7 +389,6 @@
"quotaResetPrioritySettings": "Quota scheduling settings"
},
"access": {
"accessRestrictions": "Access restrictions",
"deleteAdminApiKey": "Delete Admin API key",
"deleteKeyDescription": "External systems will lose admin API access through this key",
"areYouSureYouWantToDelete": "Are you sure you want to delete the current administrator API key? This operation will take effect immediately"
@@ -389,7 +389,6 @@
"quotaResetPrioritySettings": "额度调度设置"
},
"access": {
"accessRestrictions": "访问限制",
"deleteAdminApiKey": "删除管理员 API密钥",
"deleteKeyDescription": "删除后外部系统将无法继续使用该 API密钥调用管理接口",
"areYouSureYouWantToDelete": "确定要删除当前管理员 API密钥吗?此操作会立即生效"
@@ -389,7 +389,6 @@
"quotaResetPrioritySettings": "額度調度設置"
},
"access": {
"accessRestrictions": "訪問限制",
"deleteAdminApiKey": "刪除管理員 API密鑰",
"deleteKeyDescription": "刪除後外部系統將無法繼續使用該 API密鑰調用管理接口",
"areYouSureYouWantToDelete": "確定要刪除當前管理員 API密鑰嗎?此操作會立即生效"
@@ -3,23 +3,12 @@ import { ZConfirmDialog } from '@codex-proxy/ui'
import { onMounted } from 'vue'
import { useI18n } from 'vue-i18n'
import ClientVersionSettings from '../client-version/index.vue'
import AdminApiKeyCard from './AdminApiKeyCard.vue'
import AdminPasswordCard from './AdminPasswordCard.vue'
import ResponseBodyLimitCard from './ResponseBodyLimitCard.vue'
import { useAdminApiKey } from './useAdminApiKey'
defineProps<{
disabled: boolean
loading: boolean
}>()
const { t } = useI18n({ useScope: 'global' })
const minCodexDesktopVersion = defineModel<string>('minCodexDesktopVersion', { required: true })
const minCodexCliVersion = defineModel<string>('minCodexCliVersion', { required: true })
const responsesMaxDecompressedBodyMiB = defineModel<string>('responsesMaxDecompressedBodyMiB', { required: true })
const {
loading: adminKeyLoading,
regenerating,
@@ -51,15 +40,6 @@ onMounted(loadStatus)
@copy="copyGeneratedKey"
/>
<fieldset :disabled="disabled" class="col-span-full m-0 grid min-w-0 gap-5 border-0 p-0 @6xl/settings:grid-cols-2" :aria-label="t('settings.access.accessRestrictions')">
<ClientVersionSettings
v-model:min-codex-desktop-version="minCodexDesktopVersion"
v-model:min-codex-cli-version="minCodexCliVersion"
:loading="loading"
/>
<ResponseBodyLimitCard v-model="responsesMaxDecompressedBodyMiB" />
</fieldset>
<ZConfirmDialog
v-model="showDeleteModal"
:title="t('settings.access.deleteAdminApiKey')"
+9 -6
View File
@@ -14,6 +14,7 @@ import { isBuiltinProvider, PROVIDER_IDS } from '@/providers/catalog'
import AccountAffinityCard from './components/AccountAffinityCard.vue'
import AccountWarmupCard from './components/AccountWarmupCard.vue'
import SettingsBackupSection from './components/backup/index.vue'
import ClientVersionSettings from './components/client-version/index.vue'
import ConcurrencyPolicyCard from './components/ConcurrencyPolicyCard.vue'
import AccountErrorProtectionCard from './components/error-protection/index.vue'
import GuardianReviewCard from './components/GuardianReviewCard.vue'
@@ -25,6 +26,7 @@ import RequestHistoryCard from './components/RequestHistoryCard.vue'
import RequestLocationCard from './components/RequestLocationCard.vue'
import RequestProfileCard from './components/RequestProfileCard.vue'
import ResetCreditCard from './components/ResetCreditCard.vue'
import ResponseBodyLimitCard from './components/ResponseBodyLimitCard.vue'
import RetryPolicyCard from './components/RetryPolicyCard.vue'
import RotationStrategyCard from './components/RotationStrategyCard.vue'
import SettingsAccessSection from './components/settings-access/index.vue'
@@ -253,11 +255,13 @@ watch(() => !loading.value && route.hash === '#reset-credits', async (ready) =>
<ModelAliasesCard
:mappings="mappings"
:loading="loading"
class="col-span-full"
@add-mapping="addMapping"
@update-mapping="updateMapping"
@remove-mapping="removeMapping"
/>
<RequestHistoryCard v-model="usageRetentionDaysValue" />
<ResponseBodyLimitCard v-model="responsesMaxDecompressedBodyMiBValue" />
</div>
</div>
@@ -309,7 +313,11 @@ watch(() => !loading.value && route.hash === '#reset-credits', async (ready) =>
v-model:enabled="form.accountWarmupEnabled"
v-model:cron="form.accountWarmupCron"
v-model:model="form.accountWarmupModel"
class="col-span-full"
/>
<ClientVersionSettings
v-model:min-codex-desktop-version="form.minCodexDesktopVersion"
v-model:min-codex-cli-version="form.minCodexCliVersion"
:loading="loading"
/>
<div class="col-span-full min-w-0">
<PrivacyPolicyCard v-model="form.codexPrivacyPolicy" :disabled="disabled" />
@@ -322,12 +330,7 @@ watch(() => !loading.value && route.hash === '#reset-credits', async (ready) =>
<SettingsAccessSection
v-if="visited.has('runtime')"
v-show="section === 'runtime'"
v-model:min-codex-desktop-version="form.minCodexDesktopVersion"
v-model:min-codex-cli-version="form.minCodexCliVersion"
v-model:responses-max-decompressed-body-mi-b="responsesMaxDecompressedBodyMiBValue"
data-settings-section="runtime"
:disabled="disabled"
:loading="loading"
/>
</ZForm>