The user box on Nox should be highlighted now when there's a new alert.
Removed some notes as they're not really needed now that I've refactored the alert builder.
This commit is contained in:
parent
0b44d69efc
commit
436c53f653
|
@ -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?
|
// TODO: See if we can json.Marshal instead?
|
||||||
func escapeTextInJson(in string) string {
|
func escapeTextInJson(in string) string {
|
||||||
in = strings.Replace(in, "\"", "\\\"", -1)
|
in = strings.Replace(in, "\"", "\\\"", -1)
|
||||||
|
|
|
@ -110,6 +110,11 @@ li a {
|
||||||
padding-bottom: 11px;
|
padding-bottom: 11px;
|
||||||
padding-left: 12px;
|
padding-left: 12px;
|
||||||
}
|
}
|
||||||
|
.user_box.has_alerts {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
border: 1px solid #444444;
|
||||||
|
}
|
||||||
.user_box img {
|
.user_box img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 36px;
|
width: 36px;
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
(() => {
|
(() => {
|
||||||
addInitHook("after_update_alert_list", () => {
|
addInitHook("after_update_alert_list", () => {
|
||||||
if(alertCount==0) {
|
if(alertCount==0) {
|
||||||
$(".alerts").html("No new alerts")
|
$(".alerts").html("No new alerts");
|
||||||
|
$(".user_box").removeClass("has_alerts");
|
||||||
} else {
|
} else {
|
||||||
$(".alerts").html(alertCount + " new alerts")
|
$(".alerts").html(alertCount + " new alerts");
|
||||||
|
$(".user_box").addClass("has_alerts");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in New Issue