diff --git a/models/tag/helpers.go b/models/tag/helpers.go index fd4da8a8..4c711138 100644 --- a/models/tag/helpers.go +++ b/models/tag/helpers.go @@ -26,12 +26,14 @@ func Filter(tag string, tagType string, torrentID uint) bool { if err != nil { log.CheckErrorWithMessage(err, "USER_NOT_FOUND: Couldn't update pantsu points!") } - if toDelete.Tag == tag { - user.IncreasePantsu() - } else { - user.DecreasePantsu() + if user.ID > 0 { + if toDelete.Tag == tag { + user.IncreasePantsu() + } else { + user.DecreasePantsu() + } + user.Update() } - user.Update() toDelete.Delete() } /* err := DeleteAllType(tagType, torrentID) // We can also delete them in batch diff --git a/public/css/main.css b/public/css/main.css index c9cd2ad1..5a868e08 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1588,8 +1588,12 @@ details[open] summary:after { margin-bottom:1rem; } +span.tag-text { + margin: 2px 0.5rem; + display: inline-block; +} + span.tag { - padding: 2px 0.5rem; border-radius: 1rem; box-shadow: 0px 0px 1px 0px black; } @@ -1600,15 +1604,27 @@ span.tag { .tag.pending { background: #1d6d90; + color: white; } -.tag a.tag-form.plus { +.tag.pending .tag-text { + margin-right: 0; +} + +.tag a.tag-form.plus:after { content: '+'; } -.tag a.tag-form.minus { +.tag a.tag-form.minus:after { content: '-'; } +.tag.pending a.tag-form { + border-top-right-radius: 1rem; + border-bottom-right-radius: 1rem; + padding: 2px 0.5rem; + display: inline-block; + background: white; +} /* Language specific CSS */ diff --git a/templates/site/torrents/view.jet.html b/templates/site/torrents/view.jet.html index 01b65576..c81ba9fc 100644 --- a/templates/site/torrents/view.jet.html +++ b/templates/site/torrents/view.jet.html @@ -68,8 +68,10 @@ {{ T("torrent_tags")}}: {{ range Torrent.Tags}} - + + {{ T("tagtype_" + .Type) }}: {{ .Tag }} + {{ if .Accepted == false }} {{ end }}