Files
archie/ui/src/sources/SourceSecret.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

56 lines
1.9 KiB
Vue

<script setup lang="ts">
import { computed, ref } from "vue";
import { Check, Copy, KeyRound, X } from "@lucide/vue";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
import { sourceURL, type Source } from "./source-signing";
const props = defineProps<{ source: Source }>();
const emit = defineEmits<{ dismiss: [] }>();
const url = computed(() => sourceURL(window.location.origin, props.source.path));
const copied = ref<string | null>(null);
async function copy(value: string): Promise<void> {
await navigator.clipboard.writeText(value);
copied.value = value;
setTimeout(() => (copied.value = null), 1500);
}
</script>
<template>
<Alert>
<KeyRound />
<AlertTitle class="flex items-center justify-between gap-2 text-caption">
<span class="font-mono"
>{{ source.path }} · signing secret, shown once</span
>
<Button
type="button"
variant="ghost"
size="icon-sm"
aria-label="Dismiss"
@click="emit('dismiss')"
><X
/></Button>
</AlertTitle>
<AlertDescription class="col-start-2 flex items-center gap-2">
<code class="min-w-0 flex-1 break-all font-mono text-caption">{{ url }}</code>
<Button type="button" variant="ghost" size="icon-sm" aria-label="Copy URL" @click="copy(url)"><Check v-if="copied === url" /><Copy v-else /></Button>
</AlertDescription>
<AlertDescription class="col-start-2 flex items-center gap-2">
<code class="min-w-0 flex-1 break-all font-mono text-caption">{{
source.secret
}}</code>
<Button
type="button"
variant="ghost"
size="icon-sm"
aria-label="Copy secret"
@click="copy(source.secret || '')"
>
<Check v-if="copied === source.secret" />
<Copy v-else />
</Button>
</AlertDescription>
</Alert>
</template>