|
|
@ -26,6 +26,9 @@
|
|
|
|
<div class="my-3">
|
|
|
|
<div class="my-3">
|
|
|
|
<label for="footer-text" class="form-label">{{ $t("Footer Text") }}</label>
|
|
|
|
<label for="footer-text" class="form-label">{{ $t("Footer Text") }}</label>
|
|
|
|
<textarea id="footer-text" v-model="config.footerText" class="form-control"></textarea>
|
|
|
|
<textarea id="footer-text" v-model="config.footerText" class="form-control"></textarea>
|
|
|
|
|
|
|
|
<div class="form-text">
|
|
|
|
|
|
|
|
{{ $t("markdownSupported") }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="my-3 form-check form-switch">
|
|
|
|
<div class="my-3 form-check form-switch">
|
|
|
@ -148,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">
|
|
|
@ -236,7 +244,8 @@
|
|
|
|
class="shadow-box alert mb-4 p-3 bg-maintenance mt-4 position-relative" role="alert"
|
|
|
|
class="shadow-box alert mb-4 p-3 bg-maintenance mt-4 position-relative" role="alert"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<h4 class="alert-heading">{{ maintenance.title }}</h4>
|
|
|
|
<h4 class="alert-heading">{{ maintenance.title }}</h4>
|
|
|
|
<div class="content">{{ maintenance.description }}</div>
|
|
|
|
<!-- eslint-disable-next-line vue/no-v-html-->
|
|
|
|
|
|
|
|
<div class="content" v-html="maintenanceHTML(maintenance.description)"></div>
|
|
|
|
<MaintenanceTime :maintenance="maintenance" />
|
|
|
|
<MaintenanceTime :maintenance="maintenance" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -279,7 +288,9 @@
|
|
|
|
<div class="custom-footer-text text-start">
|
|
|
|
<div class="custom-footer-text text-start">
|
|
|
|
<strong v-if="enableEditMode">{{ $t("Custom Footer") }}:</strong>
|
|
|
|
<strong v-if="enableEditMode">{{ $t("Custom Footer") }}:</strong>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Editable v-model="config.footerText" tag="div" :contenteditable="enableEditMode" :noNL="false" class="alert-heading p-2" />
|
|
|
|
<Editable v-if="enableEditMode" v-model="config.footerText" tag="div" :contenteditable="enableEditMode" :noNL="false" class="alert-heading p-2" />
|
|
|
|
|
|
|
|
<!-- eslint-disable-next-line vue/no-v-html-->
|
|
|
|
|
|
|
|
<div v-if="! enableEditMode" class="alert-heading p-2" v-html="footerHTML"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<p v-if="config.showPoweredBy">
|
|
|
|
<p v-if="config.showPoweredBy">
|
|
|
|
{{ $t("Powered by") }} <a target="_blank" rel="noopener noreferrer" href="https://github.com/louislam/uptime-kuma">{{ $t("Uptime Kuma" ) }}</a>
|
|
|
|
{{ $t("Powered by") }} <a target="_blank" rel="noopener noreferrer" href="https://github.com/louislam/uptime-kuma">{{ $t("Uptime Kuma" ) }}</a>
|
|
|
@ -310,6 +321,8 @@ import ImageCropUpload from "vue-image-crop-upload";
|
|
|
|
import { PrismEditor } from "vue-prism-editor";
|
|
|
|
import { PrismEditor } from "vue-prism-editor";
|
|
|
|
import "vue-prism-editor/dist/prismeditor.min.css"; // import the styles somewhere
|
|
|
|
import "vue-prism-editor/dist/prismeditor.min.css"; // import the styles somewhere
|
|
|
|
import { useToast } from "vue-toastification";
|
|
|
|
import { useToast } from "vue-toastification";
|
|
|
|
|
|
|
|
import { marked } from "marked";
|
|
|
|
|
|
|
|
import DOMPurify from "dompurify";
|
|
|
|
import Confirm from "../components/Confirm.vue";
|
|
|
|
import Confirm from "../components/Confirm.vue";
|
|
|
|
import PublicGroupList from "../components/PublicGroupList.vue";
|
|
|
|
import PublicGroupList from "../components/PublicGroupList.vue";
|
|
|
|
import MaintenanceTime from "../components/MaintenanceTime.vue";
|
|
|
|
import MaintenanceTime from "../components/MaintenanceTime.vue";
|
|
|
@ -477,6 +490,13 @@ export default {
|
|
|
|
return this.overallStatus === STATUS_PAGE_MAINTENANCE;
|
|
|
|
return this.overallStatus === STATUS_PAGE_MAINTENANCE;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
incidentHTML() {
|
|
|
|
|
|
|
|
return DOMPurify.sanitize(marked(this.incident.content));
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
footerHTML() {
|
|
|
|
|
|
|
|
return DOMPurify.sanitize(marked(this.config.footerText));
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
|
|
|
|
|
|
|
@ -836,6 +856,15 @@ export default {
|
|
|
|
this.config.domainNameList.splice(index, 1);
|
|
|
|
this.config.domainNameList.splice(index, 1);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Generate sanitized HTML from maintenance description
|
|
|
|
|
|
|
|
* @param {string} description
|
|
|
|
|
|
|
|
* @returns {string} Sanitized HTML
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
maintenanceHTML(description) {
|
|
|
|
|
|
|
|
return DOMPurify.sanitize(marked(description));
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|