mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-01 01:25:45 -04:00
Added mardown support for incident
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
parent
6bc0bd84af
commit
852a088529
@ -151,7 +151,12 @@
|
|||||||
<Editable v-model="incident.title" tag="h4" :contenteditable="editIncidentMode" :noNL="true" class="alert-heading" />
|
<Editable v-model="incident.title" tag="h4" :contenteditable="editIncidentMode" :noNL="true" class="alert-heading" />
|
||||||
|
|
||||||
<strong v-if="editIncidentMode">{{ $t("Content") }}:</strong>
|
<strong v-if="editIncidentMode">{{ $t("Content") }}:</strong>
|
||||||
<Editable v-model="incident.content" tag="div" :contenteditable="editIncidentMode" class="content" />
|
<Editable v-if="editIncidentMode" v-model="incident.content" tag="div" :contenteditable="editIncidentMode" class="content" />
|
||||||
|
<div v-if="editIncidentMode" class="form-text">
|
||||||
|
{{ $t("markdownSupported") }}
|
||||||
|
</div>
|
||||||
|
<!-- eslint-disable-next-line vue/no-v-html-->
|
||||||
|
<div v-if="! editIncidentMode" class="content" v-html="incidentHTML"></div>
|
||||||
|
|
||||||
<!-- Incident Date -->
|
<!-- Incident Date -->
|
||||||
<div class="date mt-3">
|
<div class="date mt-3">
|
||||||
@ -484,6 +489,10 @@ export default {
|
|||||||
return this.overallStatus === STATUS_PAGE_MAINTENANCE;
|
return this.overallStatus === STATUS_PAGE_MAINTENANCE;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
incidentHTML() {
|
||||||
|
return DOMPurify.sanitize(marked(this.incident.content));
|
||||||
|
},
|
||||||
|
|
||||||
footerHTML() {
|
footerHTML() {
|
||||||
return DOMPurify.sanitize(marked(this.config.footerText));
|
return DOMPurify.sanitize(marked(this.config.footerText));
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user