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"
|
||||
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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -65,8 +65,8 @@ function loadAlerts(menuAlerts)
|
|||
}
|
||||
|
||||
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>";
|
||||
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>");
|
||||
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+"\");'><img src='"+msg.avatar+"' class='bgsub' /><a class='text' data-asid='"+msg.asid+"' href=\""+msg.path+"\">"+mmsg+"</a></div>");
|
||||
} else {
|
||||
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>");
|
||||
|
|
|
@ -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 <a href='" + replyItem.UserLink + "'>" + replyItem.CreatedByName + "</a>"
|
||||
replyItem.ActionIcon = "📌︎"
|
||||
case "move":
|
||||
replyItem.ActionType = "This topic has been moved by <a href='" + replyItem.UserLink + "'>" + replyItem.CreatedByName + "</a>"
|
||||
default:
|
||||
replyItem.ActionType = replyItem.ActionType + " has happened"
|
||||
replyItem.ActionIcon = ""
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue