feat: 日志列表
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user