forked from mirrors/homebox
feat: markdown support (#165)
* initial markdown support via markdown-it * sanitize markup * remove pre-padding * fix linter errors
This commit is contained in:
parent
d2aa022347
commit
974d6914a2
8 changed files with 1396 additions and 1049 deletions
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { CustomDetail, Detail } from "~~/components/global/DetailsSection/types";
|
||||
import type { AnyDetail, Details } from "~~/components/global/DetailsSection/types";
|
||||
|
||||
definePageMeta({
|
||||
middleware: ["auth"],
|
||||
|
@ -23,7 +23,7 @@
|
|||
return data;
|
||||
});
|
||||
|
||||
const details = computed<(Detail | CustomDetail)[]>(() => {
|
||||
const details = computed<Details>(() => {
|
||||
const details = [
|
||||
{
|
||||
name: "Name",
|
||||
|
@ -31,8 +31,9 @@
|
|||
},
|
||||
{
|
||||
name: "Description",
|
||||
type: "markdown",
|
||||
text: label.value?.description,
|
||||
},
|
||||
} as AnyDetail,
|
||||
];
|
||||
|
||||
if (preferences.value.showDetails) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue