From b96de6ce4b3850de67dab6aa1372998a38b3c6bf Mon Sep 17 00:00:00 2001 From: sfan5 Date: Thu, 1 Jun 2017 23:17:36 +0200 Subject: [PATCH 1/6] Minor code cleanup for commit b6989f77d09c10f74eb191d0e7e3eb4da5257b0e --- templates/view.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/view.html b/templates/view.html index fa332bb6..67e5ce27 100644 --- a/templates/view.html +++ b/templates/view.html @@ -121,7 +121,7 @@

{{call $.T "comments"}}

{{range $index, $element := .Comments}}
- #{{inc $index}}{{.Date.Format "2006-01-02T15:04:05Z07:00"}} + #{{inc $index}}{{formatDateRFC .Date}}

{{.Username}}

{{.Content}}

From 38cf9ab994c244dd45f2751fa78b24983bf5f220 Mon Sep 17 00:00:00 2001 From: kipukun Date: Thu, 1 Jun 2017 20:16:56 -0400 Subject: [PATCH 2/6] Fix up settings page a bit --- templates/public_settings.html | 6 ++---- translations/en-us.all.json | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/templates/public_settings.html b/templates/public_settings.html index adba51b3..e3750227 100644 --- a/templates/public_settings.html +++ b/templates/public_settings.html @@ -1,7 +1,6 @@ {{define "title"}}{{call $.T "change_language"}}{{end}} {{define "content"}} -
-
+
{{ block "csrf_field" $ }}{{end}}
@@ -31,8 +30,7 @@
-
-
+
{{end}} diff --git a/translations/en-us.all.json b/translations/en-us.all.json index c5906bfb..21102c8e 100644 --- a/translations/en-us.all.json +++ b/translations/en-us.all.json @@ -997,7 +997,7 @@ }, { "id": "cookies", - "translation": "By cliking save you consent to our use of cookies" + "translation": "By clicking save, you consent to our use of cookies" }, { "id": "show", From c4511f7238012fda4e40c95bc4eb8125d5070a87 Mon Sep 17 00:00:00 2001 From: kipukun Date: Thu, 1 Jun 2017 22:50:56 -0400 Subject: [PATCH 3/6] Style error texts on form inputs, everywhere (#877) --- public/css/g.css | 4 ++-- public/css/main.css | 7 +++++-- public/css/tomorrow.css | 4 ++-- templates/_profile_edit.html | 40 ++++++++++++++++++------------------ templates/upload.html | 2 +- templates/user/login.html | 6 +++--- templates/user/register.html | 12 +++++------ 7 files changed, 39 insertions(+), 36 deletions(-) diff --git a/public/css/g.css b/public/css/g.css index 16cc2976..10335716 100644 --- a/public/css/g.css +++ b/public/css/g.css @@ -43,8 +43,8 @@ th a { color: #7A5C94; } th { border-color: #cbbdd7 !important; } td { border-color: #e6eff4 !important; } -td.tr-se { color: #22A243; } -td.tr-le { color: #E84C4C; } +td.tr-se, .success-text { color: #22A243; } +td.tr-le, .error-text { color: #E84C4C; } .aplus { background: hsla(200, 100%, 50%, 0.2) !important; } .trusted { background: hsla(100, 100%, 50%, 0.2) !important; } diff --git a/public/css/main.css b/public/css/main.css index 918cdc14..d555d2d7 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -424,8 +424,8 @@ th a { color: #6E96AA; } th { border-color: #ddd !important; } td { border-color: #ccc !important; } -td.tr-se { color: #22A243; } -td.tr-le { color: #E84C4C; } +td.tr-se, .success-text { color: #22A243; } +td.tr-le, .error-text { color: #E84C4C; } /* Original Nyaa colors, do NOT change! */ .aplus { background: #60B0F0; } @@ -712,3 +712,6 @@ input.filelist-checkbox:checked + table.table-filelist { .editor-preview-side { top: 110px; } +.error-text, .success-text { + text-align: center; +} diff --git a/public/css/tomorrow.css b/public/css/tomorrow.css index 8b409c56..86342c72 100644 --- a/public/css/tomorrow.css +++ b/public/css/tomorrow.css @@ -37,8 +37,8 @@ th a { color: #c5c8c6; } th, td { border-color: #141517 !important; } -td.tr-se { color: #b5bd68; } -td.tr-le { color: #cc6666; } +td.tr-se, .success-text { color: #b5bd68; } +td.tr-le, .error-text { color: #cc6666; } .aplus { background: hsla(180, 50%, 50%, 0.2) !important; } .trusted { background: hsla(90, 50%, 50%, 0.2) !important; } diff --git a/templates/_profile_edit.html b/templates/_profile_edit.html index 1f27602e..99fb4212 100644 --- a/templates/_profile_edit.html +++ b/templates/_profile_edit.html @@ -1,10 +1,10 @@ {{define "profile_edit_content"}} {{with .UserProfile}} {{ range (index $.FormInfos "infos")}} -
× {{ . }}
+

{{ . }}

{{end}} {{ range (index $.FormErrors "errors")}} -
× {{ . }}
+

{{ . }}

{{end}}

{{ call $.T "personal_info"}}

@@ -16,7 +16,7 @@

{{ range (index $.FormErrors "email")}} -

{{ . }}

+

{{ . }}

{{end}}

{{ range (index $.FormErrors "language")}} -

{{ . }}

+

{{ . }}

{{end}} {{ if not (HasAdmin $.User)}}

{{ range (index $.FormErrors "current_password")}} -

{{ . }}

+

{{ . }}

{{end}} {{end}}

{{ range (index $.FormErrors "password")}} -

{{ . }}

+

{{ . }}

{{end}}

{{ range (index $.FormErrors "password_confirmation")}} -

{{ . }}

+

{{ . }}

{{end}}

{{ call $.T "preferences"}}


@@ -54,7 +54,7 @@
{{ range (index $.FormErrors "theme")}} -

{{ . }}

+

{{ . }}

{{end}} {{ with .Settings }} {{ if DefaultUserSettings "new_torrent"}} @@ -64,7 +64,7 @@
{{ range (index $.FormErrors "new_torrent")}} -

{{ . }}

+

{{ . }}

{{end}} {{end}} {{ if DefaultUserSettings "new_torrent_email"}} @@ -74,7 +74,7 @@
{{ range (index $.FormErrors "new_torrent_email")}} -

{{ . }}

+

{{ . }}

{{end}} {{end}} {{ if DefaultUserSettings "new_comment"}} @@ -84,7 +84,7 @@
{{ range (index $.FormErrors "new_comment")}} -

{{ . }}

+

{{ . }}

{{end}} {{end}} {{ if DefaultUserSettings "new_comment_email"}} @@ -94,7 +94,7 @@
{{ range (index $.FormErrors "new_comment_email")}} -

{{ . }}

+

{{ . }}

{{end}} {{end}} {{ if DefaultUserSettings "new_responses"}} @@ -104,7 +104,7 @@
{{ range (index $.FormErrors "new_responses")}} -

{{ . }}

+

{{ . }}

{{end}} {{end}} {{ if DefaultUserSettings "new_responses_email"}} @@ -114,7 +114,7 @@
{{ range (index $.FormErrors "new_responses_email")}} -

{{ . }}

+

{{ . }}

{{end}} {{end}} {{ if DefaultUserSettings "new_follower"}} @@ -124,7 +124,7 @@
{{ range (index $.FormErrors "new_follower")}} -

{{ . }}

+

{{ . }}

{{end}} {{end}} {{ if DefaultUserSettings "new_follower_email"}} @@ -134,7 +134,7 @@
{{ range (index $.FormErrors "new_follower_email")}} -

{{ . }}

+

{{ . }}

{{end}} {{end}} {{ if DefaultUserSettings "followed"}} @@ -144,7 +144,7 @@
{{ range (index $.FormErrors "followed")}} -

{{ . }}

+

{{ . }}

{{end}} {{end}} {{ if DefaultUserSettings "followed_email"}} @@ -154,7 +154,7 @@
{{ range (index $.FormErrors "followed_email")}} -

{{ . }}

+

{{ . }}

{{end}} {{end}} {{end}} @@ -163,7 +163,7 @@
{{ range (index $.FormErrors "username")}} -

{{ . }}

+

{{ . }}

{{end}} {{ range (index $.FormErrors "status")}} -

{{ . }}

+

{{ . }}

{{end}} {{end}} diff --git a/templates/upload.html b/templates/upload.html index 595979d6..65e554ac 100644 --- a/templates/upload.html +++ b/templates/upload.html @@ -5,7 +5,7 @@
{{ block "csrf_field" $ }}{{end}} {{ range (index $.FormErrors "errors")}} -
× {{ . }}
+

{{ . }}

{{end}}

{{call $.T "name"}}

diff --git a/templates/user/login.html b/templates/user/login.html index 275aafad..8e895d8d 100644 --- a/templates/user/login.html +++ b/templates/user/login.html @@ -8,15 +8,15 @@ {{ block "csrf_field" $ }}{{end}}

{{call $.T "sign_in_box_title"}}

{{ range (index $.FormErrors "errors")}} -
{{ . }}
+

{{ . }}

{{end}}
{{ range (index $.FormErrors "username")}} -

{{ . }}

+

{{ . }}

{{end}}
{{ range (index $.FormErrors "password")}} -

{{ . }}

+

{{ . }}

{{end}} + + {{end}} {{end}} {{ define "footer_js"}} + +{{ if HasAdmin $.User }} + + +{{end}} {{end}} \ No newline at end of file diff --git a/translations/en-us.all.json b/translations/en-us.all.json index 21102c8e..67b3ce81 100644 --- a/translations/en-us.all.json +++ b/translations/en-us.all.json @@ -655,6 +655,10 @@ "id": "torrent_status_remake", "translation": "Remake" }, + { + "id": "torrent_status_blocked", + "translation": "Locked" + }, { "id": "profile_edit_page", "translation": "Edit %s's profile" @@ -935,6 +939,10 @@ "id": "edit", "translation": "Edit" }, + { + "id": "lock_delete", + "translation": "Lock & Delete" + }, { "id": "delete_definitely_torrent_warning", "translation": "You will not be able to recover the file, neither stop someone to reupload it!" @@ -1006,5 +1014,29 @@ { "id": "hide", "translation": "Hide" + }, + { + "id":"show_mod_tools", + "translation": "Show Mod Tools" + }, + { + "id":"hide_mod_tools", + "translation": "Hide Mod Tools" + }, + { + "id": "following_changes_applied", + "translation": "Following changes will be applied" + }, + { + "id": "changes_in_following_order", + "translation": "Changes will be made in the following order:" + }, + { + "id": "edit_changes", + "translation": "Edit Changes" + }, + { + "id": "delete_changes", + "translation": "Delete Changes" } ] From d1ff3866eab35fa3af8bb47e046fc174ca7fdc23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steind=C3=B3r?= Date: Fri, 2 Jun 2017 03:36:16 +0000 Subject: [PATCH 5/6] Default theme change (#875) * changed session cookie expiry * made /g/ the default theme --- public/css/classic.css | 2 ++ templates/index.html | 9 ++++++--- templates/public_settings.html | 5 ++--- 3 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 public/css/classic.css diff --git a/public/css/classic.css b/public/css/classic.css new file mode 100644 index 00000000..031c94af --- /dev/null +++ b/public/css/classic.css @@ -0,0 +1,2 @@ +/* This is a placeholder so the classic theme can be used */ +/* Ideally, the decorative parts of main.css would be here instead of there. This will have to do for now though */ diff --git a/templates/index.html b/templates/index.html index c16d2bad..8176a0a5 100755 --- a/templates/index.html +++ b/templates/index.html @@ -25,9 +25,12 @@ - - {{if .Theme}}{{end}} - + + {{if eq $.Theme ""}} + + {{else}} + + {{end}} {{ block "additional_header" .}}{{end}} diff --git a/templates/public_settings.html b/templates/public_settings.html index e3750227..3a5b08c8 100644 --- a/templates/public_settings.html +++ b/templates/public_settings.html @@ -13,10 +13,9 @@

{{call $.T "theme"}}


{{call $.T "mascot"}}

From 7e0714aa33bde86727ad1589544904257e19ced1 Mon Sep 17 00:00:00 2001 From: Myrmece Date: Fri, 2 Jun 2017 11:45:48 +0200 Subject: [PATCH 6/6] Updated translation. --- translations/fr-fr.all.json | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/translations/fr-fr.all.json b/translations/fr-fr.all.json index a09fb9b7..1d9b2f90 100644 --- a/translations/fr-fr.all.json +++ b/translations/fr-fr.all.json @@ -53,7 +53,7 @@ }, { "id": "theme_none", - "translation": "Aucun" + "translation": "Classique" }, { "id": "mascot", @@ -867,6 +867,14 @@ "id": "toggle_navigation", "translation": "Activer la navigation" }, + { + "id":"show_mod_tools", + "translation": "Afficher les outils de modération" + }, + { + "id":"hide_mod_tools", + "translation": "Maquer les outils de modération" + }, { "id": "torrent_status", "translation": "Statut du torrent" @@ -887,6 +895,22 @@ "id": "torrent_status_remake", "translation": "Remake" }, + { + "id": "following_changes_applied", + "translation": "Les modifications suivantes seront appliquées :" + }, + { + "id": "changes_in_following_order", + "translation": "Les modifications seront effectuées dans l'ordre suivant :" + }, + { + "id": "edit_changes", + "translation": "Éditer les modifications" + }, + { + "id": "delete_changes", + "translation": "Supprimer les modifications" + }, { "id": "are_you_sure", "translation": "Êtes-vous sûr ?" @@ -927,6 +951,10 @@ "id": "edit", "translation": "Éditer" }, + { + "id": "lock_delete", + "translation": "Bloquer et Supprimer" + }, { "id": "torrent_unblock", "translation": "Débloquer"