diff --git a/common/alerts.go b/common/alerts.go index 1c560b67..02131cc4 100644 --- a/common/alerts.go +++ b/common/alerts.go @@ -43,21 +43,6 @@ func init() { }) } -// These notes are for me, don't worry about it too much ^_^ -/* -"You received a friend invite from {user}" -"{x}{mentioned you on}{user}{'s profile}" -"{x}{mentioned you in}{topic}" -"{x}{likes}{you}" -"{x}{liked}{your topic}{topic}" -"{x}{liked}{your post on}{user}{'s profile}" todo -"{x}{liked}{your post in}{topic}" -"{x}{replied to}{your post in}{topic}" todo -"{x}{replied to}{topic}" -"{x}{replied to}{your topic}{topic}" -"{x}{created a new topic}{topic}" -*/ - // TODO: See if we can json.Marshal instead? func escapeTextInJson(in string) string { in = strings.Replace(in, "\"", "\\\"", -1) diff --git a/themes/nox/public/main.css b/themes/nox/public/main.css index 84b292be..7bfb1416 100644 --- a/themes/nox/public/main.css +++ b/themes/nox/public/main.css @@ -110,6 +110,11 @@ li a { padding-bottom: 11px; padding-left: 12px; } +.user_box.has_alerts { + padding-top: 10px; + padding-bottom: 10px; + border: 1px solid #444444; +} .user_box img { display: block; width: 36px; diff --git a/themes/nox/public/misc.js b/themes/nox/public/misc.js index d17ce72a..59a23503 100644 --- a/themes/nox/public/misc.js +++ b/themes/nox/public/misc.js @@ -3,9 +3,11 @@ (() => { addInitHook("after_update_alert_list", () => { if(alertCount==0) { - $(".alerts").html("No new alerts") + $(".alerts").html("No new alerts"); + $(".user_box").removeClass("has_alerts"); } else { - $(".alerts").html(alertCount + " new alerts") + $(".alerts").html(alertCount + " new alerts"); + $(".user_box").addClass("has_alerts"); } }) })();