mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-04-02 14:32:21 +00:00
Merge 5df79d0129
into 30f82b9cb4
This commit is contained in:
commit
3e21de3d53
1 changed files with 12 additions and 1 deletions
|
@ -9,7 +9,8 @@
|
||||||
<div>{{ monitor.id }}</div>
|
<div>{{ monitor.id }}</div>
|
||||||
</div>
|
</div>
|
||||||
</h1>
|
</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="d-flex">
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
<Tag v-for="tag in monitor.tags" :key="tag.id" :item="tag" :size="'sm'" />
|
<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 CertificateInfo from "../components/CertificateInfo.vue";
|
||||||
import { getMonitorRelativeURL } from "../util.ts";
|
import { getMonitorRelativeURL } from "../util.ts";
|
||||||
import { URL } from "whatwg-url";
|
import { URL } from "whatwg-url";
|
||||||
|
import DOMPurify from "dompurify";
|
||||||
|
import { marked } from "marked";
|
||||||
import { getResBaseURL } from "../util-frontend";
|
import { getResBaseURL } from "../util-frontend";
|
||||||
import { highlight, languages } from "prismjs/components/prism-core";
|
import { highlight, languages } from "prismjs/components/prism-core";
|
||||||
import "prismjs/components/prism-clike";
|
import "prismjs/components/prism-clike";
|
||||||
|
@ -399,6 +402,14 @@ export default {
|
||||||
|
|
||||||
screenshotURL() {
|
screenshotURL() {
|
||||||
return getResBaseURL() + this.monitor.screenshot + "?time=" + this.cacheTime;
|
return getResBaseURL() + this.monitor.screenshot + "?time=" + this.cacheTime;
|
||||||
|
},
|
||||||
|
|
||||||
|
descriptionHTML() {
|
||||||
|
if (this.monitor.description != null) {
|
||||||
|
return DOMPurify.sanitize(marked(this.monitor.description));
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue