mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 00:53:33 +00:00
feat: 完全移除 API Key 图标功能
彻底删除 API Key 图标功能的所有相关代码: 前端改动: - 删除 IconPicker.vue 组件文件 - 移除 ApiKeysView.vue 中的图标显示和 updateApiKeyIcon 方法 - 清理 CreateApiKeyModal.vue 中的图标选择器 - 清理 EditApiKeyModal.vue 中的图标选择器 - 移除所有 IconPicker 组件的引用 后端改动: - 从 apiKeyService.js 中移除 icon 字段更新支持 - 从 admin.js 路由中移除 icon 参数处理和验证逻辑 - 清理创建和更新 API Key 时的 icon 参数 此改动简化了 API Key 管理界面,移除了不必要的图标功能。 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -32,9 +32,7 @@
|
||||
class="mb-1.5 block text-xs font-semibold text-gray-700 dark:text-gray-300 sm:mb-3 sm:text-sm"
|
||||
>名称</label
|
||||
>
|
||||
<div class="flex items-center gap-2">
|
||||
<!-- 图标选择器 -->
|
||||
<IconPicker v-model="form.icon" size="medium" />
|
||||
<div>
|
||||
<input
|
||||
v-model="form.name"
|
||||
class="form-input flex-1 border-gray-300 text-sm dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:placeholder-gray-400"
|
||||
@@ -662,7 +660,6 @@ import { useClientsStore } from '@/stores/clients'
|
||||
import { useApiKeysStore } from '@/stores/apiKeys'
|
||||
import { apiClient } from '@/config/api'
|
||||
import AccountSelector from '@/components/common/AccountSelector.vue'
|
||||
import IconPicker from '@/components/common/IconPicker.vue'
|
||||
|
||||
const props = defineProps({
|
||||
apiKey: {
|
||||
@@ -710,7 +707,6 @@ const unselectedTags = computed(() => {
|
||||
// 表单数据
|
||||
const form = reactive({
|
||||
name: '',
|
||||
icon: '',
|
||||
tokenLimit: '', // 保留用于检测历史数据
|
||||
rateLimitWindow: '',
|
||||
rateLimitRequests: '',
|
||||
@@ -809,7 +805,6 @@ const updateApiKey = async () => {
|
||||
// 准备提交的数据
|
||||
const data = {
|
||||
name: form.name, // 添加名称字段
|
||||
icon: form.icon || '', // 添加图标字段
|
||||
tokenLimit: 0, // 清除历史token限制
|
||||
rateLimitWindow:
|
||||
form.rateLimitWindow !== '' && form.rateLimitWindow !== null
|
||||
@@ -1042,7 +1037,6 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
form.name = props.apiKey.name
|
||||
form.icon = props.apiKey.icon || ''
|
||||
|
||||
// 处理速率限制迁移:如果有tokenLimit且没有rateLimitCost,提示用户
|
||||
form.tokenLimit = props.apiKey.tokenLimit || ''
|
||||
|
||||
Reference in New Issue
Block a user