Files
archie/ui/src/dashboard/SetupPanel.vue
T
sam 94f79177a2
deploy / gate (push) Successful in 4m53s
Quality / check (push) Successful in 6m42s
deploy / archied-image (push) Successful in 3m20s
deploy / agent-image (push) Successful in 11s
deploy / dist-zip (push) Skipped
fix(ui): adopt the type scale across components/ui and pages (#1758)
components/ui and the pages now use only the style.css scale:
text-[0.8rem]→text-label, text-[0.625rem]→text-micro, text-base/text-sm→
text-label (rows and controls), text-xs→text-caption (captions and
secondary text), text-lg/text-xl/text-2xl→text-title (panel and page
titles). Rendered markdown (ChatMarkdown/ChatInline/markdown.ts) keeps
Tailwind steps as the issue allows. 196 files, class-token swaps only.
2026-11-06 23:07:46 +11:00

51 lines
1.9 KiB
Vue

<script setup lang="ts">
import { storeToRefs } from "pinia";
import { Check, Circle } from "@lucide/vue";
import { computed, ref, watch } from "vue";
import { Section } from "@/components/ui/section";
import { setupPanelState, type SetupPanelState } from "./setup-preference";
import { useTasksStore } from "@/stores/tasks";
const { setup } = storeToRefs(useTasksStore());
/**
* The setup checklist, rendered only while there is setup work left.
*
* A fully configured daemon renders nothing: a completion card would celebrate
* the absence of a problem and hold a grid cell. Setup regressing to
* incomplete brings the checklist back on its own.
*/
const panel = ref<SetupPanelState>(setupPanelState(setup.value));
watch(setup, () => {
panel.value = setupPanelState(setup.value);
});
const steps = computed(() => setup.value?.steps ?? []);
const pct = computed(() => {
const total = steps.value.length;
if (!total) return 0;
return Math.round(((total - panel.value.remaining.length) / total) * 100);
});
</script>
<template>
<Section v-if="panel.kind === 'incomplete'" title="Setup" class="mb-0">
<template #action>
<span class="text-label font-semibold text-link tabular-nums">{{ pct }}%</span>
</template>
<ul class="grid gap-2 text-label">
<li v-for="(step, i) in steps" :key="i" class="flex items-center gap-2">
<Check v-if="step.done" class="size-3.5 shrink-0 text-ok" aria-label="Done" />
<Circle v-else class="size-3.5 shrink-0 text-fg-subtle" aria-label="To do" />
<span class="flex min-w-0 flex-col">
<RouterLink v-if="!step.done && step.path" :to="step.path" class="font-medium hover:underline">{{ step.title }}</RouterLink>
<span v-else :class="step.done ? 'text-fg-muted' : 'font-medium'">{{ step.title }}</span>
<span v-if="step.detail" class="text-caption text-fg-subtle">{{ step.detail }}</span>
</span>
</li>
</ul>
</Section>
</template>