Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0

Fix report creation from report template for anonymous users & small css adjustement (#1712)

* Fix report creation from report template for anonymous users

* small adjustement for styling of usernames in comment

* lower margin-top for comment content

* Update en-us.all.json

* Update CHANGELOG.md

* fix torrent link button's styling getting messed up from
Cette révision appartient à :
kilo 2017-11-05 07:43:53 +01:00 révisé par GitHub
Parent cc4e0fe5c0
révision e8dfeaea4a
Signature inconnue de Forgejo
ID de la clé GPG: 4AEE18F83AFDEB23
6 fichiers modifiés avec 23 ajouts et 14 suppressions

Voir le fichier

@ -59,17 +59,14 @@ func ReportViewTorrentHandler(c *gin.Context) {
id, _ := strconv.ParseInt(c.Param("id"), 10, 32)
messages := msg.GetMessages(c)
currentUser := router.GetUser(c)
if currentUser.ID > 0 {
torrent, err := torrents.FindByID(uint(id))
if err != nil {
messages.Error(err)
}
captchaID := ""
if currentUser.NeedsCaptcha() {
captchaID = captcha.GetID()
}
templates.Form(c, "site/torrents/report.jet.html", Report{torrent.ID, captchaID})
} else {
c.Status(404)
torrent, err := torrents.FindByID(uint(id))
if err != nil {
messages.Error(err)
}
captchaID := ""
if currentUser.ID == 0 {
captchaID = captcha.GetID()
}
templates.Form(c, "site/torrents/report.jet.html", Report{torrent.ID, captchaID})
}

Voir le fichier

@ -1236,6 +1236,9 @@ html, body {
max-height: 500px;
}
.comment-content :first-child {
margin-top: 8px;
}
.comment-content :last-child {
margin-bottom: 2px;
}

Voir le fichier

@ -337,6 +337,10 @@ span.comment-index+p {
text-decoration: none;
line-height: 22px;
}
span.comment-user:hover {
text-decoration: none;
}
.comment-user:hover {
text-decoration: underline;
}

Voir le fichier

@ -364,14 +364,14 @@ Modal.Init({
Query.Get('/download/{{Torrent.Hash}}?js_query=true', function (data) {
if(typeof data.exists != "undefined" && data.exists == true) {
torrentLink.innerHTML = oldDownloadHtml
torrentLink.style = torrentLink.style + "opacity: 1!important;filter: grayscale(0);"
torrentLink.style = torrentLink.style.cssText + "opacity: 1!important;filter: grayscale(0);"
torrentLink.removeEventListener("click", function (e) {});
torrentLink.click();
} else {
if(new Date() - firstQueryDate < 20000)
setTimeout(fileCreated, 3000)
else {
torrentLink.innerHTML = downloadIconHtml + "Could not generate torrent file"
torrentLink.innerHTML = downloadIconHtml + "{{T("generating_torrent_failed")}}"
torrentLink.removeEventListener("click", function (e) {});
disabledLink = true
}

Voir le fichier

@ -90,3 +90,4 @@
* - removed: old
## 2017/11/04
* + nsfw_content
* + generating_torrent_failed

Voir le fichier

@ -2183,6 +2183,10 @@
"id": "generating_torrent",
"translation": "Generating torrent file..."
},
{
"id": "generating_torrent_failed",
"translation": "Could not generate torrent file"
},
{
"id": "enabled",
"translation": "Enabled"