feat: 日志列表

This commit is contained in:
tbphp
2025-07-12 11:22:13 +08:00
parent 25d65b0a94
commit a340deaf1b
5 changed files with 52 additions and 118 deletions

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { keysApi } from "@/api/keys";
import type { APIKey, Group, KeyStatus } from "@/types/models";
import { getGroupDisplayName } from "@/utils/display";
import { getGroupDisplayName, maskKey } from "@/utils/display";
import {
AddCircleOutline,
AlertCircleOutline,
@@ -142,13 +142,6 @@ async function loadKeys() {
}
}
function maskKey(key: string): string {
if (key.length <= 8) {
return key;
}
return `${key.substring(0, 4)}...${key.substring(key.length - 4)}`;
}
function copyKey(key: KeyRow) {
navigator.clipboard
.writeText(key.key_value)