feat(admin-ui): 管理后台整体切换为浅色主题(ModernLight) + 新增 lightbulb 图标
1. layout(管理控制台 dashboard.vue): main bg-[#09090b] text-zinc-100 → bg-[#f8fafc] text-zinc-900; header bg-zinc-950/60 border-zinc-800 → bg-white/80 border-zinc-200; 移动菜单按钮/新手引导按钮 text-zinc-300/400 hover:bg-zinc-800 → text-zinc-600 hover:bg-zinc-100 border-zinc-200
2. Admin/Sidebar.vue: bg-[#09090b] border-zinc-800 → bg-white border-zinc-200 + shadow-sm; 标题 text-zinc-100 → 900; activeTab bg-blue-600/10 text-blue-400 → bg-blue-50 text-blue-700 border-blue-200; 未选中 text-zinc-500 hover:text-zinc-200 hover:bg-zinc-800/40 → text-zinc-600 hover:text-zinc-900 hover:bg-zinc-100; 用户卡 avatar/首字母 bg-white/70 border-zinc-200 + 退出按钮 hover:bg-red-50 text-red-600
3. 批量 33 个 Admin 组件硬编码深色原子类 1414 处替换(bg-zinc-9xx / border-zinc-8xx / text-zinc-100,200,300 / shadow-black/ -> 对应 light 版本) + style 块原生 CSS rgba(255,255,255,x) 16 处改为 rgba(0,0,0,x) / var 浅色主题 + 硬编码 bg-[#0c0c0e] / border-white/10 / color:white / surface-primary fallback 对应浅色修正
4. 二轮批量追加: bg-zinc-950 + opacity 变体(80/60/50/40/30/20/10) 共 431 处 → bg-white 对应 opacity 版本;placeholder:text-zinc-800 → 500;text-blue/red/emerald/amber/rose/purple 400 版 → 700/600 深浅一致版;border color /500 /30 → 200;focus:ring /20 → /30;shadow color 阴影降低强度
5. hover:text-white 扫尾: 13 处 DataAnalysisPanel/DatabaseManager/NotificationSender/SemesterManager/SongManagement/UserSongsModal hover 文本从 white → zinc-900;按钮三态从 hover:bg-*600 白字 → hover:bg-*-100/200 对应深字色,和前台 indigo/浅色体系保持一致
6. BlacklistManager 前台可见提示 💡→ <Icon lightbulb amber-600 size=13>;ChangelogManager 徽章色从 emerald-300/blue-300/zinc-400 → emerald-700/blue-700/zinc-600 可读;Icon.vue 新增 lightbulb 分支 stroke 图标
7. 受影响文件: dashboard.vue + Sidebar.vue + Icon.vue + Admin/* (33个组件共 1874 处批量替换 + 20 处手工精细化修正)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<!-- 头部区域 -->
|
||||
<div class="flex flex-col md:flex-row md:items-end justify-between gap-6">
|
||||
<div>
|
||||
<h2 class="text-2xl font-black text-zinc-100 tracking-tight">API密钥管理</h2>
|
||||
<h2 class="text-2xl font-black text-zinc-900 tracking-tight">API密钥管理</h2>
|
||||
<p class="text-xs text-zinc-500 mt-1">管理开放API的访问密钥,控制第三方应用的访问权限</p>
|
||||
</div>
|
||||
<button
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<!-- 过滤器栏 -->
|
||||
<div
|
||||
class="bg-zinc-900/40 border border-zinc-800/60 rounded-2xl p-3 flex flex-col lg:flex-row gap-3 items-center"
|
||||
class="bg-zinc-50/40 border border-zinc-200/60 rounded-2xl p-3 flex flex-col lg:flex-row gap-3 items-center"
|
||||
>
|
||||
<div class="relative flex-1 w-full">
|
||||
<Search class="absolute left-3 top-1/2 -translate-y-1/2 text-zinc-700" :size="16" />
|
||||
@@ -24,7 +24,7 @@
|
||||
v-model="filters.search"
|
||||
type="text"
|
||||
placeholder="搜索API密钥名称或描述..."
|
||||
class="w-full bg-zinc-950 border border-zinc-800/80 rounded-xl pl-10 pr-4 py-2.5 text-xs focus:outline-none focus:border-blue-500/30 transition-all placeholder:text-zinc-800 text-zinc-200"
|
||||
class="w-full bg-white border border-zinc-200/80 rounded-xl pl-10 pr-4 py-2.5 text-xs focus:outline-none focus:border-blue-200 transition-all placeholder:text-zinc-500 text-zinc-700"
|
||||
@input="debouncedSearch"
|
||||
>
|
||||
</div>
|
||||
@@ -42,12 +42,12 @@
|
||||
v-model="filters.createdBy"
|
||||
type="text"
|
||||
placeholder="创建者用户名"
|
||||
class="w-full bg-zinc-950 border border-zinc-800 rounded-xl pl-9 pr-4 py-2.5 text-xs focus:outline-none text-zinc-400 placeholder:text-zinc-800"
|
||||
class="w-full bg-white border border-zinc-200 rounded-xl pl-9 pr-4 py-2.5 text-xs focus:outline-none text-zinc-400 placeholder:text-zinc-500"
|
||||
@input="debouncedSearch"
|
||||
>
|
||||
</div>
|
||||
<button
|
||||
class="p-2.5 bg-zinc-950 border border-zinc-800 rounded-xl text-zinc-600 hover:text-blue-400 transition-all"
|
||||
class="p-2.5 bg-white border border-zinc-200 rounded-xl text-zinc-600 hover:text-blue-700 transition-all"
|
||||
@click="loadApiKeys"
|
||||
>
|
||||
<RefreshCw :size="14" :class="{ 'animate-spin': loading }" />
|
||||
@@ -69,16 +69,16 @@
|
||||
class="flex flex-col items-center justify-center py-20 px-4 text-center"
|
||||
>
|
||||
<div
|
||||
class="w-20 h-20 rounded-3xl bg-zinc-900 border border-zinc-800 flex items-center justify-center mb-6 text-zinc-700 shadow-xl"
|
||||
class="w-20 h-20 rounded-3xl bg-white border border-zinc-200 flex items-center justify-center mb-6 text-zinc-700 shadow-xl"
|
||||
>
|
||||
<Key :size="32" :stroke-width="1.5" />
|
||||
</div>
|
||||
<h3 class="text-lg font-bold text-zinc-200">暂无API密钥</h3>
|
||||
<h3 class="text-lg font-bold text-zinc-700">暂无API密钥</h3>
|
||||
<p class="text-xs text-zinc-500 mt-2 max-w-xs leading-relaxed">
|
||||
您还没有创建任何访问密钥。创建密钥后,您可以安全地将 VoiceHub 集成到第三方应用程序中。
|
||||
</p>
|
||||
<button
|
||||
class="mt-8 flex items-center gap-2 px-6 py-3 bg-zinc-900 border border-zinc-800 hover:border-zinc-700 text-zinc-300 text-xs font-bold rounded-2xl transition-all"
|
||||
class="mt-8 flex items-center gap-2 px-6 py-3 bg-white border border-zinc-200 hover:border-zinc-200 text-zinc-600 text-xs font-bold rounded-2xl transition-all"
|
||||
@click="openCreateModal"
|
||||
>
|
||||
<Plus :size="16" /> 创建您的第一个密钥
|
||||
@@ -89,12 +89,12 @@
|
||||
<div
|
||||
v-for="apiKey in apiKeys"
|
||||
:key="apiKey.id"
|
||||
class="bg-zinc-900/30 border border-zinc-800/60 rounded-2xl p-6 group hover:border-zinc-700 transition-all relative overflow-hidden"
|
||||
class="bg-zinc-50/30 border border-zinc-200/60 rounded-2xl p-6 group hover:border-zinc-200 transition-all relative overflow-hidden"
|
||||
>
|
||||
<div class="flex items-start justify-between relative z-10">
|
||||
<div class="space-y-1">
|
||||
<div class="flex items-center gap-3">
|
||||
<h4 class="text-sm font-black text-zinc-100 uppercase tracking-widest">
|
||||
<h4 class="text-sm font-black text-zinc-900 uppercase tracking-widest">
|
||||
{{ apiKey.name }}
|
||||
</h4>
|
||||
<span
|
||||
@@ -104,7 +104,7 @@
|
||||
>
|
||||
<span
|
||||
v-else-if="apiKey.status === 'inactive'"
|
||||
class="inline-flex items-center gap-1.5 px-2 py-0.5 bg-zinc-800 text-zinc-500 text-[10px] font-black rounded uppercase border border-zinc-700/50"
|
||||
class="inline-flex items-center gap-1.5 px-2 py-0.5 bg-zinc-100 text-zinc-500 text-[10px] font-black rounded uppercase border border-zinc-200"
|
||||
>非活跃</span
|
||||
>
|
||||
<span
|
||||
@@ -119,13 +119,13 @@
|
||||
class="flex items-center gap-1 opacity-100 lg:opacity-0 group-hover:opacity-100 transition-all"
|
||||
>
|
||||
<button
|
||||
class="p-2 text-zinc-500 hover:text-blue-400 transition-colors"
|
||||
class="p-2 text-zinc-500 hover:text-blue-700 transition-colors"
|
||||
@click="viewApiKey(apiKey)"
|
||||
>
|
||||
<Eye :size="14" />
|
||||
</button>
|
||||
<button
|
||||
class="p-2 text-zinc-500 hover:text-amber-400 transition-colors"
|
||||
class="p-2 text-zinc-500 hover:text-amber-700 transition-colors"
|
||||
@click="editApiKey(apiKey)"
|
||||
>
|
||||
<Edit2 :size="14" />
|
||||
@@ -139,7 +139,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-8 grid grid-cols-2 gap-4 border-t border-zinc-800/40 pt-6 relative z-10">
|
||||
<div class="mt-8 grid grid-cols-2 gap-4 border-t border-zinc-200 pt-6 relative z-10">
|
||||
<div class="space-y-0.5">
|
||||
<span class="text-[9px] font-black text-zinc-600 uppercase tracking-widest"
|
||||
>创建者</span
|
||||
@@ -162,7 +162,7 @@
|
||||
<span
|
||||
v-for="perm in apiKey.permissions"
|
||||
:key="perm"
|
||||
class="text-[9px] font-mono bg-zinc-950 px-1.5 py-0.5 rounded text-zinc-500 border border-zinc-800/50"
|
||||
class="text-[9px] font-mono bg-white px-1.5 py-0.5 rounded text-zinc-500 border border-zinc-200"
|
||||
>
|
||||
{{ perm }}
|
||||
</span>
|
||||
@@ -197,14 +197,14 @@
|
||||
<!-- 创建/编辑模态框 -->
|
||||
<div
|
||||
v-if="showCreateModal || showEditModal"
|
||||
class="relative w-full max-w-lg bg-zinc-900 border border-zinc-800 rounded-3xl shadow-2xl overflow-hidden animate-in fade-in zoom-in duration-200"
|
||||
class="relative w-full max-w-lg bg-white border border-zinc-200 rounded-3xl shadow-2xl overflow-hidden animate-in fade-in zoom-in duration-200"
|
||||
>
|
||||
<div class="p-6 border-b border-zinc-800 flex items-center justify-between">
|
||||
<h3 class="text-lg font-black text-zinc-100 uppercase tracking-widest">
|
||||
<div class="p-6 border-b border-zinc-200 flex items-center justify-between">
|
||||
<h3 class="text-lg font-black text-zinc-900 uppercase tracking-widest">
|
||||
{{ showCreateModal ? '创建API密钥' : '编辑API密钥' }}
|
||||
</h3>
|
||||
<button
|
||||
class="text-zinc-500 hover:text-zinc-200 transition-colors"
|
||||
class="text-zinc-500 hover:text-zinc-700 transition-colors"
|
||||
@click="closeModals"
|
||||
>
|
||||
<X :size="20" />
|
||||
@@ -220,7 +220,7 @@
|
||||
v-model="form.name"
|
||||
type="text"
|
||||
placeholder="输入API密钥名称"
|
||||
class="w-full bg-zinc-950 border border-zinc-800 rounded-xl px-3 py-2.5 text-xs focus:outline-none focus:border-blue-500/30 text-zinc-200 placeholder:text-zinc-800"
|
||||
class="w-full bg-white border border-zinc-200 rounded-xl px-3 py-2.5 text-xs focus:outline-none focus:border-blue-200 text-zinc-700 placeholder:text-zinc-500"
|
||||
>
|
||||
</div>
|
||||
<div class="space-y-1.5">
|
||||
@@ -230,7 +230,7 @@
|
||||
<textarea
|
||||
v-model="form.description"
|
||||
placeholder="输入API密钥描述 (可选)"
|
||||
class="w-full bg-zinc-950 border border-zinc-800 rounded-xl px-3 py-2.5 text-xs focus:outline-none focus:border-blue-500/30 text-zinc-200 min-h-[80px] resize-none placeholder:text-zinc-800"
|
||||
class="w-full bg-white border border-zinc-200 rounded-xl px-3 py-2.5 text-xs focus:outline-none focus:border-blue-200 text-zinc-700 min-h-[80px] resize-none placeholder:text-zinc-500"
|
||||
/>
|
||||
</div>
|
||||
<div class="space-y-1.5">
|
||||
@@ -259,22 +259,22 @@
|
||||
<label
|
||||
v-for="perm in availablePermissions"
|
||||
:key="perm.value"
|
||||
class="flex items-start gap-3 p-3 bg-zinc-950 border border-zinc-800 rounded-xl cursor-pointer hover:border-zinc-600 transition-all"
|
||||
class="flex items-start gap-3 p-3 bg-white border border-zinc-200 rounded-xl cursor-pointer hover:border-zinc-300 transition-all"
|
||||
:class="{
|
||||
'border-blue-500/30 bg-blue-500/5': form.permissions.includes(perm.value)
|
||||
'border-blue-200 bg-blue-500/5': form.permissions.includes(perm.value)
|
||||
}"
|
||||
>
|
||||
<input
|
||||
v-model="form.permissions"
|
||||
type="checkbox"
|
||||
:value="perm.value"
|
||||
class="mt-1 w-3.5 h-3.5 rounded border-zinc-800 bg-zinc-900 accent-blue-600"
|
||||
class="mt-1 w-3.5 h-3.5 rounded border-zinc-200 bg-white accent-blue-600"
|
||||
>
|
||||
<div>
|
||||
<p
|
||||
class="text-xs font-bold"
|
||||
:class="
|
||||
form.permissions.includes(perm.value) ? 'text-blue-400' : 'text-zinc-300'
|
||||
form.permissions.includes(perm.value) ? 'text-blue-700' : 'text-zinc-600'
|
||||
"
|
||||
>
|
||||
{{ perm.label }}
|
||||
@@ -291,18 +291,18 @@
|
||||
<input
|
||||
v-model="form.isActive"
|
||||
type="checkbox"
|
||||
class="w-3.5 h-3.5 rounded border-zinc-800 bg-zinc-900 accent-blue-600"
|
||||
class="w-3.5 h-3.5 rounded border-zinc-200 bg-white accent-blue-600"
|
||||
>
|
||||
<span
|
||||
class="text-xs font-bold text-zinc-300 group-hover:text-blue-400 transition-colors"
|
||||
class="text-xs font-bold text-zinc-600 group-hover:text-blue-700 transition-colors"
|
||||
>启用此API密钥</span
|
||||
>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="p-6 border-t border-zinc-800 flex gap-2 justify-end">
|
||||
<div class="p-6 border-t border-zinc-200 flex gap-2 justify-end">
|
||||
<button
|
||||
class="px-4 py-2 text-xs font-bold text-zinc-500 hover:text-zinc-300"
|
||||
class="px-4 py-2 text-xs font-bold text-zinc-500 hover:text-zinc-600"
|
||||
@click="closeModals"
|
||||
>
|
||||
取消
|
||||
@@ -320,14 +320,14 @@
|
||||
<!-- 成功模态框 -->
|
||||
<div
|
||||
v-if="showSuccessModal"
|
||||
class="relative w-full max-w-lg bg-zinc-900 border border-zinc-800 rounded-3xl shadow-2xl overflow-hidden animate-in fade-in zoom-in duration-200"
|
||||
class="relative w-full max-w-lg bg-white border border-zinc-200 rounded-3xl shadow-2xl overflow-hidden animate-in fade-in zoom-in duration-200"
|
||||
>
|
||||
<div class="p-6 border-b border-zinc-800 flex items-center justify-between">
|
||||
<h3 class="text-lg font-black text-zinc-100 uppercase tracking-widest">
|
||||
<div class="p-6 border-b border-zinc-200 flex items-center justify-between">
|
||||
<h3 class="text-lg font-black text-zinc-900 uppercase tracking-widest">
|
||||
API密钥创建成功
|
||||
</h3>
|
||||
<button
|
||||
class="text-zinc-500 hover:text-zinc-200 transition-colors"
|
||||
class="text-zinc-500 hover:text-zinc-700 transition-colors"
|
||||
@click="closeModals"
|
||||
>
|
||||
<X :size="20" />
|
||||
@@ -343,7 +343,7 @@
|
||||
>
|
||||
<Check :size="24" :stroke-width="3" />
|
||||
</div>
|
||||
<h4 class="text-lg font-black text-emerald-400">API密钥创建成功!</h4>
|
||||
<h4 class="text-lg font-black text-emerald-700">API密钥创建成功!</h4>
|
||||
<p class="text-xs text-zinc-500 mt-2">请妥善保管以下API密钥,它只会显示这一次。</p>
|
||||
</div>
|
||||
|
||||
@@ -353,7 +353,7 @@
|
||||
>
|
||||
<div class="flex items-center gap-2">
|
||||
<div
|
||||
class="flex-1 bg-zinc-950 border border-zinc-800 rounded-xl px-4 py-3 font-mono text-xs text-blue-400 break-all select-all"
|
||||
class="flex-1 bg-white border border-zinc-200 rounded-xl px-4 py-3 font-mono text-xs text-blue-700 break-all select-all"
|
||||
>
|
||||
{{ newApiKey?.apiKey }}
|
||||
</div>
|
||||
@@ -362,7 +362,7 @@
|
||||
:class="
|
||||
copied
|
||||
? 'bg-emerald-600 text-white'
|
||||
: 'bg-zinc-800 hover:bg-zinc-700 text-zinc-300'
|
||||
: 'bg-zinc-100 hover:bg-zinc-200 text-zinc-600'
|
||||
"
|
||||
@click="copyToClipboard(newApiKey?.apiKey)"
|
||||
>
|
||||
@@ -381,9 +381,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-6 border-t border-zinc-800">
|
||||
<div class="p-6 border-t border-zinc-200">
|
||||
<button
|
||||
class="w-full py-2.5 bg-zinc-950 border border-zinc-800 hover:border-zinc-700 text-zinc-200 text-xs font-black rounded-xl transition-all"
|
||||
class="w-full py-2.5 bg-white border border-zinc-200 hover:border-zinc-200 text-zinc-700 text-xs font-black rounded-xl transition-all"
|
||||
@click="closeModals"
|
||||
>
|
||||
我已保存,关闭窗口
|
||||
@@ -394,12 +394,12 @@
|
||||
<!-- 详情模态框 -->
|
||||
<div
|
||||
v-if="showViewModal && selectedApiKey"
|
||||
class="relative w-full max-w-2xl bg-zinc-900 border border-zinc-800 rounded-3xl shadow-2xl overflow-hidden animate-in fade-in zoom-in duration-200"
|
||||
class="relative w-full max-w-2xl bg-white border border-zinc-200 rounded-3xl shadow-2xl overflow-hidden animate-in fade-in zoom-in duration-200"
|
||||
>
|
||||
<div class="p-6 border-b border-zinc-800 flex items-center justify-between">
|
||||
<h3 class="text-lg font-black text-zinc-100 uppercase tracking-widest">API密钥详情</h3>
|
||||
<div class="p-6 border-b border-zinc-200 flex items-center justify-between">
|
||||
<h3 class="text-lg font-black text-zinc-900 uppercase tracking-widest">API密钥详情</h3>
|
||||
<button
|
||||
class="text-zinc-500 hover:text-zinc-200 transition-colors"
|
||||
class="text-zinc-500 hover:text-zinc-700 transition-colors"
|
||||
@click="closeModals"
|
||||
>
|
||||
<X :size="20" />
|
||||
@@ -409,14 +409,14 @@
|
||||
<div class="p-6 space-y-8 max-h-[80vh] overflow-y-auto custom-scrollbar">
|
||||
<section class="space-y-4">
|
||||
<h5
|
||||
class="text-[10px] font-black text-zinc-600 uppercase tracking-widest border-b border-zinc-800 pb-2"
|
||||
class="text-[10px] font-black text-zinc-600 uppercase tracking-widest border-b border-zinc-200 pb-2"
|
||||
>
|
||||
基本信息
|
||||
</h5>
|
||||
<div class="grid grid-cols-2 gap-6">
|
||||
<div class="space-y-1">
|
||||
<span class="text-[10px] text-zinc-600 font-bold">名称:</span>
|
||||
<p class="text-xs font-bold text-zinc-200">{{ selectedApiKey.name }}</p>
|
||||
<p class="text-xs font-bold text-zinc-700">{{ selectedApiKey.name }}</p>
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<span class="text-[10px] text-zinc-600 font-bold">状态:</span>
|
||||
@@ -428,7 +428,7 @@
|
||||
>
|
||||
<span
|
||||
v-else-if="selectedApiKey.status === 'inactive'"
|
||||
class="inline-flex items-center gap-1.5 px-2 py-0.5 bg-zinc-800 text-zinc-500 text-[10px] font-black rounded uppercase border border-zinc-700/50"
|
||||
class="inline-flex items-center gap-1.5 px-2 py-0.5 bg-zinc-100 text-zinc-500 text-[10px] font-black rounded uppercase border border-zinc-200"
|
||||
>非活跃</span
|
||||
>
|
||||
<span
|
||||
@@ -446,13 +446,13 @@
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<span class="text-[10px] text-zinc-600 font-bold">创建者:</span>
|
||||
<p class="text-xs font-bold text-zinc-200">
|
||||
<p class="text-xs font-bold text-zinc-700">
|
||||
{{ selectedApiKey.creatorName || '未知' }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<span class="text-[10px] text-zinc-600 font-bold">创建时间:</span>
|
||||
<p class="text-xs font-bold text-zinc-200">
|
||||
<p class="text-xs font-bold text-zinc-700">
|
||||
{{ formatDate(selectedApiKey.createdAt) }}
|
||||
</p>
|
||||
</div>
|
||||
@@ -460,7 +460,7 @@
|
||||
<span class="text-[10px] text-zinc-600 font-bold">过期时间:</span>
|
||||
<p
|
||||
class="text-xs font-bold"
|
||||
:class="selectedApiKey.isExpired ? 'text-red-400' : 'text-zinc-200'"
|
||||
:class="selectedApiKey.isExpired ? 'text-red-400' : 'text-zinc-700'"
|
||||
>
|
||||
{{ formatDate(selectedApiKey.expiresAt) }}
|
||||
</p>
|
||||
@@ -470,19 +470,19 @@
|
||||
|
||||
<section class="space-y-4">
|
||||
<h5
|
||||
class="text-[10px] font-black text-zinc-600 uppercase tracking-widest border-b border-zinc-800 pb-2"
|
||||
class="text-[10px] font-black text-zinc-600 uppercase tracking-widest border-b border-zinc-200 pb-2"
|
||||
>
|
||||
使用统计
|
||||
</h5>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div
|
||||
class="p-4 bg-zinc-950 border border-zinc-800 rounded-2xl flex items-center justify-between group hover:border-blue-500/30 transition-all"
|
||||
class="p-4 bg-white border border-zinc-200 rounded-2xl flex items-center justify-between group hover:border-blue-200 transition-all"
|
||||
>
|
||||
<div class="space-y-0.5">
|
||||
<span class="text-[9px] font-black text-zinc-600 uppercase tracking-widest"
|
||||
>总调用次数</span
|
||||
>
|
||||
<p class="text-xl font-black text-zinc-100">
|
||||
<p class="text-xl font-black text-zinc-900">
|
||||
{{ selectedApiKey.usageCount || 0 }}
|
||||
</p>
|
||||
</div>
|
||||
@@ -493,13 +493,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="p-4 bg-zinc-950 border border-zinc-800 rounded-2xl flex items-center justify-between group hover:border-amber-500/30 transition-all"
|
||||
class="p-4 bg-white border border-zinc-200 rounded-2xl flex items-center justify-between group hover:border-amber-200 transition-all"
|
||||
>
|
||||
<div class="space-y-0.5">
|
||||
<span class="text-[9px] font-black text-zinc-600 uppercase tracking-widest"
|
||||
>最后使用时间</span
|
||||
>
|
||||
<p class="text-xs font-bold text-zinc-100">
|
||||
<p class="text-xs font-bold text-zinc-900">
|
||||
{{
|
||||
selectedApiKey.lastUsedAt
|
||||
? formatDate(selectedApiKey.lastUsedAt)
|
||||
@@ -517,7 +517,7 @@
|
||||
</section>
|
||||
|
||||
<section class="space-y-4">
|
||||
<div class="flex items-center justify-between border-b border-zinc-800 pb-2">
|
||||
<div class="flex items-center justify-between border-b border-zinc-200 pb-2">
|
||||
<h5 class="text-[10px] font-black text-zinc-600 uppercase tracking-widest">
|
||||
最近调用日志
|
||||
</h5>
|
||||
@@ -538,7 +538,7 @@
|
||||
</div>
|
||||
<div
|
||||
v-else-if="apiLogs.length === 0"
|
||||
class="flex flex-col items-center justify-center py-10 bg-zinc-950/50 border border-zinc-800/50 rounded-2xl"
|
||||
class="flex flex-col items-center justify-center py-10 bg-white/70 border border-zinc-200 rounded-2xl"
|
||||
>
|
||||
<History :size="24" class="text-zinc-800 mb-2" />
|
||||
<span class="text-[10px] font-bold text-zinc-700 uppercase tracking-widest"
|
||||
@@ -549,7 +549,7 @@
|
||||
v-for="log in apiLogs"
|
||||
v-else
|
||||
:key="log.id"
|
||||
class="p-3 bg-zinc-950 border border-zinc-800/40 rounded-xl flex items-center justify-between group hover:border-zinc-700 transition-all"
|
||||
class="p-3 bg-white border border-zinc-200 rounded-xl flex items-center justify-between group hover:border-zinc-200 transition-all"
|
||||
>
|
||||
<div class="flex items-center gap-4">
|
||||
<div
|
||||
@@ -1002,11 +1002,11 @@ const copyToClipboard = async (text) => {
|
||||
const getMethodClass = (method) => {
|
||||
const map = {
|
||||
GET: 'bg-emerald-500/10 text-emerald-500 border-emerald-500/20',
|
||||
POST: 'bg-blue-500/10 text-blue-500 border-blue-500/20',
|
||||
POST: 'bg-blue-500/10 text-blue-500 border-blue-200',
|
||||
PUT: 'bg-amber-500/10 text-amber-500 border-amber-500/20',
|
||||
DELETE: 'bg-red-500/10 text-red-500 border-red-500/20'
|
||||
}
|
||||
return map[method] || 'bg-zinc-500/10 text-zinc-500 border-zinc-500/20'
|
||||
return map[method] || 'bg-zinc-100 text-zinc-500 border-zinc-200'
|
||||
}
|
||||
|
||||
const getStatusColorClass = (code) => {
|
||||
@@ -1025,7 +1025,7 @@ onMounted(() => {
|
||||
.loading-spinner {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border: 2px solid rgba(255, 255, 255, 0.1);
|
||||
border: 2px solid rgba(0, 0, 0, 0.08);
|
||||
border-top-color: var(--border-secondary, #3b82f6);
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
|
||||
Reference in New Issue
Block a user