mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-27 20:58:01 +02:00
26 lines
552 B
Vue
26 lines
552 B
Vue
<script setup>
|
|
import { useI18n } from '@/stores/misc.js';
|
|
|
|
import TextModal from './TextModal.vue';
|
|
|
|
defineProps(['text']);
|
|
|
|
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>
|