mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-09-04 17:23:21 +00:00
Merge branch 'master' into fix-weblate-conflict
This commit is contained in:
@@ -32,6 +32,43 @@
|
||||
<label for="slack-text-message" class="form-label">{{ $t("Send rich messages") }}</label>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
id="slack-include-group-name"
|
||||
v-model="$parent.notification.slackIncludeGroupName"
|
||||
type="checkbox"
|
||||
class="form-check-input"
|
||||
/>
|
||||
<label for="slack-include-group-name" class="form-check-label">{{ $t("slackIncludeGroupName") }}</label>
|
||||
</div>
|
||||
<div class="form-text">
|
||||
{{ $t("slackIncludeGroupNameDescription") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check form-switch">
|
||||
<input v-model="$parent.notification.slackUseTemplate" class="form-check-input" type="checkbox" />
|
||||
<label class="form-check-label">{{ $t("slackUseTemplate") }}</label>
|
||||
</div>
|
||||
<div class="form-text">
|
||||
{{ $t("slackUseTemplateDescription") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-if="$parent.notification.slackUseTemplate">
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="slack-message-template">{{ $t("Message Template") }}</label>
|
||||
<TemplatedTextarea
|
||||
id="slack-message-template"
|
||||
v-model="$parent.notification.slackTemplate"
|
||||
:required="true"
|
||||
:placeholder="slackTemplatedTextareaPlaceholder"
|
||||
></TemplatedTextarea>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="form-text">
|
||||
<span style="color: red"><sup>*</sup></span>
|
||||
{{ $t("Required") }}
|
||||
@@ -67,3 +104,29 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TemplatedTextarea from "../TemplatedTextarea.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
TemplatedTextarea,
|
||||
},
|
||||
computed: {
|
||||
slackTemplatedTextareaPlaceholder() {
|
||||
return this.$t("Example:", [
|
||||
`
|
||||
Uptime Kuma Alert{% if monitorJSON %} - {{ monitorJSON['name'] }}{% endif %}
|
||||
{% if monitorJSON and monitorJSON.path and monitorJSON.path.length > 1 %}_{{ monitorJSON.path.slice(0, -1).join(' / ') }}_\n{% endif %}
|
||||
{{ msg }}
|
||||
`,
|
||||
]);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (typeof this.$parent.notification.slackIncludeGroupName === "undefined") {
|
||||
this.$parent.notification.slackIncludeGroupName = true;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -863,6 +863,10 @@
|
||||
"see Jira Cloud Docs": "see Jira Cloud Docs",
|
||||
"Jira Service Management": "Jira Service Management",
|
||||
"aboutSlackUsername": "Changes the display name of the message sender. If you want to mention someone, include it in the friendly name instead.",
|
||||
"slackIncludeGroupName": "Include monitor group name",
|
||||
"slackIncludeGroupNameDescription": "If enabled, the monitor group path will be included in notifications to help distinguish monitors with the same name across different groups.",
|
||||
"slackUseTemplate": "Use custom message template",
|
||||
"slackUseTemplateDescription": "If enabled, the message will be sent using a custom template. You can use Liquid templating to include monitor group information via monitorJSON.path or monitorJSON.pathName.",
|
||||
"aboutChannelName": "Enter the channel name on {0} Channel Name field if you want to bypass the Webhook channel. Ex: #other-channel",
|
||||
"aboutKumaURL": "If you leave the Uptime Kuma URL field blank, it will default to the Project GitHub page.",
|
||||
"smtpDkimSettings": "DKIM Settings",
|
||||
|
||||
Reference in New Issue
Block a user