mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-24 09:41:17 +00:00
fix(admin-spa): 修复版本号显示位置,使其与网站名称在同一行显示
This commit is contained in:
@@ -556,17 +556,13 @@ const createApiKey = async () => {
|
|||||||
tags: form.tags.length > 0 ? form.tags : undefined
|
tags: form.tags.length > 0 ? form.tags : undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
// 模型限制
|
// 模型限制 - 始终提交这些字段
|
||||||
data.enableModelRestriction = form.enableModelRestriction
|
data.enableModelRestriction = form.enableModelRestriction
|
||||||
if (form.enableModelRestriction && form.restrictedModels.length > 0) {
|
data.restrictedModels = form.restrictedModels
|
||||||
data.restrictedModels = form.restrictedModels
|
|
||||||
}
|
|
||||||
|
|
||||||
// 客户端限制
|
// 客户端限制 - 始终提交这些字段
|
||||||
data.enableClientRestriction = form.enableClientRestriction
|
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)
|
const result = await apiClient.post('/admin/api-keys', data)
|
||||||
|
|
||||||
|
|||||||
@@ -446,21 +446,13 @@ const updateApiKey = async () => {
|
|||||||
tags: form.tags
|
tags: form.tags
|
||||||
}
|
}
|
||||||
|
|
||||||
// 模型限制
|
// 模型限制 - 始终提交这些字段
|
||||||
data.enableModelRestriction = form.enableModelRestriction
|
data.enableModelRestriction = form.enableModelRestriction
|
||||||
if (form.enableModelRestriction && form.restrictedModels.length > 0) {
|
data.restrictedModels = form.restrictedModels
|
||||||
data.restrictedModels = form.restrictedModels
|
|
||||||
} else {
|
|
||||||
data.restrictedModels = []
|
|
||||||
}
|
|
||||||
|
|
||||||
// 客户端限制
|
// 客户端限制 - 始终提交这些字段
|
||||||
data.enableClientRestriction = form.enableClientRestriction
|
data.enableClientRestriction = form.enableClientRestriction
|
||||||
if (form.enableClientRestriction && form.allowedClients.length > 0) {
|
data.allowedClients = form.allowedClients
|
||||||
data.allowedClients = form.allowedClients
|
|
||||||
} else {
|
|
||||||
data.allowedClients = []
|
|
||||||
}
|
|
||||||
|
|
||||||
const result = await apiClient.put(`/admin/api-keys/${props.apiKey.id}`, data)
|
const result = await apiClient.put(`/admin/api-keys/${props.apiKey.id}`, data)
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
<h1 :class="['text-2xl font-bold header-title leading-tight', titleClass]">{{ title }}</h1>
|
<h1 :class="['text-2xl font-bold header-title leading-tight', titleClass]">{{ title }}</h1>
|
||||||
</template>
|
</template>
|
||||||
<div v-else-if="loading" class="h-8 w-64 bg-gray-300/50 rounded animate-pulse"></div>
|
<div v-else-if="loading" class="h-8 w-64 bg-gray-300/50 rounded animate-pulse"></div>
|
||||||
|
<!-- 插槽用于版本信息等额外内容 -->
|
||||||
|
<slot name="after-title"></slot>
|
||||||
</div>
|
</div>
|
||||||
<p v-if="subtitle" class="text-gray-600 text-sm leading-tight mt-0.5">{{ subtitle }}</p>
|
<p v-if="subtitle" class="text-gray-600 text-sm leading-tight mt-0.5">{{ subtitle }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,22 +9,25 @@
|
|||||||
subtitle="管理后台"
|
subtitle="管理后台"
|
||||||
:logo-src="oemSettings.siteIconData || oemSettings.siteIcon"
|
:logo-src="oemSettings.siteIconData || oemSettings.siteIcon"
|
||||||
title-class="text-white"
|
title-class="text-white"
|
||||||
/>
|
>
|
||||||
<!-- 版本信息 -->
|
<template #after-title>
|
||||||
<div class="flex items-center gap-2">
|
<!-- 版本信息 -->
|
||||||
<span class="text-sm text-gray-400 font-mono">v{{ versionInfo.current || '...' }}</span>
|
<div class="flex items-center gap-2">
|
||||||
<!-- 更新提示 -->
|
<span class="text-sm text-gray-400 font-mono">v{{ versionInfo.current || '...' }}</span>
|
||||||
<a
|
<!-- 更新提示 -->
|
||||||
v-if="versionInfo.hasUpdate"
|
<a
|
||||||
:href="versionInfo.releaseInfo?.htmlUrl || '#'"
|
v-if="versionInfo.hasUpdate"
|
||||||
target="_blank"
|
:href="versionInfo.releaseInfo?.htmlUrl || '#'"
|
||||||
class="inline-flex items-center gap-1 px-2 py-0.5 bg-green-500 border border-green-600 rounded-full text-xs text-white hover:bg-green-600 transition-colors animate-pulse"
|
target="_blank"
|
||||||
title="有新版本可用"
|
class="inline-flex items-center gap-1 px-2 py-0.5 bg-green-500 border border-green-600 rounded-full text-xs text-white hover:bg-green-600 transition-colors animate-pulse"
|
||||||
>
|
title="有新版本可用"
|
||||||
<i class="fas fa-arrow-up text-[10px]"></i>
|
>
|
||||||
<span>新版本</span>
|
<i class="fas fa-arrow-up text-[10px]"></i>
|
||||||
</a>
|
<span>新版本</span>
|
||||||
</div>
|
</a>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</LogoTitle>
|
||||||
</div>
|
</div>
|
||||||
<!-- 用户菜单 -->
|
<!-- 用户菜单 -->
|
||||||
<div class="relative user-menu-container">
|
<div class="relative user-menu-container">
|
||||||
|
|||||||
Reference in New Issue
Block a user