Improved the graph CSS on Shadow.
Fixed a problem with padding on Edge. You now need MoveTopic in the source forum and the destination forum to move a topic rather than just having it in the source forum. Move action posts should show up properly now. Improved the CSS for action posts on Cosora. You can view alerts on Cosora.
This commit is contained in:
parent
2436d9a6fa
commit
cce87e2d70
|
@ -58,6 +58,9 @@ func buildAlert(asid int, event string, elementType string, actorID int, targetU
|
||||||
act = "created a new topic"
|
act = "created a new topic"
|
||||||
topic, err := common.Topics.Get(elementID)
|
topic, err := common.Topics.Get(elementID)
|
||||||
if err != nil {
|
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")
|
return "", errors.New("Unable to find the linked topic")
|
||||||
}
|
}
|
||||||
url = topic.Link
|
url = topic.Link
|
||||||
|
@ -70,6 +73,9 @@ func buildAlert(asid int, event string, elementType string, actorID int, targetU
|
||||||
case "topic":
|
case "topic":
|
||||||
topic, err := common.Topics.Get(elementID)
|
topic, err := common.Topics.Get(elementID)
|
||||||
if err != nil {
|
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")
|
return "", errors.New("Unable to find the linked topic")
|
||||||
}
|
}
|
||||||
url = topic.Link
|
url = topic.Link
|
||||||
|
@ -81,6 +87,9 @@ func buildAlert(asid int, event string, elementType string, actorID int, targetU
|
||||||
case "user":
|
case "user":
|
||||||
targetUser, err = common.Users.Get(elementID)
|
targetUser, err = common.Users.Get(elementID)
|
||||||
if err != nil {
|
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")
|
return "", errors.New("Unable to find the target user")
|
||||||
}
|
}
|
||||||
area = targetUser.Name
|
area = targetUser.Name
|
||||||
|
|
|
@ -340,7 +340,13 @@ func routeMoveTopicSubmit(w http.ResponseWriter, r *http.Request, user common.Us
|
||||||
if ferr != nil {
|
if ferr != nil {
|
||||||
return ferr
|
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 {
|
if !user.Perms.ViewTopic || !user.Perms.MoveTopic {
|
||||||
return common.NoPermissionsJS(w, r, user)
|
return common.NoPermissionsJS(w, r, user)
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,8 @@ function loadAlerts(menuAlerts)
|
||||||
}
|
}
|
||||||
|
|
||||||
if("avatar" in msg) {
|
if("avatar" in msg) {
|
||||||
alist += "<div class='alertItem withAvatar' style='background-image:url(\""+msg.avatar+"\");'><a class='text' data-asid='"+msg.asid+"' href=\""+msg.path+"\">"+mmsg+"</a></div>";
|
alist += "<div class='alertItem withAvatar' style='background-image:url(\""+msg.avatar+"\");'><img src='"+msg.avatar+"' class='bgsub' /><a class='text' data-asid='"+msg.asid+"' href=\""+msg.path+"\">"+mmsg+"</a></div>";
|
||||||
alertList.push("<div class='alertItem withAvatar' style='background-image:url(\""+msg.avatar+"\");'><a class='text' data-asid='"+msg.asid+"' href=\""+msg.path+"\">"+mmsg+"</a></div>");
|
alertList.push("<div class='alertItem withAvatar' style='background-image:url(\""+msg.avatar+"\");'><img src='"+msg.avatar+"' class='bgsub' /><a class='text' data-asid='"+msg.asid+"' href=\""+msg.path+"\">"+mmsg+"</a></div>");
|
||||||
} else {
|
} else {
|
||||||
alist += "<div class='alertItem'><a href=\""+msg.path+"\" class='text'>"+mmsg+"</a></div>";
|
alist += "<div class='alertItem'><a href=\""+msg.path+"\" class='text'>"+mmsg+"</a></div>";
|
||||||
alertList.push("<div class='alertItem'><a href=\""+msg.path+"\" class='text'>"+mmsg+"</a></div>");
|
alertList.push("<div class='alertItem'><a href=\""+msg.path+"\" class='text'>"+mmsg+"</a></div>");
|
||||||
|
|
|
@ -577,6 +577,8 @@ func routeTopicID(w http.ResponseWriter, r *http.Request, user common.User, urlB
|
||||||
case "unstick":
|
case "unstick":
|
||||||
replyItem.ActionType = "This topic has been unpinned by <a href='" + replyItem.UserLink + "'>" + replyItem.CreatedByName + "</a>"
|
replyItem.ActionType = "This topic has been unpinned by <a href='" + replyItem.UserLink + "'>" + replyItem.CreatedByName + "</a>"
|
||||||
replyItem.ActionIcon = "📌︎"
|
replyItem.ActionIcon = "📌︎"
|
||||||
|
case "move":
|
||||||
|
replyItem.ActionType = "This topic has been moved by <a href='" + replyItem.UserLink + "'>" + replyItem.CreatedByName + "</a>"
|
||||||
default:
|
default:
|
||||||
replyItem.ActionType = replyItem.ActionType + " has happened"
|
replyItem.ActionType = replyItem.ActionType + " has happened"
|
||||||
replyItem.ActionIcon = ""
|
replyItem.ActionIcon = ""
|
||||||
|
|
|
@ -187,9 +187,36 @@ ul {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
.alertList {
|
.menu_alerts:not(.selectedAlert) .alertList {
|
||||||
display: none;
|
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 {
|
.rowblock, .colstack_head {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
|
@ -231,6 +258,8 @@ h1, h3 {
|
||||||
-webkit-margin-after: 0;
|
-webkit-margin-after: 0;
|
||||||
margin-block-start: 0;
|
margin-block-start: 0;
|
||||||
margin-block-end: 0;
|
margin-block-end: 0;
|
||||||
|
margin-top: 0px;
|
||||||
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.colstack {
|
.colstack {
|
||||||
|
@ -833,6 +862,16 @@ textarea {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: var(--lightened-primary-text-color);
|
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 {
|
.userinfo .tag_block {
|
||||||
color: var(--extra-lightened-primary-text-color);
|
color: var(--extra-lightened-primary-text-color);
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,6 +193,8 @@ a {
|
||||||
-webkit-margin-after: 0;
|
-webkit-margin-after: 0;
|
||||||
margin-block-start: 0;
|
margin-block-start: 0;
|
||||||
margin-block-end: 0;
|
margin-block-end: 0;
|
||||||
|
margin-top: 0px;
|
||||||
|
margin-bottom: 0px;
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
.rowsmall {
|
.rowsmall {
|
||||||
|
|
|
@ -49,3 +49,17 @@
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
padding-right: 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;
|
||||||
|
}
|
Loading…
Reference in New Issue