diff --git a/web/admin-spa/src/components/apikeys/CreateApiKeyModal.vue b/web/admin-spa/src/components/apikeys/CreateApiKeyModal.vue index ed2d8ec1..b9f6c9be 100644 --- a/web/admin-spa/src/components/apikeys/CreateApiKeyModal.vue +++ b/web/admin-spa/src/components/apikeys/CreateApiKeyModal.vue @@ -556,17 +556,13 @@ const createApiKey = async () => { tags: form.tags.length > 0 ? form.tags : undefined } - // 模型限制 + // 模型限制 - 始终提交这些字段 data.enableModelRestriction = form.enableModelRestriction - if (form.enableModelRestriction && form.restrictedModels.length > 0) { - data.restrictedModels = form.restrictedModels - } + data.restrictedModels = form.restrictedModels - // 客户端限制 + // 客户端限制 - 始终提交这些字段 data.enableClientRestriction = form.enableClientRestriction - if (form.enableClientRestriction && form.allowedClients.length > 0) { - data.allowedClients = form.allowedClients - } + data.allowedClients = form.allowedClients const result = await apiClient.post('/admin/api-keys', data) diff --git a/web/admin-spa/src/components/apikeys/EditApiKeyModal.vue b/web/admin-spa/src/components/apikeys/EditApiKeyModal.vue index 3f41b3dd..b4da3083 100644 --- a/web/admin-spa/src/components/apikeys/EditApiKeyModal.vue +++ b/web/admin-spa/src/components/apikeys/EditApiKeyModal.vue @@ -446,21 +446,13 @@ const updateApiKey = async () => { tags: form.tags } - // 模型限制 + // 模型限制 - 始终提交这些字段 data.enableModelRestriction = form.enableModelRestriction - if (form.enableModelRestriction && form.restrictedModels.length > 0) { - data.restrictedModels = form.restrictedModels - } else { - data.restrictedModels = [] - } + data.restrictedModels = form.restrictedModels - // 客户端限制 + // 客户端限制 - 始终提交这些字段 data.enableClientRestriction = form.enableClientRestriction - if (form.enableClientRestriction && form.allowedClients.length > 0) { - data.allowedClients = form.allowedClients - } else { - data.allowedClients = [] - } + data.allowedClients = form.allowedClients const result = await apiClient.put(`/admin/api-keys/${props.apiKey.id}`, data) diff --git a/web/admin-spa/src/components/common/LogoTitle.vue b/web/admin-spa/src/components/common/LogoTitle.vue index e7a4c8c0..e1254310 100644 --- a/web/admin-spa/src/components/common/LogoTitle.vue +++ b/web/admin-spa/src/components/common/LogoTitle.vue @@ -20,6 +20,8 @@

{{ title }}

+ +

{{ subtitle }}

diff --git a/web/admin-spa/src/components/layout/AppHeader.vue b/web/admin-spa/src/components/layout/AppHeader.vue index ef16a409..641db8b4 100644 --- a/web/admin-spa/src/components/layout/AppHeader.vue +++ b/web/admin-spa/src/components/layout/AppHeader.vue @@ -9,22 +9,25 @@ subtitle="管理后台" :logo-src="oemSettings.siteIconData || oemSettings.siteIcon" title-class="text-white" - /> - -
- v{{ versionInfo.current || '...' }} - - - - 新版本 - -
+ > + +