From d657db36d6674bcb724a83ab1593de1a8015fb36 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sat, 21 May 2022 18:11:15 +0200 Subject: [PATCH] fix: regex to replace url to a clickable link in notifictiaons (#832) * fix: wrap too long lines in notifications Signed-off-by: Stefan Dej * fix: regex to replace url to a link in notification description text Signed-off-by: Stefan Dej --- .../notifications/NotificationMenuEntry.vue | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/components/notifications/NotificationMenuEntry.vue b/src/components/notifications/NotificationMenuEntry.vue index a8439715..55cdc2e6 100644 --- a/src/components/notifications/NotificationMenuEntry.vue +++ b/src/components/notifications/NotificationMenuEntry.vue @@ -1,5 +1,5 @@ -

+

$1') + return this.entry.description.replace( + /(\bhttps?:\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/gim, + '$1' + ) } get alertColor() { @@ -153,4 +158,12 @@ export default class NotificationMenuEntry extends Mixins(BaseMixin) { .notification-menu-entry__headline { line-height: 1.2; } + +.notification-menu-entry__description { + max-width: 292px; +} + +.notification-menu-entry--priority-critical .notification-menu-entry__description { + max-width: 336px; +}