From ee0ffde9e697273f44826a7be99dfcd14af887b2 Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 28 Oct 2017 21:52:24 +0200 Subject: [PATCH 001/191] Update tomorrow.css --- public/css/themes/tomorrow.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/themes/tomorrow.css b/public/css/themes/tomorrow.css index ff5bbaa9..b5e4a1b1 100644 --- a/public/css/themes/tomorrow.css +++ b/public/css/themes/tomorrow.css @@ -348,5 +348,5 @@ span.tag { } #subscribe-link::before, #subscribe-link::after { - color: #c5c8c6; + color: #c5c8c6!important; } From 5d03312eb5d9556cf9c2e985735f951cdbc3b95e Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 28 Oct 2017 22:47:05 +0200 Subject: [PATCH 002/191] Update main.css --- public/css/main.css | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/public/css/main.css b/public/css/main.css index e7e01042..0bc87275 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -2348,6 +2348,48 @@ form.delete-form button.form-input.btn-red { bottom: 9px; } +#clear-notification { + bottom: 8px; + right: 8px; + position: absolute; + width: calc(100% - 16px); +} +#clear-notification a { + float: right; + margin-left: 3px; +} +.notification-table { + margin-bottom: 44px; +} +.notification-table td { + text-align: center; + padding: 6px 0; + border-bottom: 1px solid; +} +.notification-table tr:hover td { + filter: brightness(1.2); +} +.notification-status { + width: 140px; +} +.notification-event { + text-align: left!important; + padding: 6px 10px!important; +} +.notification-date { + width: 195px; +} +td.notification-status { + border: 1px solid black; +} +td.notification-status { + background-color: #e4e4e4; +} +td.notification-status.notification-unread { + background-color: rgb(161, 211, 253); + color: white; +} + /* Language specific CSS */ html[lang="ja-jp"] .form-refine span.spacing { From 28b44995c44a9883f001fbaaadd57c45256f8ae3 Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 28 Oct 2017 22:47:31 +0200 Subject: [PATCH 003/191] Update tomorrow.css --- public/css/themes/tomorrow.css | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/public/css/themes/tomorrow.css b/public/css/themes/tomorrow.css index b5e4a1b1..8d69921d 100644 --- a/public/css/themes/tomorrow.css +++ b/public/css/themes/tomorrow.css @@ -348,5 +348,13 @@ span.tag { } #subscribe-link::before, #subscribe-link::after { - color: #c5c8c6!important; + color: #c5c8c6; +} + +td.notification-status { + background-color: #505255; +} +td.notification-status.notification-unread { + background-color: rgba(144, 103, 24, 0.4); + color: white; } From f7587c122ba46483bc5110655b61e8bc89f984d7 Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 28 Oct 2017 22:47:43 +0200 Subject: [PATCH 004/191] Update tomorrow.css --- public/css/themes/tomorrow.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/themes/tomorrow.css b/public/css/themes/tomorrow.css index 8d69921d..0ec85138 100644 --- a/public/css/themes/tomorrow.css +++ b/public/css/themes/tomorrow.css @@ -356,5 +356,5 @@ td.notification-status { } td.notification-status.notification-unread { background-color: rgba(144, 103, 24, 0.4); - color: white; + color: #c5c8c6; } From 28ffbf45344555c7bf27ab2b089bc950f218b21e Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 28 Oct 2017 22:49:24 +0200 Subject: [PATCH 005/191] Update CHANGELOG.md --- translations/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/translations/CHANGELOG.md b/translations/CHANGELOG.md index fb75ea94..5074768c 100644 --- a/translations/CHANGELOG.md +++ b/translations/CHANGELOG.md @@ -65,3 +65,9 @@ ## 2017/10/28 * + hours_minutes_ago * + days_hours_ago +* + status +* + event +* + read +* + unread +* + clear_all_notifications +* ~ clear_notifications -> modified to "Clear **unread** notification" From 016b4adfc6015344dd876a99cf8a6cb5e9667c71 Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 28 Oct 2017 22:49:42 +0200 Subject: [PATCH 006/191] add translation strings --- translations/en-us.all.json | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/translations/en-us.all.json b/translations/en-us.all.json index d98679ae..e6a41a37 100644 --- a/translations/en-us.all.json +++ b/translations/en-us.all.json @@ -829,7 +829,11 @@ }, { "id": "clear_notifications", - "translation": "Clear Notifications" + "translation": "Clear unread notifications" + }, + { + "id": "clear_all_notifications", + "translation": "Clear all notifications" }, { "id": "notifications_cleared", @@ -2186,6 +2190,21 @@ { "id": "days_hours_ago", "translation": "{0} days {1} hours ago" + }, + { + "id": "status", + "translation": "Status" + }, + { + "id": "event", + "translation": "Event" + }, + { + "id": "read", + "translation": "Read" + }, + { + "id": "unread", + "translation": "Unread" } ] - From 522cd0f5bb93d79a8dbb9604406b41969053d735 Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 28 Oct 2017 22:50:39 +0200 Subject: [PATCH 007/191] redesign of notification, html --- templates/site/user/notifications.jet.html | 49 +++++++++++++--------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/templates/site/user/notifications.jet.html b/templates/site/user/notifications.jet.html index 8a94cfbc..6a510d84 100644 --- a/templates/site/user/notifications.jet.html +++ b/templates/site/user/notifications.jet.html @@ -3,25 +3,36 @@ {{block title()}}{{ T("profile_edit_page", User.Username) }}{{end}} {{ block profile_navigation()}}{{ yield profile_menu(route="profile") }}{{end}} {{block profile_content()}} -{{ if len(User.Notifications) > 0}} - - +
+ + + + + + + + + {{if len(User.Notifications) == 0}} + + {{end}} {{ range User.Notifications }} - - - - - -{{end}} + + + + {{if !.Date.IsZero()}} + + {{else}} + + {{end}} + + {{end}} +
{{T("status")}}Event{{T("date")}}
{{T("no_notifications")}}
{{if .Read}}{{T("read")}}{{else}}{{T("unread")}}{{end}} + >{{ .Content }} + {{formatDate(.Date, true)}}{{T("unknown")}}
-{{else}} -

{{ T("no_notifications") }}

