Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Graphe des révisions

2315 commits

Auteur SHA1 Message Date
kilo 5c0d5c77d9 Add files via upload 2017-07-08 23:34:46 +02:00
kilo a65c2671f4 too heavy 2017-07-08 23:34:07 +02:00
akuma06 487060c1a4 Forgot the login form test modification 2017-07-04 03:10:46 +02:00
akuma06 1e39f7df6b Fixed csrf in mod 2017-07-04 03:09:12 +02:00
akuma06 fb6bcc68d7 Fixed torrentRequest function 2017-07-04 03:05:00 +02:00
akuma06 920e4069a1 Modified img size of error pages 2017-07-04 03:02:19 +02:00
akuma06 c3b3542bad Changed Mark as Hidden
Strings need to be retranslated
2017-07-04 02:57:47 +02:00
akuma06 e4d4878d64 Added Missing test 2017-07-04 02:54:43 +02:00
akuma06 d74d337c25 Adding redirecto when login 2017-07-04 02:48:20 +02:00
akuma06 d4c245e256 Fixing torrent edit for user&admin 2017-07-04 02:40:54 +02:00
akuma06 330ab06597 Adding upload of multi lang full support 2017-07-04 02:07:25 +02:00
akuma06 1796538c36 typo -_-" 2017-07-04 01:23:17 +02:00
akuma06 2a0c2be105 Forgot to add a test 2017-07-04 01:22:12 +02:00
akuma06 e2f3507069 Some html fixes 2017-07-04 01:15:43 +02:00
akuma06 d16871d91a Fix rss magnet link 2017-07-03 02:37:36 +02:00
akuma06 5feec8748b Profile edit page works now 2017-07-03 02:31:17 +02:00
akuma06 b2e00dce1f Removing debug message 2017-07-03 02:19:37 +02:00
akuma06 929bf0e71b Fixing profile_edit 2017-07-03 02:16:39 +02:00
akuma06 1ca1f364a0 Fixing log in 2017-07-03 02:03:57 +02:00
akuma06 d84c294c1b Binding requirements for gin 2017-07-03 01:47:31 +02:00
akuma06 f3a323d7b8 Fixing html flags rendering 2017-07-03 01:30:06 +02:00
akuma06 caa7e499f3 Final fix for nil pointer 2017-07-03 01:22:54 +02:00
akuma06 baccce78e2 Added some check on User variable
User is now a pointer, so doing User.xxx will make an error nil pointer dereference. So we have to check that User is not nil
2017-07-03 01:11:45 +02:00
akuma06 5794704961 Another fix for nil pointer 2017-07-03 01:04:14 +02:00
akuma06 a02976ef57 Fixed pointer dereference
Limiting number of languages to 1 in listing view
2017-07-03 00:59:59 +02:00
akuma06 b10d5e32b5 Merge branch 'refactor' into second-batch 2017-07-03 00:44:50 +02:00
akuma06 b11c02e54e Fixed templates with new functions 2017-07-03 00:34:18 +02:00
akuma06 5b92c69cb8 Updated dependencies
Removed govalidator
Added validator
2017-07-02 23:56:53 +02:00
akuma06 47e1fd2169 Removed errors, changing old functions to new ones 2017-07-02 23:53:23 +02:00
akuma06 7846d999ff No errors on api controllers 2017-07-02 18:00:12 +02:00
akuma06 97b3a1d7ea Remove common package
Common is no more a thing
Use of TorrentParam instead of SearchParam now
Common structs for search are exported in utils/search/structs
Util has been renamed utils
2017-07-02 16:54:55 +02:00
akuma06 188c196fd3 Removed some unused dependencies 2017-07-01 23:23:15 +02:00
akuma06 205daea027 Finally services are nearly empty 👍
Moved api services. All validations are now in validator util and all upload functions are in upload util
2017-07-01 23:09:35 +02:00
akuma06 1316062c9a Refactored user forms struct + tests 2017-07-01 19:44:36 +02:00
akuma06 b142ee75a4 The validator work
Tests are passed
2017-07-01 02:59:39 +02:00
akuma06 946f02d0fc Use of validator pkg now
Use of validator pkg replacing modelHelper.

ValidateForm adds translated errors in messages context. To know if we have errors, we have to call messages.HasErrors() after the validation check.

