feat(ui): update ui style

This commit is contained in:
RhenCloud 2026-08-16 21:25:57 +08:00
parent ca6dfd3f64
commit 47d7c9105b
No known key found for this signature in database
GPG key ID: A574A617378C4E0B
35 changed files with 1577 additions and 591 deletions

View file

@ -6,12 +6,13 @@ export function useMetrics() {
const loading = ref(false);
const error = ref("");
async function load(): Promise<void> {
async function load(groupId?: string): Promise<void> {
loading.value = true;
error.value = "";
needLogin.value = false;
try {
const data = await apiFetch<{ metrics?: DeliveryMetrics }>("/admin/api/metrics");
const qs = groupId ? `?groupId=${encodeURIComponent(groupId)}` : "";
const data = await apiFetch<{ metrics?: DeliveryMetrics }>(`/admin/api/metrics${qs}`);
metrics.value = data.metrics ?? null;
} catch (err) {
if (!needLogin.value) error.value = err instanceof Error ? err.message : String(err);