From 20b69acde21a44c202215963a49912f395e84429 Mon Sep 17 00:00:00 2001 From: Philip Klostermann Date: Tue, 23 Jan 2024 10:10:31 -0500 Subject: [PATCH 01/12] [Ntfy] Only include action link if monitor url is defined #3274 --- server/notification-providers/ntfy.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server/notification-providers/ntfy.js b/server/notification-providers/ntfy.js index 86fc0e081..b51b0f238 100644 --- a/server/notification-providers/ntfy.js +++ b/server/notification-providers/ntfy.js @@ -54,14 +54,17 @@ class Ntfy extends NotificationProvider { "priority": priority, "title": monitorJSON.name + " " + status + " [Uptime-Kuma]", "tags": tags, - "actions": [ + }; + + if (monitorJSON.url) { + data.actions = [ { "action": "view", "label": "Open " + monitorJSON.name, "url": monitorJSON.url, - } - ] - }; + }, + ]; + } if (notification.ntfyIcon) { data.icon = notification.ntfyIcon; From 95125cc4172c2d196f99748fc3dac06a9285bc75 Mon Sep 17 00:00:00 2001 From: Philip Klostermann Date: Tue, 23 Jan 2024 11:16:10 -0500 Subject: [PATCH 02/12] [Ntfy] don't include url action with defaut URL value --- server/notification-providers/ntfy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/notification-providers/ntfy.js b/server/notification-providers/ntfy.js index b51b0f238..12c9258b8 100644 --- a/server/notification-providers/ntfy.js +++ b/server/notification-providers/ntfy.js @@ -56,7 +56,7 @@ class Ntfy extends NotificationProvider { "tags": tags, }; - if (monitorJSON.url) { + if (monitorJSON.url && monitorJSON.url !== "https://") { data.actions = [ { "action": "view", From 99dccd9e902a9b49abaffb90f3dacd95f9c02ab3 Mon Sep 17 00:00:00 2001 From: Huzaifa Azim Date: Fri, 23 Feb 2024 18:10:09 +0500 Subject: [PATCH 03/12] reset-password-issue-4518 --- extra/reset-password.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extra/reset-password.js b/extra/reset-password.js index 3b40e93e8..b87d90f16 100644 --- a/extra/reset-password.js +++ b/extra/reset-password.js @@ -8,6 +8,7 @@ const User = require("../server/model/user"); const { io } = require("socket.io-client"); const { localWebSocketURL } = require("../server/config"); const args = require("args-parser")(process.argv); + const rl = readline.createInterface({ input: process.stdin, output: process.stdout @@ -19,10 +20,10 @@ const main = async () => { } console.log("Connecting the database"); - Database.initDataDir(args); - await Database.connect(false, false, true); try { + Database.initDataDir(args); + await Database.connect(false, false, true); // No need to actually reset the password for testing, just make sure no connection problem. It is ok for now. if (!process.env.TEST_BACKEND) { const user = await R.findOne("user"); From e74d6a7471d80ecb52b5ee4567eda1faf658deab Mon Sep 17 00:00:00 2001 From: Vista2003 <55105920+Vista2003@users.noreply.github.com> Date: Sun, 25 Feb 2024 10:35:32 +0000 Subject: [PATCH 04/12] Fixing strings as reported on issue #4526 --- src/components/notifications/Line.vue | 6 +++--- src/lang/en.json | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/notifications/Line.vue b/src/components/notifications/Line.vue index dcd6142bb..3ef51ca21 100644 --- a/src/components/notifications/Line.vue +++ b/src/components/notifications/Line.vue @@ -4,14 +4,14 @@ - {{ $t("Basic Settings") }} + {{ $t("Messaging API") }}
- +
- {{ $t("Messaging API") }} + {{ $t("Basic Settings") }} {{ $t("Line Developers Console") }} diff --git a/src/lang/en.json b/src/lang/en.json index 0f59e62ae..418ac58fe 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -536,6 +536,7 @@ "lineDevConsoleTo": "Line Developers Console - {0}", "Basic Settings": "Basic Settings", "User ID": "User ID", + "Your User ID": "Your user ID", "Messaging API": "Messaging API", "wayToGetLineChannelToken": "First access the {0}, create a provider and channel (Messaging API), then you can get the channel access token and user ID from the above mentioned menu items.", "Icon URL": "Icon URL", From 3fd0c822d639d5fceab91576413a429a0bd649e8 Mon Sep 17 00:00:00 2001 From: Vista2003 <55105920+Vista2003@users.noreply.github.com> Date: Sun, 25 Feb 2024 16:31:25 +0000 Subject: [PATCH 05/12] Removed trailing space --- src/components/notifications/Line.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/notifications/Line.vue b/src/components/notifications/Line.vue index 3ef51ca21..d14e13b96 100644 --- a/src/components/notifications/Line.vue +++ b/src/components/notifications/Line.vue @@ -11,7 +11,7 @@ - {{ $t("Basic Settings") }} + {{ $t("Basic Settings") }} {{ $t("Line Developers Console") }} From 800847d0df63a2e2b72fa57332c447825c537705 Mon Sep 17 00:00:00 2001 From: Vista2003 <55105920+Vista2003@users.noreply.github.com> Date: Mon, 26 Feb 2024 20:23:57 +0000 Subject: [PATCH 06/12] Correcting label to fit what it says on the page --- src/components/notifications/Line.vue | 2 +- src/lang/en.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/notifications/Line.vue b/src/components/notifications/Line.vue index d14e13b96..578dc7ff6 100644 --- a/src/components/notifications/Line.vue +++ b/src/components/notifications/Line.vue @@ -1,6 +1,6 @@