-{{end}} + {{end}} From d67905415a7ca572ef89f956a5735488c6fc0b09 Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 28 Oct 2017 23:32:35 +0200 Subject: [PATCH 008/191] Update en-us.all.json --- translations/en-us.all.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/en-us.all.json b/translations/en-us.all.json index e6a41a37..c87c5286 100644 --- a/translations/en-us.all.json +++ b/translations/en-us.all.json @@ -829,7 +829,7 @@ }, { "id": "clear_notifications", - "translation": "Clear unread notifications" + "translation": "Clear read notifications" }, { "id": "clear_all_notifications", From f28ba2f7acee747299e0676314572ce9fe713ddd Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 28 Oct 2017 23:32:44 +0200 Subject: [PATCH 009/191] Update CHANGELOG.md --- translations/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/CHANGELOG.md b/translations/CHANGELOG.md index 5074768c..c25cdc33 100644 --- a/translations/CHANGELOG.md +++ b/translations/CHANGELOG.md @@ -70,4 +70,4 @@ * + read * + unread * + clear_all_notifications -* ~ clear_notifications -> modified to "Clear **unread** notification" +* ~ clear_notifications -> modified to "Clear **read** notification" From b03053290c31266ce7695f95e86f0330129992ad Mon Sep 17 00:00:00 2001 From: kilo Date: Sun, 29 Oct 2017 00:17:22 +0200 Subject: [PATCH 010/191] Update profile.go --- controllers/user/profile.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/controllers/user/profile.go b/controllers/user/profile.go index 4a900b81..c332a328 100644 --- a/controllers/user/profile.go +++ b/controllers/user/profile.go @@ -217,7 +217,18 @@ func UserNotificationsHandler(c *gin.Context) { if currentUser.ID > 0 { messages := msg.GetMessages(c) if c.Request.URL.Query()["clear"] != nil { - notifications.DeleteAllNotifications(currentUser.ID) + notifications.DeleteNotifications(currentUser.ID, false) + messages.AddInfoT("infos", "notifications_cleared") + NewNotifications := []models.Notification{} + for _, notif := range currentUser.Notifications { + if !notif.Read { + NewNotifications = append(NewNotifications, notif) + } + } + currentUser.Notifications = NewNotifications + + } else if c.Request.URL.Query()["clear_all"] != nil { + notifications.DeleteNotifications(currentUser.ID, true) messages.AddInfoT("infos", "notifications_cleared") currentUser.Notifications = []models.Notification{} } From 0cfe7073b7f8d47783393f5446d86548d2168a30 Mon Sep 17 00:00:00 2001 From: kilo Date: Sun, 29 Oct 2017 00:17:31 +0200 Subject: [PATCH 011/191] Update notification.go --- models/notification.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/notification.go b/models/notification.go index 963e48b1..1a0f3451 100644 --- a/models/notification.go +++ b/models/notification.go @@ -15,13 +15,14 @@ type Notification struct { Identifier string URL string Expire time.Time + Date time.Time UserID uint // User *User `gorm:"AssociationForeignKey:UserID;ForeignKey:user_id"` // Don't think that we need it here } // NewNotification : Create a new notification func NewNotification(identifier string, c string, url string) Notification { - return Notification{Identifier: identifier, Content: c, URL: url} + return Notification{Identifier: identifier, Content: c, URL: url, Date: time.Now()} } // TableName : Return the name of notification table From 36e1574d111968ae6cdf0657ef689699425a36c4 Mon Sep 17 00:00:00 2001 From: kilo Date: Sun, 29 Oct 2017 00:17:48 +0200 Subject: [PATCH 012/191] Update notifier.go --- models/notifications/notifier.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/models/notifications/notifier.go b/models/notifications/notifier.go index 04314319..1c03aa75 100644 --- a/models/notifications/notifier.go +++ b/models/notifications/notifier.go @@ -22,7 +22,11 @@ func ToggleReadNotification(identifier string, id uint) { // models.ORM.Model(&models.Notification{}).Where("identifier = ? AND user_id = ?", identifier, id).Updates(models.Notification{Read: true}) } -// DeleteAllNotifications : Erase notifications from a user -func DeleteAllNotifications(id uint) { // - models.ORM.Where("user_id = ?", id).Delete(&models.Notification{}) +// DeleteNotifications : Erase notifications from a user +func DeleteNotifications(id uint, all bool) { // + if all { + models.ORM.Where("user_id = ?", id).Delete(&models.Notification{}) + } else { + models.ORM.Where("user_id = ? AND read = ?", id, true).Delete(&models.Notification{}) + } } From fd2b094034b75c260fa85178c9ad2c53ba5ea48a Mon Sep 17 00:00:00 2001 From: kilo Date: Sun, 29 Oct 2017 00:31:44 +0200 Subject: [PATCH 013/191] Update helpers.go --- models/comments/helpers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/comments/helpers.go b/models/comments/helpers.go index 97960d7b..21e24bbb 100644 --- a/models/comments/helpers.go +++ b/models/comments/helpers.go @@ -12,6 +12,9 @@ import ( // When a new comment is added this is called func NewCommentEvent(comment *models.Comment, torrent *models.Torrent) { comment.Torrent = torrent + if comment.UserID == torrent.UploaderID { + return + } url := "/view/" + strconv.FormatUint(uint64(torrent.ID), 10) if torrent.UploaderID > 0 { torrent.Uploader.ParseSettings() From 38061f3521596d49072140ef20255d5003dc757c Mon Sep 17 00:00:00 2001 From: kilo Date: Sun, 29 Oct 2017 01:01:50 +0200 Subject: [PATCH 014/191] Update themeToggle.go --- controllers/themeToggle/themeToggle.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/themeToggle/themeToggle.go b/controllers/themeToggle/themeToggle.go index a0e9c639..f6b3dfb5 100644 --- a/controllers/themeToggle/themeToggle.go +++ b/controllers/themeToggle/themeToggle.go @@ -42,7 +42,9 @@ func toggleThemeHandler(c *gin.Context) { http.SetCookie(c.Writer, &http.Cookie{Name: "theme2", Value: theme, Domain: getDomainName(), Path: "/", Expires: timeHelper.FewDaysLater(365)}) //Redirect user to page he was in beforehand - c.Redirect(http.StatusSeeOther, c.Param("redirect") + "#footer") + if c.Query("no_redirect") == "" { + c.Redirect(http.StatusSeeOther, c.Param("redirect") + "#footer") + } return } From b1ee08c7ee2030b28426d0c32c53dc21ce9a337d Mon Sep 17 00:00:00 2001 From: kilo Date: Sun, 29 Oct 2017 01:02:09 +0200 Subject: [PATCH 015/191] Update main.js --- public/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/main.js b/public/js/main.js index f7248549..e2b70873 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -219,7 +219,7 @@ function toggleTheme(e) { document.getElementById("theme").href = "/css/themes/" + CurrentTheme + ".css"; if(UserID > 0 ){ - Query.Get("/dark", function(data) {}) + Query.Get("/dark?no_redirect=true", function(data) {}) //If user logged in, we're forced to go through this page in order to save the new user theme } else { From 2201517574f54ab666b12b048794af1b195060d7 Mon Sep 17 00:00:00 2001 From: kilo Date: Sun, 29 Oct 2017 01:02:39 +0200 Subject: [PATCH 016/191] Update template_test.go --- templates/template_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/template_test.go b/templates/template_test.go index 3b0bc5fa..411cc21d 100644 --- a/templates/template_test.go +++ b/templates/template_test.go @@ -68,7 +68,7 @@ func walkDirTest(dir string, t *testing.T) { fakeOauthModel := fakeOauthForm.Bind(&models.OauthClient{}) fakeClient := client.Client{"", "", "", []string{""}, []string{""}, []string{""}, "", "", "", "", "", "", []string{""}, false} fakeAnnouncement := announcementValidator.CreateForm{1, "", 2} - fakeNotification := &models.Notification{1, "test", true, "test", "test", time.Now(), 1} + fakeNotification := &models.Notification{1, "test", true, "test", "test", time.Now(), time.Now(), 1} contextvariables := ContextTest{ "dumps.jet.html": func(variables jet.VarMap) jet.VarMap { From 0174f8f1af2032caf9115e972f71ae62580cc2f3 Mon Sep 17 00:00:00 2001 From: kilo Date: Sun, 29 Oct 2017 01:07:33 +0200 Subject: [PATCH 017/191] Update notifications.jet.html --- templates/site/user/notifications.jet.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/site/user/notifications.jet.html b/templates/site/user/notifications.jet.html index 6a510d84..0b61c113 100644 --- a/templates/site/user/notifications.jet.html +++ b/templates/site/user/notifications.jet.html @@ -22,9 +22,9 @@ >{{ .Content }} {{if !.Date.IsZero()}} - {{formatDate(.Date, true)}} + {{formatDate(.Date, false)}} {{else}} - {{T("unknown")}} + {{T("unknown")}} {{end}} {{end}} From 0daa34f31f1d75b92edabfa8497df1bbd09833a7 Mon Sep 17 00:00:00 2001 From: kilo Date: Sun, 29 Oct 2017 01:22:14 +0200 Subject: [PATCH 018/191] Update badgemenu.jet.html --- templates/layouts/partials/helpers/badgemenu.jet.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/layouts/partials/helpers/badgemenu.jet.html b/templates/layouts/partials/helpers/badgemenu.jet.html index e81c6f36..0798cbf6 100644 --- a/templates/layouts/partials/helpers/badgemenu.jet.html +++ b/templates/layouts/partials/helpers/badgemenu.jet.html @@ -5,6 +5,7 @@ + {{end}} @@ -102,8 +99,7 @@
@@ -138,8 +134,7 @@ diff --git a/templates/admin/torrent_report.jet.html b/templates/admin/torrent_report.jet.html index 6bf90fbb..803ee37e 100644 --- a/templates/admin/torrent_report.jet.html +++ b/templates/admin/torrent_report.jet.html @@ -26,7 +26,7 @@
- +
diff --git a/templates/admin/torrentlist.jet.html b/templates/admin/torrentlist.jet.html index 41ae3c76..a1dda92d 100644 --- a/templates/admin/torrentlist.jet.html +++ b/templates/admin/torrentlist.jet.html @@ -55,7 +55,7 @@ {{ else }}れんちょん{{end}} - + {{ if .IsBlocked }} {{ T("torrent_unblock") }} {{else}} @@ -65,7 +65,7 @@ {{ if .IsDeleted }}{{ end }} - + diff --git a/templates/admin/userlist.jet.html b/templates/admin/userlist.jet.html index 3ec9261d..a7600796 100644 --- a/templates/admin/userlist.jet.html +++ b/templates/admin/userlist.jet.html @@ -21,7 +21,7 @@ {{if .ID > 0}}
{{ yield csrf_field()}} - +
{{end}} From 59b76401bd9d60173c71e0025bf9842f1a6c50e6 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 00:51:42 +0100 Subject: [PATCH 064/191] Update main.css --- public/css/main.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/css/main.css b/public/css/main.css index f02aebd7..c5b751fc 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1283,7 +1283,7 @@ div.profile-content.box>nav>ul>a>li { width: 100%; } -div.profile-content.box>nav>ul>a>li, nav.adminNav>ul>li { +div.profile-content.box>nav>ul>a>li { border-right-width: 1px; } @@ -2203,6 +2203,9 @@ iframe { height: 36px; margin-bottom: 0; } +.adminNav { + margin: 12px 0 5px 0px; +} table.multiple-upload { From 6d96e5d201f4a671cecb52633f6f4c2948e2d794 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 00:54:45 +0100 Subject: [PATCH 065/191] Update main.css --- public/css/main.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/css/main.css b/public/css/main.css index c5b751fc..dec78cf0 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -661,6 +661,9 @@ th { .website-nav table { width: auto; } +.website-nav table tr { + background: none!important; +} .website-nav #nav-category-list { width: 70%; margin-bottom: 7px; From 283d0f1cf4e6545a9092fcc5b1dbac62db4a8ad8 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:04:13 +0100 Subject: [PATCH 066/191] Update profile.jet.html --- templates/layouts/partials/menu/profile.jet.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/layouts/partials/menu/profile.jet.html b/templates/layouts/partials/menu/profile.jet.html index 6c4b7991..98719397 100644 --- a/templates/layouts/partials/menu/profile.jet.html +++ b/templates/layouts/partials/menu/profile.jet.html @@ -18,13 +18,13 @@
- {{if UserProfile.ID > 0 }} - {{if User.ID > 0 && !User.CurrentUserIdentical(UserProfile.ID) }} - {{if !User.IsFollower(UserProfile.ID)}} - {{ T("follow")}} - {{else}} - {{ T("unfollow")}} - {{end}} + {{if UserProfile.ID > 0 && !User.CurrentUserIdentical(UserProfile.ID) }} + {{if User.ID > 0 }} + {{if !User.IsFollower(UserProfile.ID)}} + {{ T("follow")}} + {{else}} + {{ T("unfollow")}} + {{end}} {{else}} {{T("follow")}} {{end}} From 7667054983794a1bd064e2dfb3832bd32cbe8e5b Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:33:13 +0100 Subject: [PATCH 067/191] Update profile.jet.html --- templates/layouts/partials/menu/profile.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/layouts/partials/menu/profile.jet.html b/templates/layouts/partials/menu/profile.jet.html index 98719397..dce27317 100644 --- a/templates/layouts/partials/menu/profile.jet.html +++ b/templates/layouts/partials/menu/profile.jet.html @@ -13,7 +13,7 @@

{{T(UserProfile.GetRole())}}

-

{{ T("torrents_uploaded") }}:{{ NbTorrents }}

+

{{T("followers")}}: {{len(UserProfile.Followers)}}
{{ T("torrents_uploaded") }}:{{ NbTorrents[0] }}
{{T("size")}}: {{fileSize(NbTorrents[1], T)}}

From 8e121e275671d6af7ca268865a67e825f639e4c6 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:33:44 +0100 Subject: [PATCH 068/191] Update en-us.all.json --- translations/en-us.all.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/translations/en-us.all.json b/translations/en-us.all.json index 65067193..a45c4cbe 100644 --- a/translations/en-us.all.json +++ b/translations/en-us.all.json @@ -139,6 +139,10 @@ "id": "torrents", "translation": "Torrents" }, + { + "id": "followers", + "translation": "Followers" + }, { "id": "follow", "translation": "Follow" From 19bb04f97fea582ed14132398e6b7bb7a20ba8a5 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:33:58 +0100 Subject: [PATCH 069/191] Update CHANGELOG.md --- translations/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/translations/CHANGELOG.md b/translations/CHANGELOG.md index 7d10ca21..e99c96d6 100644 --- a/translations/CHANGELOG.md +++ b/translations/CHANGELOG.md @@ -77,3 +77,5 @@ * + read_notifications_cleared * + notifications_read * + mark_notifications_as_read +## 2017/10/31 +* + followers From 9b2b05b24ad421bbfd5d851def1f86ce2edb85cf Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:34:13 +0100 Subject: [PATCH 070/191] Update template_test.go --- templates/template_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/template_test.go b/templates/template_test.go index e3b9bcee..dbcc270b 100644 --- a/templates/template_test.go +++ b/templates/template_test.go @@ -85,17 +85,17 @@ func walkDirTest(dir string, t *testing.T) { return variables }, "edit.jet.html": func(variables jet.VarMap) jet.VarMap { - variables.Set("NbTorrents", 0) + variables.Set("NbTorrents", []int64{0,0}) variables.Set("Form", fakeTorrentRequest) variables.Set("Languages", publicSettings.Languages{*fakeLanguage, *fakeLanguage}) return variables }, "torrents.jet.html": func(variables jet.VarMap) jet.VarMap { - variables.Set("NbTorrents", 0) + variables.Set("NbTorrents", []int64{0,0}) return variables }, "profile.jet.html": func(variables jet.VarMap) jet.VarMap { - variables.Set("NbTorrents", 0) + variables.Set("NbTorrents", []int64{0,0}) return variables }, "upload.jet.html": func(variables jet.VarMap) jet.VarMap { @@ -103,7 +103,7 @@ func walkDirTest(dir string, t *testing.T) { return variables }, "view.jet.html": func(variables jet.VarMap) jet.VarMap { - variables.Set("NbTorrents", 0) + variables.Set("NbTorrents", []int64{0,0}) variables.Set("Torrent", fakeTorrent.ToJSON()) variables.Set("CaptchaID", "xxxxxx") variables.Set("RootFolder", filelist.FileListToFolder(fakeTorrent.FileList, "root")) From 97b8171bd958015b8a03741062cf92aa01382331 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:34:23 +0100 Subject: [PATCH 071/191] Update template.go --- templates/template.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/template.go b/templates/template.go index b27ccb75..d164d978 100644 --- a/templates/template.go +++ b/templates/template.go @@ -173,9 +173,14 @@ func userProfileBase(c *gin.Context, templateName string, userProfile *models.Us } else { _, userProfile.Torrents, nbTorrents, _ = search.ByQuery(c, 1, true, false, true) } + + var uploadedSize int64 + for _, torrent := range userProfile.Torrents { + uploadedSize += 64 + } variables.Set("UserProfile", userProfile) - variables.Set("NbTorrents", nbTorrents) + variables.Set("NbTorrents", []int64{int64(nbTorrents),uploadedSize}) Render(c, path.Join(SiteDir, "user", templateName), variables) } From bcb2fe52cabda3470468b4ddb16a238a0bc5ce23 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:37:07 +0100 Subject: [PATCH 072/191] Update view.jet.html --- templates/site/torrents/view.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/site/torrents/view.jet.html b/templates/site/torrents/view.jet.html index c9f73c34..3cf0fb3c 100644 --- a/templates/site/torrents/view.jet.html +++ b/templates/site/torrents/view.jet.html @@ -52,7 +52,7 @@ {{ T("size")}}: - {{ fileSize(Torrent.Filesize, T) }} + {{ fileSize(Torrent.Filesize, T, true) }} {{ if len(Torrent.Languages) > 0 && Torrent.Languages[0] != "" }} From 45e8afe9892ccd086471ad3acc2a146534080f4f Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:37:24 +0100 Subject: [PATCH 073/191] Update template_functions.go --- templates/template_functions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/template_functions.go b/templates/template_functions.go index 1b4e36fc..8646679c 100644 --- a/templates/template_functions.go +++ b/templates/template_functions.go @@ -251,8 +251,8 @@ func languageNameFromCode(languageCode string, T publicSettings.TemplateTfunc) s } return strings.Title(publicSettings.Translate(languageCode, string(T("language_code")))) } -func fileSize(filesize int64, T publicSettings.TemplateTfunc) template.HTML { - if filesize == 0 { +func fileSize(filesize int64, T publicSettings.TemplateTfunc, showUnknown bool) template.HTML { + if showUnknown && filesize == 0 { return T("unknown") } return template.HTML(format.FileSize(filesize)) From f81fb68e95baf78d9556d03c02740bb348d02b22 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:37:32 +0100 Subject: [PATCH 074/191] Update listing.jet.html --- templates/site/torrents/listing.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/site/torrents/listing.jet.html b/templates/site/torrents/listing.jet.html index 42f9fb0f..89e4faee 100644 --- a/templates/site/torrents/listing.jet.html +++ b/templates/site/torrents/listing.jet.html @@ -91,7 +91,7 @@ - {{ fileSize(.Filesize, T) }} + {{ fileSize(.Filesize, T, true) }} {{if .StatsObsolete[0] }} - From 95a1600f7e5a611ead4cd6a8aaa8fa239b59d776 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:38:47 +0100 Subject: [PATCH 075/191] Update template.go --- templates/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/template.go b/templates/template.go index d164d978..e0b9230d 100644 --- a/templates/template.go +++ b/templates/template.go @@ -176,7 +176,7 @@ func userProfileBase(c *gin.Context, templateName string, userProfile *models.Us var uploadedSize int64 for _, torrent := range userProfile.Torrents { - uploadedSize += 64 + uploadedSize += torrent.Filesize } variables.Set("UserProfile", userProfile) From a9a30d82dcf2d0970e9b59c4de2fa5cfabfa925c Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:40:30 +0100 Subject: [PATCH 076/191] Update torrents.jet.html --- templates/site/user/torrents.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/site/user/torrents.jet.html b/templates/site/user/torrents.jet.html index 0cf7a8ef..29db28e7 100644 --- a/templates/site/user/torrents.jet.html +++ b/templates/site/user/torrents.jet.html @@ -41,7 +41,7 @@ - {{ fileSize(torrent.Filesize, T) }} + {{ fileSize(torrent.Filesize, T, true) }} {{formatDate(torrent.FullDate, true)}} From 57be73d2e6cb517897ed39d1da286c94fd602093 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:42:25 +0100 Subject: [PATCH 077/191] Update main.css --- public/css/main.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/css/main.css b/public/css/main.css index dec78cf0..f4bd5ee0 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1072,8 +1072,7 @@ html, body { margin-bottom: 2px; } -.profile-usertitle-uploadcount span { - font-weight: bold; +.profile-usertitle-uploadcount b { margin-left: 2px; } From 6931952a63ba831c1b3256f8ad9dbef0ec5b775a Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:57:21 +0100 Subject: [PATCH 078/191] rollback that --- controllers/moderator/torrents.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/controllers/moderator/torrents.go b/controllers/moderator/torrents.go index adc66693..60b76b8d 100644 --- a/controllers/moderator/torrents.go +++ b/controllers/moderator/torrents.go @@ -121,13 +121,19 @@ func TorrentPostEditModPanel(c *gin.Context) { // TorrentDeleteModPanel : Controller for deleting a torrent func TorrentDeleteModPanel(c *gin.Context) { id, _ := strconv.ParseInt(c.PostForm("id"), 10, 32) + definitely := c.Request.URL.Query()["definitely"] var returnRoute = "/mod/torrents" torrent, errFind := torrents.FindByID(uint(id)) if errFind == nil { var err error + if definitely != nil { + _, _, err = torrent.DefinitelyDelete() + returnRoute = "/mod/torrents/deleted" + } else { _, _, err = torrent.Delete(false) - + } + //delete reports of torrent query := &search.Query{} query.Append("torrent_id", id) From 03d92ab63923b465ba89151f8c272fc14cdf9df4 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 02:00:06 +0100 Subject: [PATCH 079/191] Update torrents.go --- controllers/moderator/torrents.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/moderator/torrents.go b/controllers/moderator/torrents.go index 60b76b8d..b594f5e9 100644 --- a/controllers/moderator/torrents.go +++ b/controllers/moderator/torrents.go @@ -169,7 +169,7 @@ func DeleteTagsModPanel(c *gin.Context) { // TorrentBlockModPanel : Controller to lock torrents, redirecting to previous page func TorrentBlockModPanel(c *gin.Context) { - id, _ := strconv.ParseInt(c.Query("id"), 10, 32) + id, _ := strconv.ParseInt(c.PostForm("id"), 10, 32) torrent, _, err := torrents.ToggleBlock(uint(id)) var returnRoute, action string if torrent.IsDeleted() { From 9618f4f9297245e316a2c160f2cd0086c518f9ec Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 02:04:54 +0100 Subject: [PATCH 080/191] Update torrentlist.jet.html --- templates/admin/torrentlist.jet.html | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/templates/admin/torrentlist.jet.html b/templates/admin/torrentlist.jet.html index a1dda92d..40107c9c 100644 --- a/templates/admin/torrentlist.jet.html +++ b/templates/admin/torrentlist.jet.html @@ -55,13 +55,10 @@ {{ else }}れんちょん{{end}} - - {{ if .IsBlocked }} - {{ T("torrent_unblock") }} - {{else}} - {{ T("torrent_block") }} - {{end}} - +
+ + +
{{ if .IsDeleted }}{{ end }} From 165d7a70ffa7ed721f1c8c0c5e71409530448833 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 02:10:21 +0100 Subject: [PATCH 081/191] Update torrentlist.jet.html --- templates/admin/torrentlist.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/admin/torrentlist.jet.html b/templates/admin/torrentlist.jet.html index 40107c9c..8689887b 100644 --- a/templates/admin/torrentlist.jet.html +++ b/templates/admin/torrentlist.jet.html @@ -54,7 +54,7 @@ {{ .Uploader.Username }} {{ else }}れんちょん{{end}} - +
From 6c3687c77791877f76ca030c52c0afec948325eb Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 02:12:23 +0100 Subject: [PATCH 082/191] Update view.jet.html --- templates/site/torrents/view.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/site/torrents/view.jet.html b/templates/site/torrents/view.jet.html index 3cf0fb3c..583c61db 100644 --- a/templates/site/torrents/view.jet.html +++ b/templates/site/torrents/view.jet.html @@ -32,7 +32,7 @@ {{if User.ID > 0}} {{if User.IsFollower(Torrent.UploaderID)}}{{T("unfollow")}}{{else}}{{T("follow")}}{{end}} {{else}} - {{T("follow")}} + {{T("follow")}} {{end}} {{end}} From 21ce72555b1f5f0b76967a9824d4abfe76647dd5 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 02:13:40 +0100 Subject: [PATCH 083/191] Update view.jet.html --- templates/site/torrents/view.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/site/torrents/view.jet.html b/templates/site/torrents/view.jet.html index 583c61db..7079fcb5 100644 --- a/templates/site/torrents/view.jet.html +++ b/templates/site/torrents/view.jet.html @@ -8,7 +8,7 @@ {{block title()}}{{Torrent.Name}}{{end}} {{block content_body()}}
-
+

{{Torrent.Name}}


From 20e1777b958274e7fad76deba416e9d10427422e Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 02:15:45 +0100 Subject: [PATCH 084/191] Update main.css --- public/css/main.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/css/main.css b/public/css/main.css index f4bd5ee0..9d8da91c 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -2411,6 +2411,10 @@ td.notification-status.notification-unread { word-break: break-word; } +.locked { + background: hsla(216, 10%, 73%, 0.2) !important; +} + /* Language specific CSS */ html[lang="ja-jp"] .form-refine span.spacing { From 3959a86ec05e0dec101d892f00755e8ba5b11ed5 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 02:21:47 +0100 Subject: [PATCH 085/191] fix travis --- templates/layouts/partials/menu/profile.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/layouts/partials/menu/profile.jet.html b/templates/layouts/partials/menu/profile.jet.html index dce27317..ee9fa8c9 100644 --- a/templates/layouts/partials/menu/profile.jet.html +++ b/templates/layouts/partials/menu/profile.jet.html @@ -13,7 +13,7 @@

{{T(UserProfile.GetRole())}}

-

{{T("followers")}}: {{len(UserProfile.Followers)}}
{{ T("torrents_uploaded") }}:{{ NbTorrents[0] }}
{{T("size")}}: {{fileSize(NbTorrents[1], T)}}

+

{{T("followers")}}: {{len(UserProfile.Followers)}}
{{ T("torrents_uploaded") }}:{{ NbTorrents[0] }}
{{T("size")}}: {{fileSize(NbTorrents[1], T, false)}}

From 90320dfa2bb7873a8f6add4151fe13c9a505c8e5 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 02:25:09 +0100 Subject: [PATCH 086/191] remove annoying messages --- controllers/user/profile.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/controllers/user/profile.go b/controllers/user/profile.go index c30c4099..be58d1d3 100644 --- a/controllers/user/profile.go +++ b/controllers/user/profile.go @@ -218,14 +218,11 @@ func UserNotificationsHandler(c *gin.Context) { messages := msg.GetMessages(c) if c.Request.URL.Query()["clear"] != nil { notifications.DeleteNotifications(currentUser, false) - messages.AddInfoT("infos", "read_notifications_cleared") } else if c.Request.URL.Query()["clear_all"] != nil { notifications.DeleteNotifications(currentUser, true) - messages.AddInfoT("infos", "notifications_cleared") } else if c.Request.URL.Query()["read_all"] != nil { notifications.MarkAllNotificationsAsRead(currentUser) - messages.AddInfoT("infos", "notifications_read") } templates.UserProfileNotifications(c, currentUser) } else { From 3eb23e1e9dceebb890eb28a8977a05452097b290 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 02:36:08 +0100 Subject: [PATCH 087/191] Update themeToggle.go --- controllers/themeToggle/themeToggle.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/themeToggle/themeToggle.go b/controllers/themeToggle/themeToggle.go index f6b3dfb5..d53de1a3 100644 --- a/controllers/themeToggle/themeToggle.go +++ b/controllers/themeToggle/themeToggle.go @@ -42,7 +42,7 @@ func toggleThemeHandler(c *gin.Context) { http.SetCookie(c.Writer, &http.Cookie{Name: "theme2", Value: theme, Domain: getDomainName(), Path: "/", Expires: timeHelper.FewDaysLater(365)}) //Redirect user to page he was in beforehand - if c.Query("no_redirect") == "" { + if c.Request.URL.Query()["no_redirect"] == nil { c.Redirect(http.StatusSeeOther, c.Param("redirect") + "#footer") } return From 080092498249f09ee6bac179aee3979b19338ab7 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 02:36:24 +0100 Subject: [PATCH 088/191] Update main.js --- public/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/main.js b/public/js/main.js index e2b70873..eb41498d 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -219,7 +219,7 @@ function toggleTheme(e) { document.getElementById("theme").href = "/css/themes/" + CurrentTheme + ".css"; if(UserID > 0 ){ - Query.Get("/dark?no_redirect=true", function(data) {}) + Query.Get("/dark?no_redirect", function(data) {}) //If user logged in, we're forced to go through this page in order to save the new user theme } else { From 9d485e5a7757616087b62667aa55fa211fd6de1d Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 02:41:03 +0100 Subject: [PATCH 089/191] Update profile.go --- controllers/user/profile.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/controllers/user/profile.go b/controllers/user/profile.go index be58d1d3..ad1f6aae 100644 --- a/controllers/user/profile.go +++ b/controllers/user/profile.go @@ -189,9 +189,13 @@ func UserProfileFormHandler(c *gin.Context) { validator.ValidateForm(&userForm, messages) if !messages.HasErrors() { if userForm.Email != userProfile.Email { - email.SendVerificationToUser(currentUser, userForm.Email) - messages.AddInfoTf("infos", "email_changed", userForm.Email) - userForm.Email = userProfile.Email // reset, it will be set when user clicks verification + if currentUser.HasAdmin() { + userProfile.Email = userForm.Email + } else { + email.SendVerificationToUser(currentUser, userForm.Email) + messages.AddInfoTf("infos", "email_changed", userForm.Email) + userForm.Email = userProfile.Email // reset, it will be set when user clicks verification + } } user, _, err := users.UpdateFromRequest(c, &userForm, &userSettingsForm, currentUser, uint(id)) if err != nil { From 4385315a0f177c3643db87ff2f304bd9bc663ea2 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:20:32 +0100 Subject: [PATCH 090/191] Update upload.jet.html --- templates/site/torrents/upload.jet.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/site/torrents/upload.jet.html b/templates/site/torrents/upload.jet.html index 9607c8cb..22679067 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -50,10 +50,10 @@
- +
- +
From 417deef07fece7b4d948d2b4d2e53da513bea073 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:24:34 +0100 Subject: [PATCH 091/191] Update en-us.all.json --- translations/en-us.all.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translations/en-us.all.json b/translations/en-us.all.json index a45c4cbe..aa2d77b8 100644 --- a/translations/en-us.all.json +++ b/translations/en-us.all.json @@ -536,8 +536,8 @@ "translation": "Torrent Description" }, { - "id": "description_markdown_notice", - "translation": "Markdown can be used in descriptions." + "id": "comment_markdown_notice", + "translation": "Markdown can be used in comments." }, { "id": "show_all", From b541fc11243f082df606b432bc433aa315befc91 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:24:59 +0100 Subject: [PATCH 092/191] Update CHANGELOG.md --- translations/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/translations/CHANGELOG.md b/translations/CHANGELOG.md index e99c96d6..13137594 100644 --- a/translations/CHANGELOG.md +++ b/translations/CHANGELOG.md @@ -79,3 +79,4 @@ * + mark_notifications_as_read ## 2017/10/31 * + followers +* ~ description_markdown_notice -> comment_markdown_notice From 404fb66978f8dc09fa86b49a0bcf73598321878c Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:30:06 +0100 Subject: [PATCH 093/191] Update main.css --- public/css/main.css | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/css/main.css b/public/css/main.css index 9d8da91c..2c0ddee2 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -252,7 +252,7 @@ select.form-input { .not-important { font-size: 9pt; - margin: 2px 3px; + margin: 0 3px 2px 3px; color: #8a8a8a; } @@ -1235,8 +1235,12 @@ html, body { padding-bottom: 5px; } +.comment-form textarea { + margin-bottom: 0; +} + .comment-form h3 { - margin-bottom: 8px; + margin-bottom: 8px; } .comment-index { From 74ac798ee8acd89a587836d6d95eb1775350c6cf Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:31:41 +0100 Subject: [PATCH 094/191] Update view.jet.html --- templates/site/torrents/view.jet.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/site/torrents/view.jet.html b/templates/site/torrents/view.jet.html index 7079fcb5..c090d0b1 100644 --- a/templates/site/torrents/view.jet.html +++ b/templates/site/torrents/view.jet.html @@ -239,6 +239,7 @@

{{ if User.ID > 0}} {{ T("submit_a_comment_as_username", User.Username) }} {{else}} {{ T("submit_a_comment_as_anonymous")|raw}} {{end}}

+

{{T("comment_markdown_notice")}}

{{ yield captcha(captchaid=CaptchaID)}} From 29226a9a270c128e2e276d371fc2eca326c9150d Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:32:11 +0100 Subject: [PATCH 095/191] Update main.css --- public/css/main.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/css/main.css b/public/css/main.css index 2c0ddee2..a75cef85 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1243,6 +1243,10 @@ html, body { margin-bottom: 8px; } +.comment-text { + margin-bottom: 10px; +} + .comment-index { margin-right: 5px; margin-top: 5px; From 570fcd763fa9e411e53bf6fd4c1c4a8f96b895b3 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:32:57 +0100 Subject: [PATCH 096/191] Update main.css --- public/css/main.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/public/css/main.css b/public/css/main.css index a75cef85..2c0ddee2 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1243,10 +1243,6 @@ html, body { margin-bottom: 8px; } -.comment-text { - margin-bottom: 10px; -} - .comment-index { margin-right: 5px; margin-top: 5px; From 7a9e78b19254c638e1d5b8d9d832794f48091105 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:35:08 +0100 Subject: [PATCH 097/191] Update classic.css --- public/css/themes/classic.css | 1 + 1 file changed, 1 insertion(+) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index 7d05e131..1dcb6250 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -39,6 +39,7 @@ body, .header { .comment-box p:nth-child(2) { margin-top: auto; + margin-bottom: 5px; } .form-refine span.spacing { From 26023640ca585e2c97aa588ae8c7b5a087647628 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:38:29 +0100 Subject: [PATCH 098/191] Update main.css --- public/css/main.css | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/css/main.css b/public/css/main.css index 2c0ddee2..df5ee130 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1200,11 +1200,15 @@ html, body { margin-top: 9px; } -.comment-box .comment-user { - font-size: 12px; +.comment-box .comment-userinfo { + margin-top: 9px; } -.comment-box span+p img { +.comment-box .comment-user { + font-size: 12px; +} + +.comment-userinfo img { width: 50px; height: 50px; float: left; From e47cd66acd68dbd1dfe0d2017789e94c9d4b1b98 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:38:47 +0100 Subject: [PATCH 099/191] Update view.jet.html --- templates/site/torrents/view.jet.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/site/torrents/view.jet.html b/templates/site/torrents/view.jet.html index c090d0b1..99997162 100644 --- a/templates/site/torrents/view.jet.html +++ b/templates/site/torrents/view.jet.html @@ -219,9 +219,10 @@ {{idx}} {{formatDate(element.Date, false)}} -

+

{{if element.UserID > 0}}{{element.Username}}{{if element.UserStatus != ""}}{{T(element.UserStatus)}}{{end}}{{else}} - れんちょん{{end}} + れんちょん{{end}} +
{{element.Content|raw}}
{{idx = idx + 1}} From 3cd90a7d08b21e8d1e7b796c04dc386eabc8aaa1 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:41:43 +0100 Subject: [PATCH 100/191] Update classic.css --- public/css/themes/classic.css | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index 1dcb6250..16e3de5f 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -37,9 +37,8 @@ body, .header { width: 87%; } -.comment-box p:nth-child(2) { +.comment-userinfo { margin-top: auto; - margin-bottom: 5px; } .form-refine span.spacing { @@ -328,7 +327,7 @@ span.comment-index+p { margin-top: 0; } -span.comment-index+p a { +.comment-user { font-weight: bold; padding-top: 2px; font-size: .9em; @@ -336,10 +335,9 @@ span.comment-index+p a { text-decoration: none; line-height: 22px; } -span.comment-index+p a:hover { +.comment-user:hover { text-decoration: underline; } - .comment-index { margin: 3px 0 0 0; } From 2849b05370ddb00a23aee56f17c8f0409d803b5b Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:41:54 +0100 Subject: [PATCH 101/191] Update view.jet.html --- templates/site/torrents/view.jet.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/site/torrents/view.jet.html b/templates/site/torrents/view.jet.html index 99997162..da722c39 100644 --- a/templates/site/torrents/view.jet.html +++ b/templates/site/torrents/view.jet.html @@ -219,10 +219,10 @@ {{idx}} {{formatDate(element.Date, false)}} -
+ {{if element.UserID > 0}}{{element.Username}}{{if element.UserStatus != ""}}{{T(element.UserStatus)}}{{end}}{{else}} れんちょん{{end}} -
+
{{element.Content|raw}}
{{idx = idx + 1}} From 60ac28a1226966c53d106813d73f1dacf5b02828 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:44:15 +0100 Subject: [PATCH 102/191] Update main.css --- public/css/main.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/css/main.css b/public/css/main.css index df5ee130..d522b080 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1228,6 +1228,11 @@ html, body { margin-left: 4px; } +.comment-content { + max-width: 100%; + max-height: 500px; +} + .comment-content :last-child { margin-bottom: 2px; } From ec7c086350e868647dcd1f9fa6838105855fea16 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:47:44 +0100 Subject: [PATCH 103/191] Update classic.css --- public/css/themes/classic.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index 16e3de5f..3fbd2c85 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -254,7 +254,7 @@ select.form-input { padding-top: 4px!important; } .website-nav .pagination { - padding: .5rem; + padding: .5rem 0 0rem 0; font-size: 1em; } .website-nav .pagination a { From ee5a9488dffdeac06f5d1d71663a699bdc8eb137 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 03:55:20 +0100 Subject: [PATCH 104/191] Update classic.css --- public/css/themes/classic.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index 3fbd2c85..c92a8e88 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -158,7 +158,7 @@ th.tr-name a { } .header .container>div { line-height: 40px; - padding: 0 0.2rem; + padding: 0 0.4rem; } .header .nav-btn { From 99ec8e303c2c960f703bbf39cdcf02b2bd8f0899 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:10:56 +0100 Subject: [PATCH 105/191] Update main.css --- public/css/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/main.css b/public/css/main.css index d522b080..6d1489cd 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1582,7 +1582,7 @@ input.filelist-checkbox:checked+table.table-filelist { margin-top: 7px; padding: 0.7em 1.5em; background: none; - border: 1px solid white; + border: 1px solid black; border-radius: 3px; color: white; font-weight: bold; From de6751b1f5e32d5e6a12e4b99e95e48216371a70 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:11:06 +0100 Subject: [PATCH 106/191] Update classic.css --- public/css/themes/classic.css | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index c92a8e88..d5e5c200 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -26,7 +26,7 @@ body, .header { font-family: Arial, sans-serif!important; } .torrent-info-data { - width: 59%; + width: 52%; } #torrent-view-data { margin-left: 10px; @@ -381,6 +381,7 @@ span.comment-index+p { #description-box { font-size: 0.8em; + border-radius: 5px; } .form-input { border-color: #c4c4c4 !important; @@ -413,6 +414,9 @@ span.comment-index+p { #torrent-description-hr { margin-top: 40px; } +.torrent-hr { + font-size: 15px; +} .comment-submit h3 { font-size: 1em; @@ -493,12 +497,17 @@ th { td { font-size: 0.9em; padding: 2px 0!important; - } .results td { border-bottom: 1px solid #666666!important; border-top: 1px solid #666666!important; } +.torrent-view-data { + margin-left: 10px; +} +.torrent-view-data td { + padding: 1px 0!important; +} td a { color: #106655; } @@ -717,3 +726,20 @@ span.tag { .torrent-info-data #subscribe-link::before, .torrent-info-data #subscribe-link:: after { color: #111111; } + +#reportPopup { + text-decoration: underline dotted; + height: auto!important; + font-size: 13px!important; + background: none; + color: #106655!important; + position: absolute; + top: 103px; + right: 11px; +} +#reportPopup:hover { + text-decoration: underline; +} +.modal-header { + background: linear-gradient(to bottom, #33ca98 0%, #337372 72%); +} From a4b9b34f9b0a1078ee72bb1e29040cec0dc9ad0e Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:12:00 +0100 Subject: [PATCH 107/191] Update classic.css --- public/css/themes/classic.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index d5e5c200..b3925ead 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -498,7 +498,7 @@ td { font-size: 0.9em; padding: 2px 0!important; } -.results td { +.results td, .profile-content td { border-bottom: 1px solid #666666!important; border-top: 1px solid #666666!important; } From 30c6993df2ad21e6528b8324ceffdc6ff34871cf Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:21:44 +0100 Subject: [PATCH 108/191] Update classic.css --- public/css/themes/classic.css | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index b3925ead..3899b226 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -726,7 +726,15 @@ span.tag { .torrent-info-data #subscribe-link::before, .torrent-info-data #subscribe-link:: after { color: #111111; } - +.content > p:first-child+div.centered+div.refine+div #reportPopup { + top: 145px; +} +.content > p:first-child+div#announce+div.refine+div #reportPopup { + top: 110px; +} +.content > div#announce:first-child+div.refine+div #reportPopup { + top: 67px; +} #reportPopup { text-decoration: underline dotted; height: auto!important; @@ -737,9 +745,15 @@ span.tag { top: 103px; right: 11px; } +.sukebei #reportPopup { + color: #660000; +} #reportPopup:hover { text-decoration: underline; } .modal-header { background: linear-gradient(to bottom, #33ca98 0%, #337372 72%); } +.modal-footer{ + background: #26332e; +} From 783e4fdf640f4beefbf8117274fd63fe455e22ef Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:23:50 +0100 Subject: [PATCH 109/191] Update classic.css --- public/css/themes/classic.css | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index 3899b226..7cf51e3d 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -746,7 +746,7 @@ span.tag { right: 11px; } .sukebei #reportPopup { - color: #660000; + color: #660000!important; } #reportPopup:hover { text-decoration: underline; @@ -754,6 +754,12 @@ span.tag { .modal-header { background: linear-gradient(to bottom, #33ca98 0%, #337372 72%); } +.sukebei .modal-header { + background: linear-gradient(to bottom, #c54f6a 5%, #482120 80%); +} .modal-footer{ background: #26332e; } +.sukebei .modal-footer { + background: #332626; +} From 1318b855baf7505f97b2e0544ca756c3e8963cce Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:30:04 +0100 Subject: [PATCH 110/191] Update classic.css --- public/css/themes/classic.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index 7cf51e3d..b47550e1 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -245,6 +245,8 @@ select.form-input { } .sukebei .pagination span:hover { background-color: #993333; + color: white; + font-weight: normal; } .website-nav .pagination p { display: none; @@ -601,6 +603,13 @@ td.tr-size { border: none; color: #106655; } +.sukebei .pagination .active, .pagination .active:hover { + color: #111111!important; + cursor: pointer; + background: none!important; + border: none; + font-weight: bold!important; +} a.nav-btn.log-in { margin-right: 5px; From 7a50f9f145755d48b4ef771acee9b50e115ee3c8 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:35:28 +0100 Subject: [PATCH 111/191] fix travis --- controllers/user/profile.go | 1 - 1 file changed, 1 deletion(-) diff --git a/controllers/user/profile.go b/controllers/user/profile.go index ad1f6aae..634ac395 100644 --- a/controllers/user/profile.go +++ b/controllers/user/profile.go @@ -219,7 +219,6 @@ func UserProfileFormHandler(c *gin.Context) { func UserNotificationsHandler(c *gin.Context) { currentUser := router.GetUser(c) if currentUser.ID > 0 { - messages := msg.GetMessages(c) if c.Request.URL.Query()["clear"] != nil { notifications.DeleteNotifications(currentUser, false) From 38aebaf82781fca87244b4b85d43f7bd7f334b13 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:38:04 +0100 Subject: [PATCH 112/191] Update classic.css --- public/css/themes/classic.css | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index b47550e1..2ab2a35b 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -598,17 +598,14 @@ td.tr-size { } .pagination .active, .pagination .active:hover { - background: #fbfbfb; - font-weight: bold; + background: none!important; + font-weight: bold!important; border: none; color: #106655; + cursor: text; } .sukebei .pagination .active, .pagination .active:hover { color: #111111!important; - cursor: pointer; - background: none!important; - border: none; - font-weight: bold!important; } a.nav-btn.log-in { @@ -746,7 +743,7 @@ span.tag { } #reportPopup { text-decoration: underline dotted; - height: auto!important; + height: 16px!important; font-size: 13px!important; background: none; color: #106655!important; From 6767f679de0f58648fa2e5c191b44181882cbbd2 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:47:56 +0100 Subject: [PATCH 113/191] Update en-us.all.json --- translations/en-us.all.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/translations/en-us.all.json b/translations/en-us.all.json index aa2d77b8..09769e03 100644 --- a/translations/en-us.all.json +++ b/translations/en-us.all.json @@ -2207,6 +2207,10 @@ "id": "search_from_specific_user", "translation": "Search from %s" }, + { + "id": "browsing_user_torrents", + "translation": "Browsing %s's torrents" + }, { "id": "hours_minutes_ago", "translation": "{0} hours {1} minutes ago" From e2863856321d324b14d0b3649e0cb6f0702299af Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:48:02 +0100 Subject: [PATCH 114/191] Update CHANGELOG.md --- translations/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/translations/CHANGELOG.md b/translations/CHANGELOG.md index 13137594..69d8b43c 100644 --- a/translations/CHANGELOG.md +++ b/translations/CHANGELOG.md @@ -80,3 +80,4 @@ ## 2017/10/31 * + followers * ~ description_markdown_notice -> comment_markdown_notice +* + browsing_user_torrents From 48d624fb47c7b69c0abc06e349060e54b77fbb85 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:49:36 +0100 Subject: [PATCH 115/191] Update classic.css --- public/css/themes/classic.css | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index 2ab2a35b..771bbe04 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -409,7 +409,7 @@ span.comment-index+p { .torrent-info-data.uploader-anon { font-style: italic; } -.torrent-info-data.uploader-link a, .torrent-info-data.uploader-anon a{ +.torrent-info-data.uploader-link a, .torrent-info-data.uploader-anon a, .user-search-notice a{ color: green; } @@ -743,7 +743,7 @@ span.tag { } #reportPopup { text-decoration: underline dotted; - height: 16px!important; + height: auto!important; font-size: 13px!important; background: none; color: #106655!important; @@ -769,3 +769,10 @@ span.tag { .sukebei .modal-footer { background: #332626; } +.user-search-notice { + margin: 11px 0 0 4px; + font-size: 13px; + font-weight: bold; + margin-left: 4px; + +} From 23e720ed575522f9f416d2ea78972bcdf93610b6 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:51:08 +0100 Subject: [PATCH 116/191] Update oldNav.jet.html --- templates/layouts/partials/helpers/oldNav.jet.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/layouts/partials/helpers/oldNav.jet.html b/templates/layouts/partials/helpers/oldNav.jet.html index 01c2d7c7..6af4977c 100644 --- a/templates/layouts/partials/helpers/oldNav.jet.html +++ b/templates/layouts/partials/helpers/oldNav.jet.html @@ -44,6 +44,9 @@ + {{ if Search.UserName != ""}} +
{{T("browsing_user_torrents", Search.UserID, Search.UserName, Search.UserName)|raw}} ({{Navigation.TotalItem}})
+ {{end}} From 25627f6bcab67792c667acf52a6d46f15460e564 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:52:01 +0100 Subject: [PATCH 117/191] Update main.css --- public/css/main.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/css/main.css b/public/css/main.css index 6d1489cd..de37864e 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -2324,6 +2324,11 @@ table.multiple-upload { right: 16px; } +.user-search-notice { + margin: 10px 0 0; + font-weight: bold; +} + .torrent-info-row .tr-se span, .torrent-info-row .tr-le span, .torrent-info-row .tr-dl span { font-weight: bold; background-color: #ffe0bf; From c57062490519c79ac956c35af0a90667019a2525 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 04:52:35 +0100 Subject: [PATCH 118/191] Update main.css --- public/css/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/main.css b/public/css/main.css index de37864e..19f2045d 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -2325,7 +2325,7 @@ table.multiple-upload { } .user-search-notice { - margin: 10px 0 0; + margin: 10px 0 0 1px; font-weight: bold; } From 8d2be6ca5b0191e1ee6d24963700d381bdde7104 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 05:15:48 +0100 Subject: [PATCH 119/191] Update classic.css --- public/css/themes/classic.css | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index 771bbe04..7ec22b31 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -54,7 +54,7 @@ body, .header { #sort-list-order { width: auto; - margin-left: 4px; + margin-left: 3px; } a { @@ -68,7 +68,7 @@ a:hover { } .upload-form-table .checkbox-container+input { - width: 385px; + width: 385px;1 } .upload-form-table .table-checkboxes { padding: 3px 0!important; @@ -770,9 +770,8 @@ span.tag { background: #332626; } .user-search-notice { - margin: 11px 0 0 4px; + margin: 9px 0 0 3px; font-size: 13px; - font-weight: bold; - margin-left: 4px; + font-weight: bold; } From 6a2db353160850a15c238c59db2ea9898d1a8f67 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 05:16:00 +0100 Subject: [PATCH 120/191] Update oldNav.jet.html --- templates/layouts/partials/helpers/oldNav.jet.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/layouts/partials/helpers/oldNav.jet.html b/templates/layouts/partials/helpers/oldNav.jet.html index 6af4977c..b8b5a051 100644 --- a/templates/layouts/partials/helpers/oldNav.jet.html +++ b/templates/layouts/partials/helpers/oldNav.jet.html @@ -10,6 +10,7 @@ {{end}} {{if _ + 1 == len(GetCategories(true, false)) }} + {{ if _% 3 != 2}}{{ if _% 3 == 0}}{{end}}{{end}} {{end}} {{ end }} From adc32d3e5480302e3b6458d1daa2d8ef4fc81f2e Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 05:28:30 +0100 Subject: [PATCH 121/191] Update listing.jet.html --- templates/site/torrents/listing.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/site/torrents/listing.jet.html b/templates/site/torrents/listing.jet.html index 89e4faee..32458901 100644 --- a/templates/site/torrents/listing.jet.html +++ b/templates/site/torrents/listing.jet.html @@ -1,6 +1,6 @@ {{ extends "layouts/index_site" }} {{ import "layouts/partials/helpers/search" }} -{{block title()}}{{ T("home")}}{{end}} +{{block title()}}{{if Search.UserName == ""}}{{ T("home")}}{{else}}{{Search.UserName}}{{end}}{{end}} {{block contclass()}}{{if User.HasAdmin() }}content-admin{{end}}{{end}} {{block content_body()}} {{ if OldNav || Theme == "classic"}} From 44f76fc837d5c4fca61e8f085e9d81eb6975f0a2 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 05:33:46 +0100 Subject: [PATCH 122/191] Update classic.css --- public/css/themes/classic.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index 7ec22b31..100e3b16 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -573,14 +573,14 @@ td.tr-size { .container.bottom { padding: 5px 10px; padding-top: 0; - margin-top: -8px; + margin-top: -11px; } .container.bottom .pagination { border-top: none; - padding: 0; + padding: 0 14px; } .container.bottom .pagination p { - margin: 4px 0 6px 0px; + margin: 2px 0 4px 0px } .bottom.center { width: 87%; From 9792e4eee319d772b11da0e568f596d5f041b7fd Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 05:43:16 +0100 Subject: [PATCH 123/191] Update classic.css --- public/css/themes/classic.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index 100e3b16..c3fea0cc 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -63,7 +63,7 @@ a { .sukebei a { color: #660000; } -a:hover { +a:hover, .h-nav a:hover { text-decoration: underline; } @@ -95,7 +95,7 @@ th.tr-name a { font-size: 0.9em; } .tr-links { - width: 29px; + width: 22px; text-align: right; } .tr-links .icon-magnet::before { @@ -739,7 +739,7 @@ span.tag { top: 110px; } .content > div#announce:first-child+div.refine+div #reportPopup { - top: 67px; + top: 65px; } #reportPopup { text-decoration: underline dotted; From 3ae6e7df7ec45172eae4ef4fb952276acbbeea5d Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 05:45:05 +0100 Subject: [PATCH 124/191] Update classic.css --- public/css/themes/classic.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index c3fea0cc..2aebd7d6 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -341,7 +341,7 @@ span.comment-index+p { text-decoration: underline; } .comment-index { - margin: 3px 0 0 0; + margin: 1px 0; } #solution { From d20fe56594d89d36a5ace92443c73d6d81b8e2ea Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 05:47:02 +0100 Subject: [PATCH 125/191] Update classic.css --- public/css/themes/classic.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index 2aebd7d6..13997729 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -751,6 +751,9 @@ span.tag { top: 103px; right: 11px; } +.comment-content :first-child { +margin-top: 5px; +} .sukebei #reportPopup { color: #660000!important; } From 40b282057ded62203409151104b17a1d2a5aeaa7 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 05:49:03 +0100 Subject: [PATCH 126/191] Update main.css --- public/css/main.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/css/main.css b/public/css/main.css index 19f2045d..1902601e 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1191,7 +1191,7 @@ html, body { .comment-box { padding: 0 7px; margin: 10px 30px 0 30px; - min-height: 70px; + min-height: 67px; word-break: break-word; text-align: justify; } @@ -1201,7 +1201,8 @@ html, body { } .comment-box .comment-userinfo { - margin-top: 9px; + display: block; + margin-top: 6px; } .comment-box .comment-user { From 32ddba50abb59d8bb8c2efc5d253c56b85e9b233 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 05:49:24 +0100 Subject: [PATCH 127/191] Update classic.css --- public/css/themes/classic.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index 13997729..4662dd17 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -38,7 +38,7 @@ body, .header { } .comment-userinfo { - margin-top: auto; + margin-top: 0!important; } .form-refine span.spacing { From 0b287920782c592fe95f3207d4b2dd7bf3bc280b Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 05:55:29 +0100 Subject: [PATCH 128/191] Update main.css --- public/css/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/main.css b/public/css/main.css index 1902601e..28847304 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1202,7 +1202,7 @@ html, body { .comment-box .comment-userinfo { display: block; - margin-top: 6px; + margin-top: 8px; } .comment-box .comment-user { From daacc546be2f4796e62c108eb01d9855b20df611 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 05:59:38 +0100 Subject: [PATCH 129/191] Update classic.css --- public/css/themes/classic.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/themes/classic.css b/public/css/themes/classic.css index 4662dd17..274c81c2 100644 --- a/public/css/themes/classic.css +++ b/public/css/themes/classic.css @@ -38,7 +38,7 @@ body, .header { } .comment-userinfo { - margin-top: 0!important; + margin-top: -10!important; } .form-refine span.spacing { From eb4cd2e376b6c5ff9b05591fce271c476547d71d Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 06:03:45 +0100 Subject: [PATCH 130/191] Update main.css --- public/css/main.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/css/main.css b/public/css/main.css index 28847304..3a510247 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -349,6 +349,8 @@ select.form-input { font-size: 8px; top: 37px; right: 22px; + max-height: 17px; + line-height: 10px; } #content { From 5268d25a2dbd06b2bdc2395f05ca913aa0a5379d Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 06:21:20 +0100 Subject: [PATCH 131/191] Update reports.go --- controllers/moderator/reports.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/controllers/moderator/reports.go b/controllers/moderator/reports.go index d78d54bb..cee63d9d 100644 --- a/controllers/moderator/reports.go +++ b/controllers/moderator/reports.go @@ -1,7 +1,6 @@ package moderatorController import ( - "fmt" "html" "net/http" "strconv" @@ -39,13 +38,16 @@ func TorrentReportListPanel(c *gin.Context) { func TorrentReportDeleteModPanel(c *gin.Context) { id := c.PostForm("id") - fmt.Println(id) - idNum, _ := strconv.ParseUint(id, 10, 64) - _, _, _ = reports.Delete(uint(idNum)) - /* If we need to log report delete activity - if err == nil { - activity.Log(&models.User{}, torrent.Identifier(), "delete", "torrent_report_deleted_by", strconv.Itoa(int(report.ID)), router.GetUser(c).Username) + if c.Request.URL.Query()["all"] != nil { + reports.DeleteAll() + } else { + idNum, _ := strconv.ParseUint(id, 10, 64) + _, _, _ = reports.Delete(uint(idNum)) + /* If we need to log report delete activity + if err == nil { + activity.Log(&models.User{}, torrent.Identifier(), "delete", "torrent_report_deleted_by", strconv.Itoa(int(report.ID)), router.GetUser(c).Username) + } + */ } - */ c.Redirect(http.StatusSeeOther, "/mod/reports?deleted") } From 97588fa908a92bb9e069e3db8f9555ac420e013b Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 06:22:13 +0100 Subject: [PATCH 132/191] Update interaction.go --- models/reports/interaction.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/models/reports/interaction.go b/models/reports/interaction.go index 6c62b27d..bbe52f6c 100644 --- a/models/reports/interaction.go +++ b/models/reports/interaction.go @@ -32,6 +32,10 @@ func Delete(id uint) (*models.TorrentReport, int, error) { return &torrentReport, http.StatusOK, nil } +func DeleteAll() { + models.ORM.Delete(&models.TorrentReport{}) +} + func findOrderBy(parameters Query, orderBy string, limit int, offset int, countAll bool) ( torrentReports []models.TorrentReport, count int, err error, ) { From 37e1fac280e5faf0c40cb058a5ecfa6824c3fc4c Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 06:24:30 +0100 Subject: [PATCH 133/191] Update torrent_report.jet.html --- templates/admin/torrent_report.jet.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/admin/torrent_report.jet.html b/templates/admin/torrent_report.jet.html index 803ee37e..7ac557cb 100644 --- a/templates/admin/torrent_report.jet.html +++ b/templates/admin/torrent_report.jet.html @@ -37,5 +37,9 @@ {{end}} +
+ + + {{end}} From 7194b3db4f27b393bd7432baba02f76352f86df0 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 06:24:53 +0100 Subject: [PATCH 134/191] Update CHANGELOG.md --- translations/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/translations/CHANGELOG.md b/translations/CHANGELOG.md index 69d8b43c..6439b1fe 100644 --- a/translations/CHANGELOG.md +++ b/translations/CHANGELOG.md @@ -81,3 +81,4 @@ * + followers * ~ description_markdown_notice -> comment_markdown_notice * + browsing_user_torrents +* + delete_all_reports From 346f3e7506ed11fb5242652ed8f700362736e51a Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 06:25:14 +0100 Subject: [PATCH 135/191] Update en-us.all.json --- translations/en-us.all.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/translations/en-us.all.json b/translations/en-us.all.json index 09769e03..e9d80cf8 100644 --- a/translations/en-us.all.json +++ b/translations/en-us.all.json @@ -983,6 +983,10 @@ "id": "delete_report", "translation": "Delete Report" }, + { + "id": "delete_all_reports", + "translation": "Delete all reports" + }, { "id": "comment_deleted", "translation": "Comment has been deleted!" From 9a0a6f1277a0120a7c8ca2b3fb46a5b3b1d52df1 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 06:31:28 +0100 Subject: [PATCH 136/191] Update main.css --- public/css/main.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/css/main.css b/public/css/main.css index 3a510247..9fb0c1c0 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1563,7 +1563,9 @@ input.filelist-checkbox:checked+table.table-filelist { .modal-body :first-child { margin-top: 0; } - +.modal-body h4 { + margin-bottom: 6px; +} /* Modal Footer */ From c26ce31c969e9b5fd89992f4ff6e76e13a1fd9a6 Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 06:32:19 +0100 Subject: [PATCH 137/191] Update view.jet.html --- templates/site/torrents/view.jet.html | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/templates/site/torrents/view.jet.html b/templates/site/torrents/view.jet.html index da722c39..fbe4a31d 100644 --- a/templates/site/torrents/view.jet.html +++ b/templates/site/torrents/view.jet.html @@ -161,8 +161,8 @@
{{ T("torrent_file")}}
- {{ if User.ID > 0}} {{ T("report_btn") }} + {{ if User.ID > 0}} {{ if User.HasAdmin()}}
{{ yield csrf_field()}} @@ -251,7 +251,6 @@
-{{ if User.ID > 0 }} +{{ if User.ID > 0 }}