mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-04-20 07:36:05 -04:00
Merge 5df79d012919891ab0d71876ca765c682e49e792 into 8d8e3e5a8e78030b8ffbe258dc872b8bea234390
This commit is contained in:
commit
211ee1d1c9
@ -9,7 +9,8 @@
|
||||
<div>{{ monitor.id }}</div>
|
||||
</div>
|
||||
</h1>
|
||||
<p v-if="monitor.description">{{ monitor.description }}</p>
|
||||
<!-- eslint-disable-next-line vue/no-v-html-->
|
||||
<p v-if="monitor.description" v-html="descriptionHTML"></p>
|
||||
<div class="d-flex">
|
||||
<div class="tags">
|
||||
<Tag v-for="tag in monitor.tags" :key="tag.id" :item="tag" :size="'sm'" />
|
||||
@ -285,6 +286,8 @@ import Tag from "../components/Tag.vue";
|
||||
import CertificateInfo from "../components/CertificateInfo.vue";
|
||||
import { getMonitorRelativeURL } from "../util.ts";
|
||||
import { URL } from "whatwg-url";
|
||||
import DOMPurify from "dompurify";
|
||||
import { marked } from "marked";
|
||||
import { getResBaseURL } from "../util-frontend";
|
||||
import { highlight, languages } from "prismjs/components/prism-core";
|
||||
import "prismjs/components/prism-clike";
|
||||
@ -399,6 +402,14 @@ export default {
|
||||
|
||||
screenshotURL() {
|
||||
return getResBaseURL() + this.monitor.screenshot + "?time=" + this.cacheTime;
|
||||
},
|
||||
|
||||
descriptionHTML() {
|
||||
if (this.monitor.description != null) {
|
||||
return DOMPurify.sanitize(marked(this.monitor.description));
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user