Hyperpipe/src/components/Info.vue
Shiny Nematoda d4eee69077 added MPRE* support
+ a few strings from #139
+ minor cleanup
2023-08-12 07:59:25 +00:00

26 lines
560 B
Vue

<script setup>
import { useI18n } from '@/stores/misc.js';
import TextModal from './TextModal.vue';
defineProps({ text: String });
const { t } = useI18n(),
parse = d => new DOMParser().parseFromString(d, 'text/html').body.innerText;
</script>
<template>
<TextModal>
<template #content>
<pre class="placeholder" :data-placeholder="t('info.no_info')">{{
text ? parse(text.replaceAll('<br>', '\n')) : ''
}}</pre>
</template>
</TextModal>
</template>
<style scoped>
.placeholder:empty::before {
--ico: '\F3B9';
}
</style>