Spaces:
Running
Running
github-actions[bot] commited on
Commit ·
41777cd
1
Parent(s): 7dba9e6
Sync from GitHub Viciy2023/Qwen2API-A@4a82362db7391afeb6d01beb3bba2ab46e2f6cb5
Browse files- public/src/views/dashboard.vue +17 -15
public/src/views/dashboard.vue
CHANGED
|
@@ -79,8 +79,8 @@
|
|
| 79 |
</div>
|
| 80 |
|
| 81 |
<!-- 分页控制区 -->
|
| 82 |
-
<div class="mb-
|
| 83 |
-
<div class="flex items-center gap-2
|
| 84 |
<span>共 {{ totalItems }} 项</span>
|
| 85 |
<button
|
| 86 |
@click="changePage(currentPage - 1)"
|
|
@@ -104,11 +104,7 @@
|
|
| 104 |
下一页
|
| 105 |
</button>
|
| 106 |
</div>
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
<!-- 多选操作区 -->
|
| 110 |
-
<div class="mb-4 flex flex-wrap justify-between gap-3 px-1">
|
| 111 |
-
<div class="flex flex-wrap items-center gap-3 rounded-2xl border border-slate-200 bg-white px-3 py-2">
|
| 112 |
<label class="inline-flex items-center cursor-pointer group">
|
| 113 |
<div class="relative">
|
| 114 |
<input type="checkbox"
|
|
@@ -136,16 +132,16 @@
|
|
| 136 |
</svg>
|
| 137 |
<span>删除选中 ({{ selectedTokens.length }})</span>
|
| 138 |
</button>
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
>
|
| 144 |
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" viewBox="0 0 20 20" fill="currentColor">
|
| 145 |
<path fill-rule="evenodd" d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd" />
|
| 146 |
</svg>
|
| 147 |
<span>删除全部账号</span>
|
| 148 |
-
|
|
|
|
| 149 |
</div>
|
| 150 |
|
| 151 |
<!-- Token列表 -->
|
|
@@ -417,7 +413,10 @@
|
|
| 417 |
<p class="mt-1 text-xs text-slate-500">按小时统计请求次数</p>
|
| 418 |
</div>
|
| 419 |
<div class="grid grid-cols-12 md:grid-cols-24 gap-2 items-end h-52 rounded-2xl border border-slate-200 bg-slate-50/70 p-4">
|
| 420 |
-
<div v-for="item in usageTrendData" :key="`requests-${item.hour}`" class="flex flex-col items-center justify-end gap-2
|
|
|
|
|
|
|
|
|
|
| 421 |
<div class="w-full rounded-t-md bg-slate-900 min-h-[8px] shadow-[0_8px_20px_rgba(15,23,42,0.08)]" :style="{ height: item.requestHeight }"></div>
|
| 422 |
<div class="text-[10px] text-slate-400 tracking-wide">{{ String(item.hour).padStart(2, '0') }}</div>
|
| 423 |
</div>
|
|
@@ -430,7 +429,10 @@
|
|
| 430 |
<p class="mt-1 text-xs text-slate-500">按小时统计 Token 消耗</p>
|
| 431 |
</div>
|
| 432 |
<div class="grid grid-cols-12 md:grid-cols-24 gap-2 items-end h-52 rounded-2xl border border-slate-200 bg-slate-50/70 p-4">
|
| 433 |
-
<div v-for="item in usageTrendData" :key="`tokens-${item.hour}`" class="flex flex-col items-center justify-end gap-2
|
|
|
|
|
|
|
|
|
|
| 434 |
<div class="w-full rounded-t-md bg-slate-500 min-h-[8px] shadow-[0_8px_20px_rgba(15,23,42,0.06)]" :style="{ height: item.tokenHeight }"></div>
|
| 435 |
<div class="text-[10px] text-slate-400 tracking-wide">{{ String(item.hour).padStart(2, '0') }}</div>
|
| 436 |
</div>
|
|
|
|
| 79 |
</div>
|
| 80 |
|
| 81 |
<!-- 分页控制区 -->
|
| 82 |
+
<div class="mb-4 flex flex-wrap items-center justify-between gap-3 rounded-2xl border border-slate-200 bg-white px-3 py-2 text-sm text-slate-600">
|
| 83 |
+
<div class="flex items-center gap-2">
|
| 84 |
<span>共 {{ totalItems }} 项</span>
|
| 85 |
<button
|
| 86 |
@click="changePage(currentPage - 1)"
|
|
|
|
| 104 |
下一页
|
| 105 |
</button>
|
| 106 |
</div>
|
| 107 |
+
<div class="flex flex-wrap items-center gap-3">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
<label class="inline-flex items-center cursor-pointer group">
|
| 109 |
<div class="relative">
|
| 110 |
<input type="checkbox"
|
|
|
|
| 132 |
</svg>
|
| 133 |
<span>删除选中 ({{ selectedTokens.length }})</span>
|
| 134 |
</button>
|
| 135 |
+
<button
|
| 136 |
+
@click="showDeleteAllConfirm = true"
|
| 137 |
+
class="px-4 py-2 rounded-lg border border-slate-200 bg-white text-slate-700 hover:bg-slate-50 transition-all duration-200 flex items-center space-x-1 text-sm"
|
| 138 |
+
>
|
|
|
|
| 139 |
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" viewBox="0 0 20 20" fill="currentColor">
|
| 140 |
<path fill-rule="evenodd" d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd" />
|
| 141 |
</svg>
|
| 142 |
<span>删除全部账号</span>
|
| 143 |
+
</button>
|
| 144 |
+
</div>
|
| 145 |
</div>
|
| 146 |
|
| 147 |
<!-- Token列表 -->
|
|
|
|
| 413 |
<p class="mt-1 text-xs text-slate-500">按小时统计请求次数</p>
|
| 414 |
</div>
|
| 415 |
<div class="grid grid-cols-12 md:grid-cols-24 gap-2 items-end h-52 rounded-2xl border border-slate-200 bg-slate-50/70 p-4">
|
| 416 |
+
<div v-for="item in usageTrendData" :key="`requests-${item.hour}`" class="group relative flex h-full flex-col items-center justify-end gap-2">
|
| 417 |
+
<div class="pointer-events-none absolute -top-9 left-1/2 hidden -translate-x-1/2 whitespace-nowrap rounded-lg border border-slate-200 bg-white px-2 py-1 text-[10px] font-medium text-slate-700 shadow-lg group-hover:block">
|
| 418 |
+
{{ String(item.hour).padStart(2, '0') }}:00 · {{ item.requests }} 次
|
| 419 |
+
</div>
|
| 420 |
<div class="w-full rounded-t-md bg-slate-900 min-h-[8px] shadow-[0_8px_20px_rgba(15,23,42,0.08)]" :style="{ height: item.requestHeight }"></div>
|
| 421 |
<div class="text-[10px] text-slate-400 tracking-wide">{{ String(item.hour).padStart(2, '0') }}</div>
|
| 422 |
</div>
|
|
|
|
| 429 |
<p class="mt-1 text-xs text-slate-500">按小时统计 Token 消耗</p>
|
| 430 |
</div>
|
| 431 |
<div class="grid grid-cols-12 md:grid-cols-24 gap-2 items-end h-52 rounded-2xl border border-slate-200 bg-slate-50/70 p-4">
|
| 432 |
+
<div v-for="item in usageTrendData" :key="`tokens-${item.hour}`" class="group relative flex h-full flex-col items-center justify-end gap-2">
|
| 433 |
+
<div class="pointer-events-none absolute -top-9 left-1/2 hidden -translate-x-1/2 whitespace-nowrap rounded-lg border border-slate-200 bg-white px-2 py-1 text-[10px] font-medium text-slate-700 shadow-lg group-hover:block">
|
| 434 |
+
{{ String(item.hour).padStart(2, '0') }}:00 · {{ formatNumber(item.totalTokens) }} tokens
|
| 435 |
+
</div>
|
| 436 |
<div class="w-full rounded-t-md bg-slate-500 min-h-[8px] shadow-[0_8px_20px_rgba(15,23,42,0.06)]" :style="{ height: item.tokenHeight }"></div>
|
| 437 |
<div class="text-[10px] text-slate-400 tracking-wide">{{ String(item.hour).padStart(2, '0') }}</div>
|
| 438 |
</div>
|