From 3822e579b78568cc19d35bcb8f44413ce1a5c918 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Wed, 6 Dec 2023 00:05:27 +0100 Subject: [PATCH 1/3] added a helptext for `ntfy`'s `priority` field --- src/components/notifications/Ntfy.vue | 10 ++++++++++ src/lang/en.json | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/components/notifications/Ntfy.vue b/src/components/notifications/Ntfy.vue index 70aedb268f..356d24fd59 100644 --- a/src/components/notifications/Ntfy.vue +++ b/src/components/notifications/Ntfy.vue @@ -13,6 +13,16 @@
+ +
+

+ {{ $t("ntfyPriorityHelptextAllEvents")}} +

+ + DOWN + {{ Math.max(5, $parent.notification.ntfyPriority+1)}} + +
diff --git a/src/lang/en.json b/src/lang/en.json index 85825d7de6..dea5e2e464 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -755,6 +755,8 @@ "lunaseaDeviceID": "Device ID", "lunaseaUserID": "User ID", "ntfyAuthenticationMethod": "Authentication Method", + "ntfyPriorityHelptextAllEvents": "All events are send with the maximum priority", + "ntfyPriorityHelptextAllExceptDown": "All events are send with this priority, except {0}-events, which have a priority of {1}", "ntfyUsernameAndPassword": "Username and Password", "twilioAccountSID": "Account SID", "twilioApiKey": "Api Key (optional)", From 47010ee2ce565e2a409fae7b90d545c797892bfc Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Wed, 6 Dec 2023 00:14:19 +0100 Subject: [PATCH 2/3] linting fixes --- src/components/ActionInput.vue | 2 +- src/components/notifications/Ntfy.vue | 5 ++--- src/components/settings/Notifications.vue | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/ActionInput.vue b/src/components/ActionInput.vue index 44c9e586fe..5303e4271c 100644 --- a/src/components/ActionInput.vue +++ b/src/components/ActionInput.vue @@ -8,7 +8,7 @@ :placeholder="placeholder" :disabled="!enabled" > -
diff --git a/src/components/notifications/Ntfy.vue b/src/components/notifications/Ntfy.vue index 356d24fd59..f92cb40eb4 100644 --- a/src/components/notifications/Ntfy.vue +++ b/src/components/notifications/Ntfy.vue @@ -13,14 +13,13 @@
-

- {{ $t("ntfyPriorityHelptextAllEvents")}} + {{ $t("ntfyPriorityHelptextAllEvents") }}

DOWN - {{ Math.max(5, $parent.notification.ntfyPriority+1)}} + {{ Math.max(5, $parent.notification.ntfyPriority+1) }}
diff --git a/src/components/settings/Notifications.vue b/src/components/settings/Notifications.vue index af1e92dee1..9c0264a58c 100644 --- a/src/components/settings/Notifications.vue +++ b/src/components/settings/Notifications.vue @@ -27,7 +27,7 @@
{{ day }} {{ $tc("day", day) }} -
From 8335359ebd8d09147248476651adb15e8dc55fad Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Wed, 6 Dec 2023 00:16:51 +0100 Subject: [PATCH 3/3] removed an unnecessary `Math.max` call --- src/components/notifications/Ntfy.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/notifications/Ntfy.vue b/src/components/notifications/Ntfy.vue index f92cb40eb4..ba94451a28 100644 --- a/src/components/notifications/Ntfy.vue +++ b/src/components/notifications/Ntfy.vue @@ -19,7 +19,7 @@

DOWN - {{ Math.max(5, $parent.notification.ntfyPriority+1) }} + {{ $parent.notification.ntfyPriority + 1 }}