From 01e513cbfd711e00d7b913f8a51ac3bdfd61c692 Mon Sep 17 00:00:00 2001 From: t8y2 Date: Tue, 13 Oct 2026 11:51:27 +0800 Subject: [PATCH] fix(consul): use named api imports to satisfy vue-tsc template checks --- .../src/components/consul/ConsulOperator.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/desktop/src/components/consul/ConsulOperator.vue b/apps/desktop/src/components/consul/ConsulOperator.vue index 8e3e5c06c6..7697e97868 100644 --- a/apps/desktop/src/components/consul/ConsulOperator.vue +++ b/apps/desktop/src/components/consul/ConsulOperator.vue @@ -4,7 +4,7 @@ import { Download, RefreshCcw } from "@lucide/vue"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; -import * as api from "@/lib/backend/api"; +import { consulOperatorRead, consulSnapshotGenerate, consulSnapshotRestore, consulAutopilotUpdate, consulRaftTransfer, consulRaftRemove, consulKeyringWrite, consulLicenseWrite } from "@/lib/backend/api"; import type { ConsulCapabilities, ConsulOperatorDocument, ConsulOperatorReadKind } from "@/types/consul"; import { useConnectionStore } from "@/stores/connectionStore"; import { connectionIsEffectivelyReadOnly } from "@/lib/database/readOnlyWriteAccess"; @@ -38,7 +38,7 @@ async function refresh() { await Promise.all( kinds.map(async (kind) => { try { - documents.value[kind] = await api.consulOperatorRead(props.connectionId, kind); + documents.value[kind] = await consulOperatorRead(props.connectionId, kind); delete failures.value[kind]; } catch (error) { failures.value[kind] = error instanceof Error ? error.message : String(error); @@ -49,7 +49,7 @@ async function refresh() { } async function downloadSnapshot() { - const snapshotResult = await api.consulSnapshotGenerate(props.connectionId); + const snapshotResult = await consulSnapshotGenerate(props.connectionId); const binary = atob(snapshotResult.dataBase64); const bytes = Uint8Array.from(binary, (character) => character.charCodeAt(0)); const link = document.createElement("a"); @@ -116,7 +116,7 @@ defineExpose({ refresh }); @@ -124,7 +124,7 @@ defineExpose({ refresh });

{{ t("consul.ui.autopilotUpdate") }}

@@ -133,8 +133,8 @@ defineExpose({ refresh });
- +
@@ -146,7 +146,7 @@ defineExpose({ refresh }); @@ -156,7 +156,7 @@ defineExpose({ refresh });