diff --git a/server/notification.js b/server/notification.js index 6a92effe8..351fb504d 100644 --- a/server/notification.js +++ b/server/notification.js @@ -128,13 +128,17 @@ class Notification { } else if (notification.type === "slack") { try { if (heartbeatJSON == null) { - let data = {'text': "Uptime Kuma Slack testing successful."} + let data = {'text': "Uptime Kuma Slack testing successful.", 'channel': notification.slackchannel, 'username': notification.slackusername, 'icon_emoji': notification.slackiconemo} let res = await axios.post(notification.slackwebhookURL, data) return true; } const time = heartbeatJSON["time"]; let data = { + "text": "Uptime Kuma Alert", + "channel":notification.slackchannel, + "username": notification.slackusername, + "icon_emoji": notification.slackiconemo, "blocks": [{ "type": "header", "text": { @@ -155,17 +159,17 @@ class Notification { ] }, { - "type": "actions", - "elements": [ - { - "type": "button", - "text": { + "type": "actions", + "elements": [ + { + "type": "button", + "text": { "type": "plain_text", "text": "Visit Uptime Kuma", }, - "value": "Uptime-Kuma", - "url": notification.slackbutton - } + "value": "Uptime-Kuma", + "url": notification.slackbutton || "https://github.com/louislam/uptime-kuma" + } ] } ] diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index 901ce3449..c5be0c65b 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -192,15 +192,31 @@ diff --git a/src/layouts/Layout.vue b/src/layouts/Layout.vue index b9aca97f6..237f051bd 100644 --- a/src/layouts/Layout.vue +++ b/src/layouts/Layout.vue @@ -146,6 +146,7 @@ footer { font-size: 13px; margin-bottom: 30px; margin-left: 10px; + text-align: center; }