fix(ui): settings pages show a skeleton or the error until their draft loads (#1743)
New settings/KindGate renders the store's per-kind loading/error state where the form would be: a skeleton while loading, ReadError with Retry on a failed read. Wired into Tools, SystemModels, SystemRepos, SchedulingPolicy, ContainerRuntime, OrgAlerts, Instructions, Plugins, SystemTasks, UpdateSettings, IdentityGrants, OrgModels, Channels and Authentication pages, which no longer render blank until the draft exists.
This commit is contained in:
16 files changed
+60
-3
No files matched your search
@@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Alert, AlertDescription } from "@/components/ui/alert";
|
import { ReadError } from "@/components/ui/read-error";
|
||||||
|
import { Skeleton } from "@/components/ui/skeleton";
|
||||||
import { Check } from "@lucide/vue";
|
import { Check } from "@lucide/vue";
|
||||||
import { computed, onMounted, ref } from "vue";
|
import { computed, onMounted, ref } from "vue";
|
||||||
import PageHeader from "@/base/PageHeader.vue";
|
import PageHeader from "@/base/PageHeader.vue";
|
||||||
@@ -11,13 +12,15 @@ import { SettingRow } from "@/components/ui/setting-row";
|
|||||||
import { Section } from "@/components/ui/section";
|
import { Section } from "@/components/ui/section";
|
||||||
interface Settings {public_url:string;oidc_issuer:string;oidc_audience:string;oidc_client_id:string}
|
interface Settings {public_url:string;oidc_issuer:string;oidc_audience:string;oidc_client_id:string}
|
||||||
const value=ref<Settings>({public_url:"",oidc_issuer:"",oidc_audience:"",oidc_client_id:""});const loaded=ref(false);const error=ref("");const sessionExpired=ref(false);const busy=ref(false);const saved=ref(false);
|
const value=ref<Settings>({public_url:"",oidc_issuer:"",oidc_audience:"",oidc_client_id:""});const loaded=ref(false);const error=ref("");const sessionExpired=ref(false);const busy=ref(false);const saved=ref(false);
|
||||||
onMounted(async()=>{try{value.value=await api.authentication<Settings>();loaded.value=true}catch(cause){error.value=String((cause as Error).message||cause)}});
|
async function load(){try{value.value=await api.authentication<Settings>();loaded.value=true;error.value=""}catch(cause){error.value=String((cause as Error).message||cause)}finally{loaded.value=true}}
|
||||||
|
onMounted(load);
|
||||||
const redirectURI=computed(()=>`${value.value.public_url.replace(/\/$/,"")}/oauth2/callback`);
|
const redirectURI=computed(()=>`${value.value.public_url.replace(/\/$/,"")}/oauth2/callback`);
|
||||||
async function save(){busy.value=true;error.value="";saved.value=false;try{await api.saveAuthentication(value.value);saved.value=true}catch(cause){error.value=String((cause as Error).message||cause);sessionExpired.value=classifyActionError(cause).kind==="session-expired"}finally{busy.value=false}}
|
async function save(){busy.value=true;error.value="";saved.value=false;try{await api.saveAuthentication(value.value);saved.value=true}catch(cause){error.value=String((cause as Error).message||cause);sessionExpired.value=classifyActionError(cause).kind==="session-expired"}finally{busy.value=false}}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div><PageHeader title="Authentication"/>
|
<div><PageHeader title="Authentication"/>
|
||||||
<Alert v-if="error" variant="destructive" class="mb-4"><AlertDescription>{{error}}<a v-if="sessionExpired" class="underline" href="/?reauth=1"> Sign in again</a></AlertDescription></Alert>
|
<ReadError v-if="error" :message="error" retry-label="Retry" class="mb-4" @retry="load"><a v-if="sessionExpired" class="underline" href="/?reauth=1"> Sign in again</a></ReadError>
|
||||||
|
<div v-else-if="!loaded" role="status" aria-label="Loading settings" class="space-y-2 py-2"><Skeleton class="h-8 w-full" /><Skeleton class="h-8 w-full" /><Skeleton class="h-24 w-full" /></div>
|
||||||
<form v-if="loaded" @submit.prevent="save">
|
<form v-if="loaded" @submit.prevent="save">
|
||||||
<Section title="Instance URL">
|
<Section title="Instance URL">
|
||||||
<SettingRow label="Public address" for="instance-url" hint="Passkeys require HTTPS and a domain name, or localhost. Once passkeys are enrolled, their domain is fixed."><Input id="instance-url" v-model="value.public_url" type="url" required /></SettingRow>
|
<SettingRow label="Public address" for="instance-url" hint="Passkeys require HTTPS and a domain name, or localhost. Once passkeys are enrolled, their domain is fixed."><Input id="instance-url" v-model="value.public_url" type="url" required /></SettingRow>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Alert, AlertDescription } from "@/components/ui/alert";
|
import { Alert, AlertDescription } from "@/components/ui/alert";
|
||||||
import ApplyStatusRows from "@/settings/ApplyStatusRows.vue";
|
import ApplyStatusRows from "@/settings/ApplyStatusRows.vue";
|
||||||
|
import KindGate from "@/settings/KindGate.vue";
|
||||||
import HistoryLink from "@/settings/HistoryLink.vue";
|
import HistoryLink from "@/settings/HistoryLink.vue";
|
||||||
import { computed, onMounted, reactive, ref } from "vue";
|
import { computed, onMounted, reactive, ref } from "vue";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
@@ -230,6 +231,7 @@ function setModels(list: string[]) {
|
|||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section v-if="instance" title="Chat session defaults">
|
<Section v-if="instance" title="Chat session defaults">
|
||||||
|
<KindGate v-if="!form" :kind="KIND" />
|
||||||
<FieldGroup v-if="form" class="@container/field-group">
|
<FieldGroup v-if="form" class="@container/field-group">
|
||||||
<form.Field v-slot="{ field }" name="workspace">
|
<form.Field v-slot="{ field }" name="workspace">
|
||||||
<Field orientation="responsive">
|
<Field orientation="responsive">
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ const emit = defineEmits<{ retry: [] }>();
|
|||||||
<Alert variant="destructive">
|
<Alert variant="destructive">
|
||||||
<AlertDescription class="flex flex-wrap items-center gap-2">
|
<AlertDescription class="flex flex-wrap items-center gap-2">
|
||||||
<span class="min-w-0 flex-1">{{ message }}</span>
|
<span class="min-w-0 flex-1">{{ message }}</span>
|
||||||
|
<slot />
|
||||||
<Button v-if="retryLabel" variant="link" size="xs" class="shrink-0 px-0" @click="emit('retry')">{{ retryLabel }}</Button>
|
<Button v-if="retryLabel" variant="link" size="xs" class="shrink-0 px-0" @click="emit('retry')">{{ retryLabel }}</Button>
|
||||||
</AlertDescription>
|
</AlertDescription>
|
||||||
</Alert>
|
</Alert>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { Input } from "@/components/ui/input";
|
|||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
||||||
import { useSettingsStore } from "@/stores/settings";
|
import { useSettingsStore } from "@/stores/settings";
|
||||||
import DraftHint from "@/settings/DraftHint.vue";
|
import DraftHint from "@/settings/DraftHint.vue";
|
||||||
|
import KindGate from "@/settings/KindGate.vue";
|
||||||
/**
|
/**
|
||||||
* The org's own models: aliases over the instance's, and providers the
|
* The org's own models: aliases over the instance's, and providers the
|
||||||
* instance admin lets it add. The server refuses a model the org may not use,
|
* instance admin lets it add. The server refuses a model the org may not use,
|
||||||
@@ -75,6 +76,8 @@ const bound = computed(() => new Set(((store.draftValue("credential-bindings") a
|
|||||||
<PageHeader title="Models" />
|
<PageHeader title="Models" />
|
||||||
<Alert v-for="e in errors" :key="String(e)" variant="destructive" class="mb-4"><AlertDescription>{{ e }}</AlertDescription></Alert>
|
<Alert v-for="e in errors" :key="String(e)" variant="destructive" class="mb-4"><AlertDescription>{{ e }}</AlertDescription></Alert>
|
||||||
|
|
||||||
|
<KindGate v-if="!aliases && !providers" kind="provider-settings" />
|
||||||
|
|
||||||
<template v-if="aliases">
|
<template v-if="aliases">
|
||||||
<Section title="Aliases">
|
<Section title="Aliases">
|
||||||
<div v-for="[alias, model] in aliasEntries" :key="alias" class="flex flex-wrap items-center gap-3 border-b border-border py-2.5 last-of-type:border-b-0">
|
<div v-for="[alias, model] in aliasEntries" :key="alias" class="flex flex-wrap items-center gap-3 border-b border-border py-2.5 last-of-type:border-b-0">
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
|
|||||||
import { resourcesForPage, useSettingsStore } from "@/stores/settings";
|
import { resourcesForPage, useSettingsStore } from "@/stores/settings";
|
||||||
import DraftHint from "./DraftHint.vue";
|
import DraftHint from "./DraftHint.vue";
|
||||||
import HistoryLink from "./HistoryLink.vue";
|
import HistoryLink from "./HistoryLink.vue";
|
||||||
|
import KindGate from "./KindGate.vue";
|
||||||
import { fieldInvalid } from "./settings-form";
|
import { fieldInvalid } from "./settings-form";
|
||||||
|
|
||||||
const KIND = "container-runtime-policies";
|
const KIND = "container-runtime-policies";
|
||||||
@@ -79,6 +80,7 @@ function formatHours(seconds: number): string {
|
|||||||
|
|
||||||
<Alert v-if="catalogError || error" variant="destructive" class="mb-4"><AlertDescription>{{ catalogError || error }}</AlertDescription></Alert>
|
<Alert v-if="catalogError || error" variant="destructive" class="mb-4"><AlertDescription>{{ catalogError || error }}</AlertDescription></Alert>
|
||||||
|
|
||||||
|
<KindGate v-if="!form" :kind="KIND" />
|
||||||
<FieldGroup v-if="form" class="@container/field-group">
|
<FieldGroup v-if="form" class="@container/field-group">
|
||||||
<form.Field v-slot="{ field }" name="image">
|
<form.Field v-slot="{ field }" name="image">
|
||||||
<Field orientation="responsive" :data-invalid="fieldInvalid(field)">
|
<Field orientation="responsive" :data-invalid="fieldInvalid(field)">
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
|
|||||||
import { useOrgStore } from "@/stores/org";
|
import { useOrgStore } from "@/stores/org";
|
||||||
import { useSettingsStore } from "@/stores/settings";
|
import { useSettingsStore } from "@/stores/settings";
|
||||||
import DraftHint from "./DraftHint.vue";
|
import DraftHint from "./DraftHint.vue";
|
||||||
|
import KindGate from "./KindGate.vue";
|
||||||
|
|
||||||
/** The identity-grants document: the default credential services,
|
/** The identity-grants document: the default credential services,
|
||||||
* and per identity a list that replaces the default. */
|
* and per identity a list that replaces the default. */
|
||||||
@@ -53,6 +54,7 @@ function removeIdentity(id: string) {
|
|||||||
<template>
|
<template>
|
||||||
<Section title="Credential grants">
|
<Section title="Credential grants">
|
||||||
<Alert v-if="error" variant="destructive" class="mb-3"><AlertDescription>{{ error }}</AlertDescription></Alert>
|
<Alert v-if="error" variant="destructive" class="mb-3"><AlertDescription>{{ error }}</AlertDescription></Alert>
|
||||||
|
<KindGate v-if="!grants" :kind="KIND" />
|
||||||
<ItemGroup v-if="grants">
|
<ItemGroup v-if="grants">
|
||||||
<Item as="div" role="listitem" variant="outline" size="sm" class="flex-wrap">
|
<Item as="div" role="listitem" variant="outline" size="sm" class="flex-wrap">
|
||||||
<span class="w-40 shrink-0 text-label max-sm:w-24 max-sm:truncate">Default</span>
|
<span class="w-40 shrink-0 text-label max-sm:w-24 max-sm:truncate">Default</span>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { resourcesForPage, useSettingsStore } from "@/stores/settings";
|
|||||||
import { Section } from "@/components/ui/section";
|
import { Section } from "@/components/ui/section";
|
||||||
import DraftHint from "./DraftHint.vue";
|
import DraftHint from "./DraftHint.vue";
|
||||||
import HistoryLink from "./HistoryLink.vue";
|
import HistoryLink from "./HistoryLink.vue";
|
||||||
|
import KindGate from "./KindGate.vue";
|
||||||
import { fieldInvalid } from "./settings-form";
|
import { fieldInvalid } from "./settings-form";
|
||||||
|
|
||||||
const KIND = "soul";
|
const KIND = "soul";
|
||||||
@@ -36,6 +37,7 @@ const chars = computed(() => soul.value?.text.length ?? 0);
|
|||||||
{{ catalogError || error }}
|
{{ catalogError || error }}
|
||||||
</AlertDescription></Alert>
|
</AlertDescription></Alert>
|
||||||
|
|
||||||
|
<KindGate v-if="!form" :kind="KIND" />
|
||||||
<Section v-if="form && soul">
|
<Section v-if="form && soul">
|
||||||
<form.Field v-slot="{ field }" name="text">
|
<form.Field v-slot="{ field }" name="text">
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { computed } from "vue";
|
||||||
|
|
||||||
|
import { ReadError } from "@/components/ui/read-error";
|
||||||
|
import { Skeleton } from "@/components/ui/skeleton";
|
||||||
|
import { useSettingsStore } from "@/stores/settings";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* What a settings page shows until its kind's draft has loaded: the read
|
||||||
|
* error with Retry, else a skeleton. The store already tracks loading and
|
||||||
|
* error per kind; this renders them where the form would be.
|
||||||
|
*/
|
||||||
|
const props = defineProps<{ kind: string }>();
|
||||||
|
const store = useSettingsStore();
|
||||||
|
const state = computed(() => store.stateFor(props.kind));
|
||||||
|
const error = computed(() => store.pageErrorFor(props.kind));
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<ReadError v-if="!state.resource && error" :message="error" retry-label="Retry" @retry="store.load()" />
|
||||||
|
<div v-else role="status" aria-label="Loading settings" class="space-y-2 py-2">
|
||||||
|
<Skeleton class="h-8 w-full" />
|
||||||
|
<Skeleton class="h-8 w-full" />
|
||||||
|
<Skeleton class="h-24 w-full" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -13,6 +13,7 @@ import { useSessionStore } from "@/stores/session";
|
|||||||
import { resourcesForPage, useSettingsStore } from "@/stores/settings";
|
import { resourcesForPage, useSettingsStore } from "@/stores/settings";
|
||||||
import DraftHint from "./DraftHint.vue";
|
import DraftHint from "./DraftHint.vue";
|
||||||
import HistoryLink from "./HistoryLink.vue";
|
import HistoryLink from "./HistoryLink.vue";
|
||||||
|
import KindGate from "./KindGate.vue";
|
||||||
import SecretRefField from "./SecretRefField.vue";
|
import SecretRefField from "./SecretRefField.vue";
|
||||||
|
|
||||||
const POLICY = "task-policy";
|
const POLICY = "task-policy";
|
||||||
@@ -40,6 +41,7 @@ const policy = computed(() => store.draftValue(POLICY));
|
|||||||
{{ catalogError || store.pageErrorFor(POLICY) }}
|
{{ catalogError || store.pageErrorFor(POLICY) }}
|
||||||
</AlertDescription></Alert>
|
</AlertDescription></Alert>
|
||||||
|
|
||||||
|
<KindGate v-if="!form" :kind="POLICY" />
|
||||||
<FieldGroup v-if="form && policy" class="@container/field-group">
|
<FieldGroup v-if="form && policy" class="@container/field-group">
|
||||||
<form.Field v-slot="{ field }" name="notify_webhook">
|
<form.Field v-slot="{ field }" name="notify_webhook">
|
||||||
<Field orientation="responsive">
|
<Field orientation="responsive">
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { resourcesForPage, useSettingsStore } from "@/stores/settings";
|
|||||||
import ApplyStatusRows from "./ApplyStatusRows.vue";
|
import ApplyStatusRows from "./ApplyStatusRows.vue";
|
||||||
import DraftHint from "./DraftHint.vue";
|
import DraftHint from "./DraftHint.vue";
|
||||||
import HistoryLink from "./HistoryLink.vue";
|
import HistoryLink from "./HistoryLink.vue";
|
||||||
|
import KindGate from "./KindGate.vue";
|
||||||
import { fieldInvalid } from "./settings-form";
|
import { fieldInvalid } from "./settings-form";
|
||||||
|
|
||||||
const KIND = "plugin-settings";
|
const KIND = "plugin-settings";
|
||||||
@@ -31,6 +32,7 @@ const error = computed(() => store.pageErrorFor(KIND));
|
|||||||
|
|
||||||
<Alert v-if="catalogError || error" variant="destructive" class="mb-4"><AlertDescription>{{ catalogError || error }}</AlertDescription></Alert>
|
<Alert v-if="catalogError || error" variant="destructive" class="mb-4"><AlertDescription>{{ catalogError || error }}</AlertDescription></Alert>
|
||||||
|
|
||||||
|
<KindGate v-if="!form" :kind="KIND" />
|
||||||
<template v-if="form">
|
<template v-if="form">
|
||||||
<FieldGroup class="@container/field-group">
|
<FieldGroup class="@container/field-group">
|
||||||
<form.Field v-slot="{ field }" name="skills_dir">
|
<form.Field v-slot="{ field }" name="skills_dir">
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ const triggers = [
|
|||||||
{{ catalogError || error }}
|
{{ catalogError || error }}
|
||||||
</AlertDescription></Alert>
|
</AlertDescription></Alert>
|
||||||
|
|
||||||
|
<KindGate v-if="!form" :kind="KIND" />
|
||||||
<template v-if="form">
|
<template v-if="form">
|
||||||
<Section title="Dispatch">
|
<Section title="Dispatch">
|
||||||
<FieldGroup class="@container/field-group">
|
<FieldGroup class="@container/field-group">
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import { Label } from "@/components/ui/label";
|
import { Label } from "@/components/ui/label";
|
||||||
import { Alert, AlertDescription } from "@/components/ui/alert";
|
import { Alert, AlertDescription } from "@/components/ui/alert";
|
||||||
import ApplyStatusRows from "./ApplyStatusRows.vue";
|
import ApplyStatusRows from "./ApplyStatusRows.vue";
|
||||||
|
import KindGate from "./KindGate.vue";
|
||||||
import { computed, onMounted, ref, watch } from "vue";
|
import { computed, onMounted, ref, watch } from "vue";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
import { Plus, Trash2 } from "@lucide/vue";
|
import { Plus, Trash2 } from "@lucide/vue";
|
||||||
@@ -168,6 +169,8 @@ function setAllowed(id: string, text: string) {
|
|||||||
{{ e }}
|
{{ e }}
|
||||||
</AlertDescription></Alert>
|
</AlertDescription></Alert>
|
||||||
|
|
||||||
|
<KindGate v-if="!aliases && !providers" kind="provider-settings" />
|
||||||
|
|
||||||
<template v-if="aliases">
|
<template v-if="aliases">
|
||||||
<Section title="Aliases">
|
<Section title="Aliases">
|
||||||
<p v-if="!aliases.default" class="mb-3 text-label text-warn" role="alert">Set the default alias.</p>
|
<p v-if="!aliases.default" class="mb-3 text-label text-warn" role="alert">Set the default alias.</p>
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ import CardAccordion from "./CardAccordion.vue";
|
|||||||
import CommandListEditor from "./CommandListEditor.vue";
|
import CommandListEditor from "./CommandListEditor.vue";
|
||||||
import DraftHint from "./DraftHint.vue";
|
import DraftHint from "./DraftHint.vue";
|
||||||
import HistoryLink from "./HistoryLink.vue";
|
import HistoryLink from "./HistoryLink.vue";
|
||||||
|
import KindGate from "./KindGate.vue";
|
||||||
|
|
||||||
const KIND = "repository-policies";
|
const KIND = "repository-policies";
|
||||||
|
|
||||||
@@ -147,6 +148,7 @@ async function checkAccess(repo:Repo):Promise<void>{
|
|||||||
|
|
||||||
<Alert v-if="catalogError || error" variant="destructive" class="mb-4"><AlertDescription>{{ catalogError || error }}</AlertDescription></Alert>
|
<Alert v-if="catalogError || error" variant="destructive" class="mb-4"><AlertDescription>{{ catalogError || error }}</AlertDescription></Alert>
|
||||||
|
|
||||||
|
<KindGate v-if="!form" :kind="KIND" />
|
||||||
<template v-if="form">
|
<template v-if="form">
|
||||||
<CardAccordion v-model:open="open" :items="repos" :title="(r) => `${r.owner}/${r.name}`" remove-label="Remove" mono @remove="removeRepo">
|
<CardAccordion v-model:open="open" :items="repos" :title="(r) => `${r.owner}/${r.name}`" remove-label="Remove" mono @remove="removeRepo">
|
||||||
<template #aside="{ item }">
|
<template #aside="{ item }">
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Alert, AlertDescription } from "@/components/ui/alert";
|
import { Alert, AlertDescription } from "@/components/ui/alert";
|
||||||
import ApplyStatusRows from "./ApplyStatusRows.vue";
|
import ApplyStatusRows from "./ApplyStatusRows.vue";
|
||||||
|
import KindGate from "./KindGate.vue";
|
||||||
import { computed, onMounted, ref } from "vue";
|
import { computed, onMounted, ref } from "vue";
|
||||||
import { RotateCcw } from "@lucide/vue";
|
import { RotateCcw } from "@lucide/vue";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
@@ -89,6 +90,8 @@ async function restoreWorkflows(): Promise<void> {
|
|||||||
{{ catalogError || error }}
|
{{ catalogError || error }}
|
||||||
</AlertDescription></Alert>
|
</AlertDescription></Alert>
|
||||||
|
|
||||||
|
<KindGate v-if="!limitsForm" :kind="KIND" />
|
||||||
|
|
||||||
<FieldGroup v-if="limitsForm && limits" class="@container/field-group">
|
<FieldGroup v-if="limitsForm && limits" class="@container/field-group">
|
||||||
<limitsForm.Field v-slot="{ field }" name="max_task_runtime_seconds">
|
<limitsForm.Field v-slot="{ field }" name="max_task_runtime_seconds">
|
||||||
<Field orientation="responsive">
|
<Field orientation="responsive">
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ function looseNumber(value: string | number): number | string {
|
|||||||
{{ catalogError || error }}
|
{{ catalogError || error }}
|
||||||
</AlertDescription></Alert>
|
</AlertDescription></Alert>
|
||||||
|
|
||||||
|
<KindGate v-if="!form" :kind="KIND" />
|
||||||
<template v-if="form && tools">
|
<template v-if="form && tools">
|
||||||
<Section title="MCP servers">
|
<Section title="MCP servers">
|
||||||
<div class="grid gap-3">
|
<div class="grid gap-3">
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { Input } from "@/components/ui/input";
|
|||||||
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
|
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
|
||||||
import { useSettingsStore } from "@/stores/settings";
|
import { useSettingsStore } from "@/stores/settings";
|
||||||
import { fieldInvalid } from "./settings-form";
|
import { fieldInvalid } from "./settings-form";
|
||||||
|
import KindGate from "./KindGate.vue";
|
||||||
|
|
||||||
const KIND = "update-settings";
|
const KIND = "update-settings";
|
||||||
type UpdateSettings = { channel: string; pin: string };
|
type UpdateSettings = { channel: string; pin: string };
|
||||||
@@ -27,6 +28,7 @@ const channels = [
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<KindGate v-if="!form" :kind="KIND" />
|
||||||
<Section v-if="form" title="Updates">
|
<Section v-if="form" title="Updates">
|
||||||
<Alert v-if="error" variant="destructive" class="mb-2"><AlertDescription>{{ error }}</AlertDescription></Alert>
|
<Alert v-if="error" variant="destructive" class="mb-2"><AlertDescription>{{ error }}</AlertDescription></Alert>
|
||||||
<FieldGroup class="@container/field-group">
|
<FieldGroup class="@container/field-group">
|
||||||
|
|||||||
Reference in new issue
Block a user