mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-21 12:47:24 +08:00
ntfy.sh separate down priority (#5893)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
committed by
GitHub
parent
c46772dafc
commit
f27811c394
@@ -13,13 +13,20 @@
|
||||
<div class="mb-3">
|
||||
<label for="ntfy-priority" class="form-label">{{ $t("Priority") }}</label>
|
||||
<input id="ntfy-priority" v-model="$parent.notification.ntfyPriority" type="number" class="form-control" required min="1" max="5" step="1">
|
||||
<label for="ntfy-priority-down" class="form-label">{{ $t("ntfyPriorityDown") }}</label>
|
||||
<input id="ntfy-priority-down" v-model="$parent.notification.ntfyPriorityDown" type="number" class="form-control" required min="1" max="5" step="1">
|
||||
<div class="form-text">
|
||||
<p v-if="$parent.notification.ntfyPriority >= 5">
|
||||
<p v-if="$parent.notification.ntfyPriority == $parent.notification.ntfyPriorityDown && $parent.notification.ntfyPriority >= 5">
|
||||
{{ $t("ntfyPriorityHelptextAllEvents") }}
|
||||
</p>
|
||||
<i18n-t v-else-if="$parent.notification.ntfyPriority > $parent.notification.ntfyPriorityDown" tag="p" keypath="ntfyPriorityHelptextPriorityHigherThanDown">
|
||||
<code>DOWN</code>
|
||||
<code>{{ $parent.notification.ntfyPriority }}</code>
|
||||
<code>{{ $parent.notification.ntfyPriorityDown }}</code>
|
||||
</i18n-t>
|
||||
<i18n-t v-else tag="p" keypath="ntfyPriorityHelptextAllExceptDown">
|
||||
<code>DOWN</code>
|
||||
<code>{{ $parent.notification.ntfyPriority + 1 }}</code>
|
||||
<code>{{ $parent.notification.ntfyPriorityDown }}</code>
|
||||
</i18n-t>
|
||||
</div>
|
||||
</div>
|
||||
@@ -69,6 +76,11 @@ export default {
|
||||
this.$parent.notification.ntfyPriority = 5;
|
||||
}
|
||||
|
||||
// Setting down priority if it's undefined
|
||||
if (typeof this.$parent.notification.ntfyPriorityDown === "undefined") {
|
||||
this.$parent.notification.ntfyPriorityDown = 5;
|
||||
}
|
||||
|
||||
// Handling notifications that added before 1.22.0
|
||||
if (typeof this.$parent.notification.ntfyAuthenticationMethod === "undefined") {
|
||||
if (!this.$parent.notification.ntfyusername) {
|
||||
|
Reference in New Issue
Block a user