mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-05-20 14:02:34 +02:00
Add disable url option in notification Discord (#5817)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
32d92eccfa
commit
76c382f229
3 changed files with 16 additions and 5 deletions
|
@ -46,10 +46,10 @@ class Discord extends NotificationProvider {
|
||||||
name: "Service Name",
|
name: "Service Name",
|
||||||
value: monitorJSON["name"],
|
value: monitorJSON["name"],
|
||||||
},
|
},
|
||||||
{
|
...(!notification.disableUrl ? [{
|
||||||
name: monitorJSON["type"] === "push" ? "Service Type" : "Service URL",
|
name: monitorJSON["type"] === "push" ? "Service Type" : "Service URL",
|
||||||
value: this.extractAddress(monitorJSON),
|
value: this.extractAddress(monitorJSON),
|
||||||
},
|
}] : []),
|
||||||
{
|
{
|
||||||
name: `Time (${heartbeatJSON["timezone"]})`,
|
name: `Time (${heartbeatJSON["timezone"]})`,
|
||||||
value: heartbeatJSON["localDateTime"],
|
value: heartbeatJSON["localDateTime"],
|
||||||
|
@ -83,10 +83,10 @@ class Discord extends NotificationProvider {
|
||||||
name: "Service Name",
|
name: "Service Name",
|
||||||
value: monitorJSON["name"],
|
value: monitorJSON["name"],
|
||||||
},
|
},
|
||||||
{
|
...(!notification.disableUrl ? [{
|
||||||
name: monitorJSON["type"] === "push" ? "Service Type" : "Service URL",
|
name: monitorJSON["type"] === "push" ? "Service Type" : "Service URL",
|
||||||
value: this.extractAddress(monitorJSON),
|
value: this.extractAddress(monitorJSON),
|
||||||
},
|
}] : []),
|
||||||
{
|
{
|
||||||
name: `Time (${heartbeatJSON["timezone"]})`,
|
name: `Time (${heartbeatJSON["timezone"]})`,
|
||||||
value: heartbeatJSON["localDateTime"],
|
value: heartbeatJSON["localDateTime"],
|
||||||
|
|
|
@ -53,6 +53,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<div class="form-check form-switch">
|
||||||
|
<input id="discord-disable-url" v-model="$parent.notification.disableUrl" class="form-check-input" type="checkbox" role="switch">
|
||||||
|
<label class="form-check-label" for="discord-disable-url">{{ $t("Disable URL in Notification") }}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
@ -60,6 +67,9 @@ export default {
|
||||||
if (!this.$parent.notification.discordChannelType) {
|
if (!this.$parent.notification.discordChannelType) {
|
||||||
this.$parent.notification.discordChannelType = "channel";
|
this.$parent.notification.discordChannelType = "channel";
|
||||||
}
|
}
|
||||||
|
if (this.$parent.notification.disableUrl === undefined) {
|
||||||
|
this.$parent.notification.disableUrl = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1093,5 +1093,6 @@
|
||||||
"the smsplanet documentation": "the smsplanet documentation",
|
"the smsplanet documentation": "the smsplanet documentation",
|
||||||
"Phone numbers": "Phone numbers",
|
"Phone numbers": "Phone numbers",
|
||||||
"Sender name": "Sender name",
|
"Sender name": "Sender name",
|
||||||
"smsplanetNeedToApproveName": "Needs to be approved in the client panel"
|
"smsplanetNeedToApproveName": "Needs to be approved in the client panel",
|
||||||
|
"Disable URL in Notification": "Disable URL in Notification"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue