Fix the resources not being invalidated properly.

Tweak the convo list styling.
This commit is contained in:
Azareal 2019-09-01 09:39:39 +10:00
parent 218e177a29
commit 92a8706709
6 changed files with 29 additions and 5 deletions

View File

@ -6,6 +6,7 @@ import (
"runtime" "runtime"
"sync" "sync"
"time" "time"
"log"
p "github.com/Azareal/Gosora/common/phrases" p "github.com/Azareal/Gosora/common/phrases"
) )
@ -51,7 +52,8 @@ type Header struct {
} }
func (h *Header) AddScript(name string) { func (h *Header) AddScript(name string) {
if name[0] == '/' && name[1] != '/' { if name[0] == '/' && name[1] == '/' {
} else {
// TODO: Use a secondary static file map to avoid this concatenation? // TODO: Use a secondary static file map to avoid this concatenation?
file, ok := StaticFiles.Get("/s/" + name) file, ok := StaticFiles.Get("/s/" + name)
if ok { if ok {
@ -63,7 +65,8 @@ func (h *Header) AddScript(name string) {
} }
func (h *Header) AddPreScriptAsync(name string) { func (h *Header) AddPreScriptAsync(name string) {
if name[0] == '/' && name[1] != '/' { if name[0] == '/' && name[1] == '/' {
} else {
file, ok := StaticFiles.Get("/s/" + name) file, ok := StaticFiles.Get("/s/" + name)
if ok { if ok {
name = file.OName name = file.OName
@ -73,7 +76,8 @@ func (h *Header) AddPreScriptAsync(name string) {
} }
func (h *Header) AddScriptAsync(name string) { func (h *Header) AddScriptAsync(name string) {
if name[0] == '/' && name[1] != '/' { if name[0] == '/' && name[1] == '/' {
} else {
file, ok := StaticFiles.Get("/s/" + name) file, ok := StaticFiles.Get("/s/" + name)
if ok { if ok {
name = file.OName name = file.OName
@ -87,7 +91,8 @@ func (h *Header) AddScriptAsync(name string) {
}*/ }*/
func (h *Header) AddSheet(name string) { func (h *Header) AddSheet(name string) {
if name[0] == '/' && name[1] != '/' { if name[0] == '/' && name[1] == '/' {
} else {
file, ok := StaticFiles.Get("/s/" + name) file, ok := StaticFiles.Get("/s/" + name)
if ok { if ok {
name = file.OName name = file.OName

View File

@ -4,7 +4,7 @@
{{if not .CurrentUser.IsBanned}}<h2><a href="/user/convos/create/">Create Convo</a></h2>{{end}} {{if not .CurrentUser.IsBanned}}<h2><a href="/user/convos/create/">Create Convo</a></h2>{{end}}
</div> </div>
</div> </div>
<div class="colstack_item"> <div class="colstack_item convos_list">
{{range .Convos}} {{range .Convos}}
<div class="rowitem"> <div class="rowitem">
<span class="to_left"> <span class="to_left">

View File

@ -0,0 +1,6 @@
.rowhead .rowitem {
display: flex;
}
.convos_item_user:not(:last-child):after {
content: ",";
}

View File

@ -1,6 +1,13 @@
.rowhead .rowitem,
.convos_list .rowitem {
display: flex;
}
.convos_item_user:not(:last-child):after { .convos_item_user:not(:last-child):after {
content: ","; content: ",";
} }
.to_right {
margin-left: auto;
}
.parti { .parti {
margin-bottom: 8px; margin-bottom: 8px;

View File

@ -0,0 +1,3 @@
.convos_item_user:not(:last-child):after {
content: ",";
}

View File

@ -0,0 +1,3 @@
.convos_item_user:not(:last-child):after {
content: ",";
}