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

46 commits

Auteur SHA1 Message Date
akuma06
b0aa111511 API update completely functionnal for app usage (#987)
The api has been tested and works as intended.
Now users do not have to go on the website to get back their token, they
just have to register.
Torrents show the right stats and username on api request when search is
done
User model when converted to JSON gives us the apitoken and md5 hash of
email (for gravatar)
Verification on upload is done by token and username instead of token
only
Errors are now given in json format in the api
Global api response handler for less code redundancy and same response
pattern
Moved user auth check in cookie_helper to user.go
Fixed bug with CSRF prevention in /api
Added translation strings
2017-06-13 16:01:57 +10:00
PantsuDev
994ea62eab
fix typos 2017-06-07 11:14:57 +10:00
akuma06
752544a52c New User status (#957)
Status for scrapped user
They can't log in and an explicit error message is shown when they try
explaining that they need to contact the moderators
They are displayed as simple members on the front-end however
2017-06-07 10:59:46 +10:00
ElegantMonkey
e10070b2a9 Add customizable mascot by URL.
Add a new setting for customizable mascots, with a new User field
MascotURL, and a corresponding cookie setting.
2017-06-05 11:32:48 -03:00
akuma06
5376b9e271 New config files (#854)
* New config files

As decided, config files are parsed at runtime.
I decided to go for YAML config files because there can be comments in
it.
There are 2 files:
* config/default_config.yml <= which shouldn't be edited unless we add a
config parameter
* config/config.yml <= which is the user-defined config. This file
shouldn't be commited

Changed every call to config.XXX to config.Conf.XXX (look to the new
stucture of config in config/types.go)

Of course, putting config parameters in config.yml overrides config in
config_default.yml. You don't have to put everything in it, just add
what you want to override.

* Fixing test

Replacing conf.New by config.Conf

* Fixing call to config.Conf to config.Config{} in test files

* Might have fixed testing with this

Printf instead of Fatalf

* Renaming config.yml in example file

* Forbid commiting config.yml

* Should be now fixed

* Do not need this file anymore
2017-05-30 21:21:57 -05:00
Steindór
ffbbacb84a Maskot to cookie (#857)
* Put the mascot into the cookie as well, major js cleanup

* Update en-us.all.json

* removed redundant translation
2017-05-30 21:21:35 -05:00
Steindór
25562e0d54 Account theme switcher (Pls merge) (#750)
* added pagination

* cleanup

* indentation fix

* fix

* Loads theme from context

* Basic theme switching working

* working properly

* Fuck golint tbqh

* united language and theme into one settings page

* made the settings page a little nicer

* fixed it so it works properly now

* removed parts of inline js and fixed bug

* removed remains of other theme switching method

* fixed very minor bug

* fix
2017-05-27 12:08:47 -05:00
akuma06
0f66ec9340 Trackers in Torrents + Missing comments + Function renaming (#768)
* Missing comments and Function renaming

* Added some missing comments
* Renamed functions to get user followers/following
* GetFollowers to get followers
* GetLikings to get who the user is following

* Renaming + Add support of previous trackers

* Renaming user.Likings in user.Followers
* Renaming user.Liked in user.Likings
* Add a new string field Trackers in torrent model
* Trackers from torrent file are now populated to the databse
* Needed trackers are added to the torrent trackers if not provided or
if trackers is empty in DB (backward compatibility)

* New check and url encoding

* No more regex for verifying tracker url
* Encodes tracker url for "&" & "?" character possibly existing in
tracker url and breaking magnet link

* Improvements

* Trackers are now encoded in torrent.ParseTrackers
* Faster check by using the for loop of checktrackers
* No more boolean, we need to check len of array returned
* torrent.Trackers can be directly used in url as they are encoded like
: tr=tracker1&tr=tracker2&tr=...
2017-05-27 00:45:18 +02:00
akuma06
6481e90a0c Golint friendly next (#756)
* Gofmt friendly

Keeping Go source code in line with what they preconize

* Golint Friendly Next

So I have made some variables unexported
Added comments in every function that I know what it does
Removed some deprecated stuff that I was sure of
Added a comment on possible deprecated methods "Is it deprecated?"
Changed some variable/method name according to golint recommendations

* Update filelist.go
2017-05-26 12:12:52 +02:00
Eliot Whalan
b4b1b1c26a
go fmt all the code 2017-05-24 17:11:13 +10:00
akuma06
07c120407e Finished 2017-05-22 00:22:42 +02:00
akuma06
a4c23dda1f wiiiip 2017-05-21 20:20:40 +02:00
akuma06
5639033370 Wiiiiiip 2017-05-21 19:38:39 +02:00
akuma06
32c51a57cb User Settings Notification (WIP) 2017-05-21 18:13:28 +02:00
akuma06
0390fc5215 Mostly done 2017-05-21 00:02:57 +02:00
akuma06
4cbbb95e4f Notification for Users (WIP) 2017-05-20 20:53:05 +02:00
sfan5
a3fa6df938 Remove bugs (#643)
* Fix S/L/D columns wasting huge amounts of space

Partially reverts 0c9cdfa8bf.

* Move last scrape below seed-bar

Also fixes the very misleading indentation

* Show category name on view page too

* Fix fucked up login page (fixes #640)

* Fix empty page on login w/o pass (fixes #634)

* Fix incorrectly colored error text in day mode

* Better readable footer in night mode

* Prepare having old uploader names on sukebei and various fixes for sukebei

* Different HTML title for sukebei
2017-05-20 20:45:27 +10:00
tomleb
7eee47b0d3 Fix bug, remove literals (#629)
* Use ModeratorDir variable

* Rename cookieHelper to cookie_helper for consistency

* Use named constant instead of literals

* Fix ability to upload when uploads are disabled

The old code let people upload under the right conditions when uploads
were disabled. (ie: User is banned and config.AdminAreStillAllowedTo is
false)

* Increase timeout (fixes #517)

* Fix inconsistent indentation *.{js, css} (fix #583)

* Fix negative page

Temporary fix. The issue was that going to a negative page caused the
sql query to have a negative offset. This caused an error in the
database query.

We need to cleanup this code, but this will work for now.

* Fix wrong PG_DATA directory due to upgrade to 9.6

* Add server status link to FAQ

* Fix failing tests

* Clarify group_vars/all and hosts doc

* Add a wrapper to protect /mod route

* Fix login page not showing form errors
2017-05-20 09:10:16 +10:00
sfan5
dc509ff18c Stateless cookie auth 2017-05-12 12:40:31 +02:00
Eliot Whalan
bcaac0961f Revert "Stateless cookies (#372)"
This reverts commit 2f06fb8fa1.
2017-05-12 16:42:15 +10:00
sfan5
019f37dc4d Stateless cookies (#372)
* Remove eddie4.nl tracker

It resolves to the same IP address as leechers-paradise which we already have.

* Remove database usage from cookie auth

* Hide "Remember Me" as it doesn't work yet
2017-05-11 16:18:56 -05:00
ayame-git
8373bce02f unborked report list 2017-05-10 22:09:37 +03:00
Eliot Whalan
5de19ec928 add md5 gorm column back 2017-05-10 21:57:31 +10:00
sfan5
775f9c15ad Display username of old uploads alongside れんちょん 2017-05-10 13:32:45 +02:00
bakape
8b56f2e76e Merge branch 'master' of https://github.com/ewhal/nyaa into search-caching 2017-05-10 11:47:06 +03:00
bakape
7ff8e97c9d Framework for caching []model.Torrents 2017-05-10 11:27:17 +03:00
Your Name
c5da59234f idgaf about consistency dont fucking fuck all the relations 2017-05-10 05:17:11 +00:00
Chris MacLeod
c9b72206a5 Consistency, formatting, error checking, cleanup, and a couple bug fixes (#245)
* Checkpoint: it builds

The config, db, model, network, os, and public packages have had some
fixes to glaringly obvious flaws, dead code removed, and stylistic
changes.

* Style changes and old code removal in router

Router needs a lot of work done to its (lack of) error handling.

* Dead code removal and style changes

Now up to util/email/email.go. After I'm finished with the initial sweep
I'll go back and fix error handling and security issues. Then I'll fix
the broken API. Then I'll go through to add documentation and fix code
visibility.

* Finish dead code removal and style changes

Vendored libraries not touched. Everything still needs security fixes
and documentation. There's also one case of broken functionality.

* Fix accidental find-and-replace

* Style, error checking, saftey, bug fix changes

* Redo error checking erased during merge

* Re-add merge-erased fix. Make Safe safe.
2017-05-09 21:34:40 -05:00
akuma06
9bbd544a20 Added Follow&Unfollow 2017-05-10 03:16:36 +02:00
sfan5
5bb6244564 Don't generate gravatar hash if no email 2017-05-09 17:20:19 +02:00
sfan5
30f3b0c6eb Fix creating of useless table 2017-05-09 17:14:13 +02:00
sfan5
128b070968 Maybe fix gravatar 2017-05-09 16:50:29 +02:00
sfan5
5d57233882 Cleanup of user model 2017-05-09 12:16:41 +02:00
Andrew Zhao
1c44a24ab0 make user torrent list display 2017-05-08 22:21:14 -07:00
akuma06
84cf511fe3 Fixed User
Profile Page, badge menu, every thing before previous commit (except
email)
Added Logout
2017-05-09 03:37:12 +02:00
sfan5
173dc9e34c Remove unused code 2017-05-08 22:50:56 +02:00
sfan5
a3d13f768a Switch to new schema: make it compile 2017-05-08 22:50:56 +02:00
sfan5
e3a271cca7 Revert "Added Profile page"
This reverts commit 5860cf1d79.
2017-05-08 22:50:25 +02:00
akuma06
cdf8cccc8d Added Profile page 2017-05-08 18:56:40 +02:00
akuma06
2be8fb2b7c Cleaned up User Model 2017-05-08 14:28:02 +02:00
akuma06
9bc75c86f3 Added logged badge + new User variable in each template variables 2017-05-08 01:46:30 +02:00
akuma06
68a7b5922a Merge branch 'master' into master 2017-05-06 22:17:13 +02:00
akuma06
30a53a79ec Forgot files 2017-05-06 22:14:02 +02:00
ayame-git
a55bb483da Status model and field for Users 2017-05-07 01:52:27 +03:00
akuma06
9b5cd38b99 Added torrents on model user 2017-05-06 18:09:29 +02:00
akuma06
148f70b53f Models for User, Role and Comment
modelHelper for getting value from request and apply it to a Form
Getting value from a Form and apply to a Model
2017-05-06 17:55:02 +02:00