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 à :
Parent
cc4e0fe5c0
révision
e8dfeaea4a
6 fichiers modifiés avec 23 ajouts et 14 suppressions
|
@ -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})
|
||||
}
|
||||
|
|
|
@ -1236,6 +1236,9 @@ html, body {
|
|||
max-height: 500px;
|
||||
}
|
||||
|
||||
.comment-content :first-child {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.comment-content :last-child {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -90,3 +90,4 @@
|
|||
* - removed: old
|
||||
## 2017/11/04
|
||||
* + nsfw_content
|
||||
* + generating_torrent_failed
|
||||
|
|
|
@ -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"
|
||||
|
|
Référencer dans un nouveau ticket