CI/CD / preconditions (pull_request) Successful in 1s
macOS checks / Native Rust tests and unsigned build (pull_request) Canceled after 0s
Native JavaScript checks / Native launcher and release tests (pull_request) Successful in 1m11s
CI/CD / test_and_check_app (pull_request) Successful in 5m58s
CI/CD / Publish immutable image (pull_request) Skipped
34 lines
878 B
Vue
34 lines
878 B
Vue
<script setup lang="ts">
|
|
import { computed, defineComponent, h } from 'vue';
|
|
import {
|
|
parseDescription,
|
|
renderDescriptionNode,
|
|
supportsVisualDescription,
|
|
} from '@/lib/ticket-description';
|
|
|
|
const props = defineProps<{ description: string }>();
|
|
const document = computed(() =>
|
|
supportsVisualDescription(props.description)
|
|
? parseDescription(props.description)
|
|
: null,
|
|
);
|
|
const Content = defineComponent(
|
|
() => () =>
|
|
document.value
|
|
? h('div', { class: 'ticket-description' }, [
|
|
renderDescriptionNode(document.value),
|
|
])
|
|
: h(
|
|
'p',
|
|
{
|
|
class: 'wrap-anywhere whitespace-pre-wrap text-sm leading-7',
|
|
},
|
|
props.description,
|
|
),
|
|
);
|
|
</script>
|
|
|
|
<template>
|
|
<Content />
|
|
</template>
|