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.
27 lines
750 B
Vue
27 lines
750 B
Vue
<script setup lang="ts">
|
|
import { computed } from "vue";
|
|
|
|
import CodeView from "@/base/CodeView.vue";
|
|
import { prettyPrint } from "./capture-payload";
|
|
|
|
/**
|
|
* One labelled block of a capture: its body or its headers, as text. Both are
|
|
* stored as strings, valid JSON or not, so both go through the same reader.
|
|
*/
|
|
const props = defineProps<{ label: string; raw?: string }>();
|
|
|
|
const text = computed(() => prettyPrint(props.raw));
|
|
</script>
|
|
|
|
<template>
|
|
<section class="min-w-0">
|
|
<h3
|
|
class="mb-2 text-caption font-medium tracking-[0.06em] text-fg-subtle uppercase"
|
|
>
|
|
{{ label }}
|
|
</h3>
|
|
<p v-if="!text" class="text-label text-fg-muted">(empty)</p>
|
|
<CodeView v-else :code="text" lang="json" />
|
|
</section>
|
|
</template>
|