保存当前API Key管理功能的修改

- 统一用户创建和admin创建API Key的逻辑
- 修复admin更新用户创建的API Key功能
- 用户创建API Key名称改为displayName
- 默认无限制配置

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
iRubbish
2025-08-26 13:42:02 +08:00
parent f31f7c9385
commit 82f545c3b0
7 changed files with 507 additions and 171 deletions

View File

@@ -51,14 +51,7 @@
@click="currentTab = 'api-keys'"
>
<i class="fas fa-key mr-1 md:mr-2" />
<span class="text-sm md:text-base">API Keys</span>
</button>
<button
:class="['tab-pill-button', currentTab === 'dashboard' ? 'active' : '']"
@click="currentTab = 'dashboard'"
>
<i class="fas fa-chart-line mr-1 md:mr-2" />
<span class="text-sm md:text-base">使用统计</span>
<span class="text-sm md:text-base">API Keys 管理</span>
</button>
<button
:class="['tab-pill-button', currentTab === 'tutorial' ? 'active' : '']"
@@ -76,11 +69,6 @@
<UserApiKeysView :user-info="userInfo" />
</div>
<!-- 使用统计 -->
<div v-if="currentTab === 'dashboard'" class="tab-content">
<UserStatsView :user-info="userInfo" />
</div>
<!-- 使用教程 -->
<div v-if="currentTab === 'tutorial'" class="tab-content">
<div class="glass-strong rounded-3xl shadow-xl">
@@ -97,7 +85,6 @@ import LogoTitle from '@/components/common/LogoTitle.vue'
import ThemeToggle from '@/components/common/ThemeToggle.vue'
import TutorialView from './TutorialView.vue'
import UserApiKeysView from '@/components/user/UserApiKeysView.vue'
import UserStatsView from '@/components/user/UserStatsView.vue'
const themeStore = useThemeStore()
// 当前标签页