Add support for icon to ntfy notification provider (requires minimum ntfy server version 1.28.0 and Android app 1.14.0, no iOS support as of today)

This commit is contained in:
Christian Meis 2022-09-28 10:13:18 +02:00
parent c3eef28443
commit 6f86236b63
3 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,7 @@ class Ntfy extends NotificationProvider {
"message": msg,
"priority": notification.ntfyPriority || 4,
"title": "Uptime-Kuma",
"icon": notification.ntfyIcon || '',
});
return okMsg;

View File

@ -16,6 +16,11 @@
<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">
</div>
<div class="mb-3">
<label for="ntfy-icon" class="form-label">{{ $t("IconUrl") }}</label>
<input id="ntfy-icon" v-model="$parent.notification.ntfyIcon" type="text" class="form-control" required>
</div>
</template>
<script>

View File

@ -582,4 +582,5 @@ export default {
goAlert: "GoAlert",
backupOutdatedWarning: "Deprecated: Since a lot of features added and this backup feature is a bit unmaintained, it cannot generate or restore a complete backup.",
backupRecommend: "Please backup the volume or the data folder (./data/) directly instead.",
IconUrl: "Icon-URL",
};