Remove inline CSS for log pages.

Darken links on hover in Nox.
Add another group.CanSee test.
This commit is contained in:
Azareal 2019-06-28 09:35:34 +10:00
parent 55382dfdb1
commit 8cf9badd46
9 changed files with 60 additions and 30 deletions

View File

@ -784,6 +784,7 @@ func TestForumPermsStore(t *testing.T) {
}
// TODO: Test the group permissions
// TODO: Test group.CanSee for forum presets + group perms
func TestGroupStore(t *testing.T) {
miscinit(t)
if !c.PluginsInited {
@ -823,7 +824,7 @@ func TestGroupStore(t *testing.T) {
expect(t, group.IsAdmin, "This should be an admin group")
expect(t, group.IsMod, "This should be a mod group")
expect(t, !group.IsBanned, "This shouldn't be a ban group")
// TODO: Add a proper CanSee test
expect(t, len(group.CanSee) == 0, "group.CanSee should be empty")
isAdmin = false
isMod = true

View File

@ -1,17 +1,18 @@
<div class="colstack_item colstack_head rowhead">
<div class="rowitem"><h1>{{lang "account_logins_head"}}</h1></div>
</div>
<div class="colstack_item rowlist">
<div class="colstack_item rowlist loglist">
<!-- TODO: Do we need this inline CSS? -->
{{range .ItemList}}
<div class="rowitem{{if not .Success}} bg_red{{end}}">
<span style="float: left;">
<span class="to_left">
<span>{{if .Success}}{{lang "account_logins_success"}}{{else}}{{lang "account_logins_failure"}}"{{end}}</span><br />
<small style="margin-left: 2px;font-size: 12px;" title="{{.IPAddress}}">{{.IPAddress}}</small>
<small title="{{.IPAddress}}">{{.IPAddress}}</small>
</span>
<span class="to_right">
<span style="font-size: 14px;" title="{{.DoneAt}}">{{.DoneAt}}</span>
<span title="{{.DoneAt}}">{{.DoneAt}}</span>
</span>
<div style="clear:both;"></div>
</div>
{{end}}
</div>

View File

@ -1,15 +1,15 @@
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel_logs_administration_head"}}</h1></div>
</div>
<div id="panel_modlogs" class="colstack_item rowlist">
<div id="panel_modlogs" class="colstack_item rowlist loglist">
{{range .Logs}}
<div class="rowitem panel_compactrow">
<span style="float: left;">
<span class="to_left">
<span>{{.Action}}</span>
{{if $.CurrentUser.Perms.ViewIPs}}<br /><small style="margin-left: 2px;font-size: 12px;" title="{{.IPAddress}}">{{.IPAddress}}</small>{{end}}
{{if $.CurrentUser.Perms.ViewIPs}}<br /><small title="{{.IPAddress}}">{{.IPAddress}}</small>{{end}}
</span>
<span class="to_right">
<span style="font-size: 14px;" title="{{.DoneAt}}">{{.DoneAt}}</span>
<span title="{{.DoneAt}}">{{.DoneAt}}</span>
</span>
<div style="clear:both;"></div>
</div>

View File

@ -1,15 +1,15 @@
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel_logs_moderation_head"}}</h1></div>
</div>
<div id="panel_modlogs" class="colstack_item rowlist">
<div id="panel_modlogs" class="colstack_item rowlist loglist">
{{range .Logs}}
<div class="rowitem panel_compactrow">
<span style="float: left;">
<span class="to_left">
<span>{{.Action}}</span>
{{if $.CurrentUser.Perms.ViewIPs}}<br /><small style="margin-left: 2px;font-size: 12px;" title="{{.IPAddress}}">{{.IPAddress}}</small>{{end}}
{{if $.CurrentUser.Perms.ViewIPs}}<br /><small title="{{.IPAddress}}">{{.IPAddress}}</small>{{end}}
</span>
<span class="to_right">
<span style="font-size: 14px;" title="{{.DoneAt}}">{{.DoneAt}}</span>
<span title="{{.DoneAt}}">{{.DoneAt}}</span>
</span>
<div style="clear:both;"></div>
</div>

View File

@ -1,15 +1,15 @@
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel_logs_registration_head"}}</h1></div>
</div>
<div id="panel_modlogs" class="colstack_item rowlist">
<div id="panel_modlogs" class="colstack_item rowlist loglist">
{{range .Logs}}
<div class="rowitem panel_compactrow{{if not .Success}} bg_red{{end}}">
<span{{if not .Success}} class="panel_registration_attempt"{{end}} style="float: left;">
<span class="to_left{{if not .Success}} panel_registration_attempt{{end}}">
<span>{{if not .Success}}{{lang "panel_logs_registration_attempt"}}: {{end}}{{.Username}} ({{lang "panel_logs_registration_email"}}: {{.Email}}){{if .ParsedReason}} ({{lang "panel_logs_registration_reason"}}: {{.ParsedReason}}){{end}}</span>
{{if $.CurrentUser.Perms.ViewIPs}}<br /><small style="margin-left: 2px;font-size: 12px;" title="{{.IPAddress}}">{{.IPAddress}}</small>{{end}}
{{if $.CurrentUser.Perms.ViewIPs}}<br /><small title="{{.IPAddress}}">{{.IPAddress}}</small>{{end}}
</span>
<span class="to_right">
<span style="font-size: 14px;" title="{{.DoneAt}}">{{.DoneAt}}</span>
<span title="{{.DoneAt}}">{{.DoneAt}}</span>
</span>
<div style="clear:both;"></div>
</div>

View File

@ -786,6 +786,14 @@ textarea {
padding: 16px;
}
.loglist .to_left small {
margin-left: 2px;
font-size: 12px;
}
.loglist .to_right span {
font-size: 14px;
}
.topic_list .rowtopic {
font-size: 16px;
margin-right: 1px;

View File

@ -15,6 +15,9 @@ a {
color: #eeeeee;
text-decoration: none;
}
a:hover {
color: #cccccc;
}
nav.nav {
background: {{$darkest_bg}};
@ -1110,6 +1113,10 @@ input[type=checkbox]:checked + label .sel {
margin-left: 0px;
margin-top: 0px;
}
.loglist .to_left small {
margin-left: 2px;
font-size: 12px;
}
.ip_search_block {
margin-bottom: 12px;

View File

@ -223,6 +223,9 @@ h1, h2, h3, h4, h5 {
}
/* Align to right in a flex head */
.to_left {
float: left;
}
.to_right {
float: right;
margin-left: auto;
@ -231,8 +234,7 @@ h1, h2, h3, h4, h5 {
/* Topic View */
/* TODO: How should we handle the sticky headers? */
.topic_sticky_head {
}
.topic_sticky_head {}
/* TODO: Add the avatars to the forum list */
.forum_list .forum_nodesc {
@ -515,6 +517,13 @@ textarea.large {
.rowlist .formrow, .rowlist .formrow:first-child {
margin-top: 0px;
}
.loglist .to_left small {
margin-left: 2px;
font-size: 12px;
}
.loglist .to_right span {
font-size: 14px;
}
input {
background-color: var(--input-background-color);
@ -1166,10 +1175,7 @@ blockquote:first-child {
.topic_list .topic_left {
width: 100%;
}
.topic_list .topic_right {
display: none;
}
#poweredBy span {
.topic_list .topic_right, #poweredBy span {
display: none;
}
}

View File

@ -343,6 +343,9 @@ h1, h2, h3, h4, h5 {
display: none;
}
.to_left {
float: left;
}
.to_right {
margin-left: auto;
float: right;
@ -355,6 +358,13 @@ h1, h2, h3, h4, h5 {
padding-top: 10px;
padding-bottom: 10px;
}
.loglist .to_left small {
margin-left: 2px;
font-size: 12px;
}
.loglist .to_right span {
font-size: 14px;
}
.bgsub {
display: none;
}
@ -570,10 +580,7 @@ input, select {
.quick_create_form .quick_button_row .formitem {
display: flex;
}
.quick_create_form .formbutton:first-child {
margin-left: 0px;
margin-right: 5px;
}
.quick_create_form .formbutton:first-child,
.quick_create_form .formbutton:not(:first-child) {
margin-left: 0px;
margin-right: 5px;