New translation strings for some field check. I didn't add every tag as an error since it seems we won't use them (isbn, ...). This would overload the translation files that are already big.
2017-07-01 01:25:11 +02:00
kilo fae254c404 <kilo> u want me to re-make the PR but on the refactor branch, right? (#1087)
* margin-top removal

* flag-other background: none

* torrent language on other - upload.htl

* torrent language edit.html

* torrent language admin edit
2017-06-29 22:16:21 +10:00
PantsuDev ba1f48b08c Fix typo'd variable 2017-06-29 21:20:52 +10:00
PantsuDev e139f5e4db Fix most compiler errors 2017-06-29 21:15:23 +10:00
akuma06 4c8306a6fc Too much file to save :') 2017-06-29 01:11:03 +02:00
akuma06 210bf84d13 Forgot to commitsave these files 2017-06-29 01:06:30 +02:00
akuma06 2646bc2db8 This is a prelimenary work
Showing how we can remove services, preventing cyclic imports and lessing the number of imports.
Now db is in models. Db and models are highly tightened, according to go standards, you should put them in the same package.
In models, there are folders separating the different methods used to modify the models. For example, if you want to create a user, you have to use /models (for the user struct) and /models/user (for creating a user.
However, if you want to delete a torrent, you just have to import /models and do torrent.Delete(definitely bool).

By the way packages in models are the plural name of a model. For example, you have torrent.go for a torrent model and its package torrents for db stuff related functions (Find, Create, Some helpers)
2017-06-29 00:44:07 +02:00
akuma06 5991a21818 First batch of changes for the refactor (#1078)
* First batch of changes for the refactor

Added the support of gin in routes and other services/utils
Begining implementation of JetHTML

* Remove os folder

* Move scrapers to own repo

* Second batch of changes

All .jet.html are the working templates.
You can now test this PR, the index Page and upload works. If you want to complete the other html templates, you're welcome

* Move captcha to util

* Move uploadService to utils

* Use govalidator instead of regex

* Third batch of changes

All the front end should as previously.
I also fixed some minor things unrelated to the refactor (mostly style issues on static pages)
Now errors can be accessed by importing the "errors" helpers and using the `yield errors(name="xxx")` command in templates.
Same for infos.
Templates are now more hierarchized with a base template "base.jet.html" which is extended depending on the context in "index_site" or "index_admin" layouts. Those layouts are extended than in every pages.
Other helpers are captcha to render a captcha `yield captcha(captchaid="xxx")`
And also csrf, with the command `yield csrf_field()`
To translate, you don't have anymore to do `call $.T "xxx"`, you just have to do `T("xxx")`.

Pages for the website part are in folders in the folder "templates/site". Pages for the admin part are in "templates/admin". Layouts are separated in "templates/layouts". Helpers and menu are in "templates/layouts/helpers" and "templates/layouts/menu". Error pages should be put in "templates/errors"

* Added test on templates

When adding a new template, you have to tell to template_test.go, the context of the new template (if it doesn't use the common context)

* Panel admin works

Now the templating part should work. The PR can now be fully tested.

I think we should push the templating PR  and do the routes/controllers/removal of services in another branch. So we know that this one is functional

* Updated dependencies

* Fixed test for modelhelper

* Fix testing for commentlist

* Fix travis :')

* Just renamed router and removed network

* Applying same SEO fix

* Update form_validator.go

* Added back regexp package
2017-06-28 21:42:38 +10:00
PantsuDev 496e1d4ba4 Start refactor 2017-06-25 23:27:05 +10:00
MMP0 006dc1c034 Update Japanese translation (#1070)
* Update ja-jp.all.json

* Update ja-jp.all.json
2017-06-25 21:20:02 +10:00
sfan5 1dd7c9d5d3 Fix scraping on postgres 2017-06-25 13:18:03 +02:00
yiiT b59b5c092b Add /feed/magnet which displays the magnet instead of the torrent link (#1069)
* Add /feed/magnet which displays the magnet instead of the torrent link
2017-06-24 19:45:56 -05:00
akuma06 d4b36e2489 Fixes block templates for title and rss (#1068)
* Fixes block templates for title and rss

* Remove duplicate og site_name
* add rss links in meta for torznab and eztv
* Fixed 404 Error in og site_name

* Git didn't update the view fast enough
2017-06-25 01:54:33 +02:00
akuma06 4f203ba92c Merge pull request #1067 from Anonymous-senpai/patch-1
Update nl-nl.all.json
2017-06-25 01:53:09 +02:00
akuma06 ddafb142b6 Update nl-nl.all.json 2017-06-25 01:48:21 +02:00