diff options
author | Daniel Baumann <daniel@debian.org> | 2024-11-26 09:28:28 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2024-11-26 12:25:58 +0100 |
commit | a1882b67c41fe9901a0cd8059b5cc78a5beadec0 (patch) | |
tree | 2a24507c67aa99a15416707b2f7e645142230ed8 /src/components/notifications/DingDing.vue | |
parent | Initial commit. (diff) | |
download | uptime-kuma-a1882b67c41fe9901a0cd8059b5cc78a5beadec0.tar.xz uptime-kuma-a1882b67c41fe9901a0cd8059b5cc78a5beadec0.zip |
Adding upstream version 2.0.0~beta.0+dfsg.upstream/2.0.0_beta.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'src/components/notifications/DingDing.vue')
-rw-r--r-- | src/components/notifications/DingDing.vue | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/components/notifications/DingDing.vue b/src/components/notifications/DingDing.vue new file mode 100644 index 0000000..710677f --- /dev/null +++ b/src/components/notifications/DingDing.vue @@ -0,0 +1,37 @@ +<template> + <div class="mb-3"> + <label for="WebHookUrl" class="form-label">{{ $t("WebHookUrl") }}<span style="color: red;"><sup>*</sup></span></label> + <input id="WebHookUrl" v-model="$parent.notification.webHookUrl" type="text" class="form-control" required> + </div> + <div class="mb-3"> + <label for="secretKey" class="form-label">{{ $t("SecretKey") }}<span style="color: red;"><sup>*</sup></span></label> + <HiddenInput id="secretKey" v-model="$parent.notification.secretKey" :required="true" autocomplete="new-password"></HiddenInput> + + <div class="form-text"> + <p>{{ $t("For safety, must use secret key") }}</p> + <i18n-t tag="p" keypath="Read more:"> + <a href="https://developers.dingtalk.com/document/robots/custom-robot-access" target="_blank">https://developers.dingtalk.com/document/robots/custom-robot-access</a> <a href="https://open.dingtalk.com/document/robots/customize-robot-security-settings#title-7fs-kgs-36x" target="_blank">https://open.dingtalk.com/document/robots/customize-robot-security-settings#title-7fs-kgs-36x</a> + </i18n-t> + </div> + </div> + <div class="mb-3"> + <label for="mentioning" class="form-label">{{ $t("Mentioning") }}<span style="color: red;"><sup>*</sup></span></label> + <select id="mentioning" v-model="$parent.notification.mentioning" class="form-select" required> + <option value="nobody">{{ $t("Don't mention people") }}</option> + <option value="everyone">{{ $t("Mention group", { group: "@everyone" }) }}</option> + </select> + </div> +</template> + +<script lang="ts"> +import HiddenInput from "../HiddenInput.vue"; + +export default { + components: { HiddenInput }, + mounted() { + if (typeof this.$parent.notification.mentioning === "undefined") { + this.$parent.notification.mentioning = "nobody"; + } + } +}; +</script> |