From 794e59f7013cd91fc1261344399c56f1f6ec47d7 Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 14 Jul 2017 21:02:01 +0200 Subject: [PATCH 01/32] Update upload.jet.html --- templates/site/torrents/upload.jet.html | 42 +++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/templates/site/torrents/upload.jet.html b/templates/site/torrents/upload.jet.html index 0a904b89..5db40b6c 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -8,8 +8,46 @@
{{ yield csrf_field() }}

{{ T("name")}}

- + {{ yield errors(name="name")}} + +

Preview your torrent

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryNameSizeSLDDate
+
+ + +
+
Example text2.6 GiB000Jul 12, 2017

{{ T("torrent_file")}}

@@ -69,4 +107,4 @@ {{ block footer_js()}} -{{end}} \ No newline at end of file +{{end}} From d618856d27a74624e5879369d78614157fc700e9 Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 14 Jul 2017 21:10:03 +0200 Subject: [PATCH 02/32] add classes --- templates/site/torrents/upload.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/site/torrents/upload.jet.html b/templates/site/torrents/upload.jet.html index 5db40b6c..bf8b3efa 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -60,7 +60,7 @@ {{ yield errors(name="magnet")}}

{{ T("category")}}

- {{ range _, cat := GetCategories(false, true) }} From 7382f175b959400c1e075f31887c89f8863365e2 Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 14 Jul 2017 21:34:25 +0200 Subject: [PATCH 03/32] JS script, missing flag stuff --- public/js/kilo.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 public/js/kilo.js diff --git a/public/js/kilo.js b/public/js/kilo.js new file mode 100644 index 00000000..71326690 --- /dev/null +++ b/public/js/kilo.js @@ -0,0 +1,28 @@ +document.getElementsByClassName("form-torrent-name")[0].onkeyup = function(){ + document.getElementsByClassName("table-torrent-name")[0].innerText = document.getElementsByClassName("form-torrent-name")[0].value; +}; + +document.getElementsByClassName("form-torrent-category")[0].onchange = function(){ + document.getElementsByClassName("table-torrent-category")[0].className = "table-torrent-category nyaa-cat nyaa-cat-" + Categorylist[document.getElementsByClassName("form-torrent-category")[0].selectedIndex]; +}; + +var CategoryList = [ + 5 + 12, + 5, + 13, + 6, + 3, + 4, + 7, + 14, + 8, + 9, + 10, + 18, + 11, + 15, + 16, + 1, + 2 +]; From a96d4f45e4b15f42219235bfbcc56fb10ca3cdbf Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 14 Jul 2017 21:37:48 +0200 Subject: [PATCH 04/32] remove useless functions that i had previously added --- 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 bf8b3efa..8f74cfdb 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -8,7 +8,7 @@ {{ yield csrf_field() }}

{{ T("name")}}

- + {{ yield errors(name="name")}}

Preview your torrent

@@ -60,7 +60,7 @@ {{ yield errors(name="magnet")}}

{{ T("category")}}

- {{ range _, cat := GetCategories(false, true) }} From 69387b42a44d656e6f4fc5f6878be7a6f7e1fb62 Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 14 Jul 2017 21:51:39 +0200 Subject: [PATCH 05/32] Update upload.jet.html --- templates/site/torrents/upload.jet.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/site/torrents/upload.jet.html b/templates/site/torrents/upload.jet.html index 8f74cfdb..cee74b34 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -105,6 +105,7 @@ {{end}} {{ block footer_js()}} + {{end}} From 5b83f4f2f553d564a451085e9ada3b1890ddef4e Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 14 Jul 2017 21:56:35 +0200 Subject: [PATCH 06/32] 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 cee74b34..214079e2 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -11,7 +11,7 @@ {{ yield errors(name="name")}} -

Preview your torrent

+

Preview your torrent

@@ -47,7 +47,7 @@ -
Jul 12, 2017
+

{{ T("torrent_file")}}

From b3c93b6db091cf645048ef56bd4102c481df7dd2 Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 14 Jul 2017 21:57:11 +0200 Subject: [PATCH 07/32] invisible by default --- templates/site/torrents/upload.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/site/torrents/upload.jet.html b/templates/site/torrents/upload.jet.html index 214079e2..f2714084 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -11,7 +11,7 @@ {{ yield errors(name="name")}} -

Preview your torrent

+ From 4ef7f602943b3086221302c86d5302b74ddefaf8 Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 14 Jul 2017 22:28:55 +0200 Subject: [PATCH 20/32] Update upload.jet.html --- templates/site/torrents/upload.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/site/torrents/upload.jet.html b/templates/site/torrents/upload.jet.html index 9e22f351..b570eea4 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -40,7 +40,7 @@
- 2.6 GiB + 570.4 MiB 0 0 0 From bd2d4d6363ef1172646d9489ced88851eb96cc04 Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 14 Jul 2017 22:49:12 +0200 Subject: [PATCH 21/32] update date based on current one --- templates/site/torrents/upload.jet.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/site/torrents/upload.jet.html b/templates/site/torrents/upload.jet.html index b570eea4..a2195981 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -105,7 +105,10 @@
{{end}} {{ block footer_js()}} - + From b6171f63269dd4922af62f2bc69c8669ac54afd3 Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 14 Jul 2017 22:53:35 +0200 Subject: [PATCH 22/32] Update upload.jet.html --- templates/site/torrents/upload.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/site/torrents/upload.jet.html b/templates/site/torrents/upload.jet.html index a2195981..b84e12cf 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -13,7 +13,7 @@