Files
archie/ui/src/settings/KindGate.vue
T
sam c6f70de82d
Quality / check (push) Successful in 7m32s
deploy / gate (push) Successful in 4m59s
deploy / archied-image (push) Successful in 3m27s
deploy / agent-image (push) Successful in 11s
deploy / dist-zip (push) Skipped
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.
2026-11-07 00:42:28 +11:00

27 lines
983 B
Vue

<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>