diff --git a/alerts.go b/alerts.go index 137dba58..dbc920d5 100644 --- a/alerts.go +++ b/alerts.go @@ -58,6 +58,9 @@ func buildAlert(asid int, event string, elementType string, actorID int, targetU act = "created a new topic" topic, err := common.Topics.Get(elementID) if err != nil { + if common.Dev.DebugMode { + log.Print("Unable to find linked topic " + strconv.Itoa(elementID)) + } return "", errors.New("Unable to find the linked topic") } url = topic.Link @@ -70,6 +73,9 @@ func buildAlert(asid int, event string, elementType string, actorID int, targetU case "topic": topic, err := common.Topics.Get(elementID) if err != nil { + if common.Dev.DebugMode { + log.Print("Unable to find linked topic " + strconv.Itoa(elementID)) + } return "", errors.New("Unable to find the linked topic") } url = topic.Link @@ -81,6 +87,9 @@ func buildAlert(asid int, event string, elementType string, actorID int, targetU case "user": targetUser, err = common.Users.Get(elementID) if err != nil { + if common.Dev.DebugMode { + log.Print("Unable to find target user " + strconv.Itoa(elementID)) + } return "", errors.New("Unable to find the target user") } area = targetUser.Name diff --git a/mod_routes.go b/mod_routes.go index ff79f642..4539624a 100644 --- a/mod_routes.go +++ b/mod_routes.go @@ -340,7 +340,13 @@ func routeMoveTopicSubmit(w http.ResponseWriter, r *http.Request, user common.Us if ferr != nil { return ferr } - // TODO: Make sure the mod has MoveTopic in the destination forum too + if !user.Perms.ViewTopic || !user.Perms.MoveTopic { + return common.NoPermissionsJS(w, r, user) + } + _, ferr = common.SimpleForumUserCheck(w, r, &user, fid) + if ferr != nil { + return ferr + } if !user.Perms.ViewTopic || !user.Perms.MoveTopic { return common.NoPermissionsJS(w, r, user) } diff --git a/public/global.js b/public/global.js index 842d0c29..67bff5ce 100644 --- a/public/global.js +++ b/public/global.js @@ -65,8 +65,8 @@ function loadAlerts(menuAlerts) } if("avatar" in msg) { - alist += "
"; - alertList.push(""); + alist += ""; + alertList.push(""); } else { alist += ""; alertList.push(""); diff --git a/routes.go b/routes.go index 9586ccb9..c11491a4 100644 --- a/routes.go +++ b/routes.go @@ -577,6 +577,8 @@ func routeTopicID(w http.ResponseWriter, r *http.Request, user common.User, urlB case "unstick": replyItem.ActionType = "This topic has been unpinned by " + replyItem.CreatedByName + "" replyItem.ActionIcon = "📌︎" + case "move": + replyItem.ActionType = "This topic has been moved by " + replyItem.CreatedByName + "" default: replyItem.ActionType = replyItem.ActionType + " has happened" replyItem.ActionIcon = "" diff --git a/themes/cosora/public/main.css b/themes/cosora/public/main.css index 14916699..8ce1bbf2 100644 --- a/themes/cosora/public/main.css +++ b/themes/cosora/public/main.css @@ -187,9 +187,36 @@ ul { margin-bottom: 12px; margin-top: 0px; } -.alertList { +.menu_alerts:not(.selectedAlert) .alertList { display: none; } +.alertList { + position: fixed; + top: 54px; + left: 0px; + background: var(--element-background-color); + border: 1px solid var(--element-border-color); + border-bottom: 2px solid var(--element-border-color); +} +.alertList .alertItem { + padding: 12px; +} +.alertItem.withAvatar { + background-image: none !important; + padding-left: 12px; + font-size: 15px; + display: flex; +} +.alertItem.withAvatar:not(:last-child) .text { + border-bottom: 1px solid var(--element-border-color); + margin-top: 8px; +} +.alertItem .bgsub { + width: 32px; + height: 32px; + border-radius: 30px; + margin-right: 12px; +} .rowblock, .colstack_head { margin-bottom: 12px; @@ -231,6 +258,8 @@ h1, h3 { -webkit-margin-after: 0; margin-block-start: 0; margin-block-end: 0; + margin-top: 0px; + margin-bottom: 0px; } .colstack { @@ -833,6 +862,16 @@ textarea { font-size: 18px; color: var(--lightened-primary-text-color); } +.action_item .userinfo { + display: none; +} +.action_item .content_container { + display: flex; + flex-direction: row; +} +.action_item .action_icon { + display: none; +} .userinfo .tag_block { color: var(--extra-lightened-primary-text-color); } diff --git a/themes/shadow/public/main.css b/themes/shadow/public/main.css index 54681802..f0314450 100644 --- a/themes/shadow/public/main.css +++ b/themes/shadow/public/main.css @@ -193,6 +193,8 @@ a { -webkit-margin-after: 0; margin-block-start: 0; margin-block-end: 0; + margin-top: 0px; + margin-bottom: 0px; display: inline; } .rowsmall { diff --git a/themes/shadow/public/panel.css b/themes/shadow/public/panel.css index 2e938511..6a3ef29e 100644 --- a/themes/shadow/public/panel.css +++ b/themes/shadow/public/panel.css @@ -48,4 +48,18 @@ content: " || "; padding-left: 2px; padding-right: 2px; +} + +.colstack_graph_holder { + background-color: var(--main-block-color); + padding: 10px; +} +.ct-label { + color: var(--input-text-color) !important; +} +.ct-chart-line, .ct-grid { + stroke: var(--input-text-color) !important; +} +.ct-series-a .ct-bar, .ct-series-a .ct-line, .ct-series-a .ct-point, .ct-series-a .ct-slice-donut { + stroke: hsl(359,98%,43%) !important; } \ No newline at end of file