From 17fbb3a31243cadf958070a7e765b47b01181571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20F=C3=A4th?= Date: Thu, 16 May 2019 13:42:48 +0200 Subject: [PATCH 1/3] Change icon to bell --- src/components/activitylog.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/activitylog.js b/src/components/activitylog.js index 6d56e96a56..c506013fcb 100644 --- a/src/components/activitylog.js +++ b/src/components/activitylog.js @@ -5,13 +5,14 @@ define(["events", "globalize", "dom", "datetime", "userSettings", "serverNotific var html = ""; html += '
'; var color = "Error" == entry.Severity || "Fatal" == entry.Severity || "Warn" == entry.Severity ? "#cc0000" : "#00a4dc"; + var icon = "Error" == entry.Severity || "Fatal" == entry.Severity || "Warn" == entry.Severity ? "notification_important" : "notifications"; if (entry.UserId && entry.UserPrimaryImageTag) { html += 'dvr" - } else html += 'dvr'; + } else html += '' + icon + ''; html += '
', html += '
', html += entry.Name, html += "
", html += '
'; var date = datetime.parseISO8601Date(entry.Date, !0); return html += datetime.toLocaleString(date).toLowerCase(), html += "
", html += '
', html += entry.ShortOverview || "", html += "
", html += "
", entry.Overview && (html += ''), html += "
" @@ -86,4 +87,4 @@ define(["events", "globalize", "dom", "datetime", "userSettings", "serverNotific var onUpdate = this.updateFn; onUpdate && events.off(serverNotifications, "ActivityLogEntry", onUpdate), this.items = null, this.options = null }, ActivityLog -}); \ No newline at end of file +}); From 97d739514853f99893e2793d752fa08a1d26dbc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20F=C3=A4th?= Date: Sun, 19 May 2019 15:53:26 +0200 Subject: [PATCH 2/3] use if --- src/components/activitylog.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/activitylog.js b/src/components/activitylog.js index c506013fcb..3942e6d754 100644 --- a/src/components/activitylog.js +++ b/src/components/activitylog.js @@ -4,8 +4,14 @@ define(["events", "globalize", "dom", "datetime", "userSettings", "serverNotific function getEntryHtml(entry, apiClient) { var html = ""; html += '
'; - var color = "Error" == entry.Severity || "Fatal" == entry.Severity || "Warn" == entry.Severity ? "#cc0000" : "#00a4dc"; - var icon = "Error" == entry.Severity || "Fatal" == entry.Severity || "Warn" == entry.Severity ? "notification_important" : "notifications"; + if ("Error" == entry.Severity || "Fatal" == entry.Severity || "Warn" == entry.Severity) { + var color = "#cc0000"; + var icon = "notification_important"; + } + else { + var color = "#00a4dc"; + var icon = "notifications"; + } if (entry.UserId && entry.UserPrimaryImageTag) { html += ' Date: Wed, 22 May 2019 10:52:48 +0200 Subject: [PATCH 3/3] improve style --- src/components/activitylog.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/activitylog.js b/src/components/activitylog.js index 3942e6d754..a6206477e7 100644 --- a/src/components/activitylog.js +++ b/src/components/activitylog.js @@ -4,13 +4,11 @@ define(["events", "globalize", "dom", "datetime", "userSettings", "serverNotific function getEntryHtml(entry, apiClient) { var html = ""; html += '
'; + var color = "#00a4dc"; + var icon = "notifications"; if ("Error" == entry.Severity || "Fatal" == entry.Severity || "Warn" == entry.Severity) { - var color = "#cc0000"; - var icon = "notification_important"; - } - else { - var color = "#00a4dc"; - var icon = "notifications"; + color = "#cc0000"; + icon = "notification_important"; } if (entry.UserId && entry.UserPrimaryImageTag) { html += 'dvr" - } else html += '' + icon + ''; + } else { + html += '' + icon + ''; + } html += '
', html += '
', html += entry.Name, html += "
", html += '
'; var date = datetime.parseISO8601Date(entry.Date, !0); return html += datetime.toLocaleString(date).toLowerCase(), html += "
", html += '
', html += entry.ShortOverview || "", html += "
", html += "
", entry.Overview && (html += ''), html += "
"