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

79 commits

Auteur SHA1 Message Date
akuma06
0dc4bd3c9a Torrent name when download
New Download Torrent controller when dowloading a torrent
Route download need to be set the same as in TorrentStorageLink
2017-05-28 01:29:46 +02: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
b191bd3286 Fix User Reset API (#772)
* Added a new function to only update columns of table user (less
useless query)
* Changed method to GET instead of POST because it is a link not a
button anymore
* Display of user profile if changes are successful
2017-05-27 11:54:54 +10:00
akuma06
2773fe200d Golint friendly (#747)
* Making the code Golint friendly

* No exported variables when not needed
* Same for functions
* Simplifying Templates variables with a form basic template variable
and a modelList basic template variable

* Adapted templates to new template variables

* use of .Models instead of model list
* use of .Form instead of modelform

* Small fix

* Small fix 2

Forgot $.Form

* Reverting templateDir as a var
2017-05-25 21:54:58 +02:00
akuma06
0b8a39c506 Fix error on user profile edit
* Missing ">" in a close tag
* Changing route name for apireset doing a conflict route on badgemenu
2017-05-25 18:54:34 +02:00
Eliot Whalan
bc3f1aa577
start work on api reset stuff 2017-05-25 12:18:31 +10:00
Eliot Whalan
5f89f9feb2
Merge branch 'dev' of https://github.com/NyaaPantsu/nyaa into dev 2017-05-25 10:42:55 +10:00
Eliot Whalan
bb7554b79a
add searching via the api 2017-05-25 10:42:35 +10:00
akuma06
6edc68fe22 Deleted torrents mod done (#732)
* Torrent Mass Edit Api (WIP)

* Torrents can be deleted in mass from frontend with api post request
* Torrents status can be edited from frontend with api post request
-- Look to function doc for more info on how to use it

It is a WIP so it might not work =D

* Finished Mass mod Api

As per suggestion of @yiiTT in #720, I added:
* Changing torrents category
* Deletion of reports with deletion of a torrent
* Changing owner of multiple torrents

Commit also add some new translation strings.

* Make some changes

* Reports can now be cleared for the torrents selected without having to
delete them
* Users with no admin rights can't delete reports

* Fix moveto to status

moveto deprecated in api

* Tested and works!

Changes:
* Updates only the colomns of torrent table
* Moved categories config in config/torrents.go

* Forgot this file in last commit

* Less useless queries

The use of Save makes it that users are created and updates also all the
associatiated models. Better to just update the colomns needed (less
useless queries)

* Some Updates

* Added a new status of 5 for locking torrents
* Modifying the list torrents view for using it in deleted torrents view
* Added function to get deleted torrents
* Torrents (and reports) can be definitely deleted
* Some new translation string

* Fixing

* fix 2

* Added upload check for locked torrents

If a user owns a torrent, has deleted it and try to repload it. As long
as it has not been locked, he can.

* Fixing wrong condition in isdeleted

* Finished

* Info messages on success when deletes or lock
* Fixed double deleted_at is Null
* Added Link to view of deleted torrents
* Added new translation string
2017-05-25 02:19:05 +02:00
akuma06
cf844f0d43 Merge branch 'dev' into torrent-mass-mod-edit 2017-05-24 20:29:52 +02:00
Eliot Whalan
b4b1b1c26a
go fmt all the code 2017-05-24 17:11:13 +10:00
akuma06
d2617c9c5d Torrent Mass Edit Api (WIP)
* Torrents can be deleted in mass from frontend with api post request
* Torrents status can be edited from frontend with api post request
-- Look to function doc for more info on how to use it

It is a WIP so it might not work =D
2017-05-24 01:03:03 +02:00
akuma06
07623e85ed Merge pull request #698 from NyaaPantsu/revert-692-revert-690-user-torrent-edit
Allow users to edit & delete their torrents
2017-05-23 19:43:09 +02:00
nopjmp
af2850518c Implement HEAD for views (#695)
* Implement HEAD for /view/{id}

Implement HEAD for the torrent view route by calling GetRawTorrentById.
Run gofmt on the file while we are here.

* Implement HEAD for /api/view/{id}

Implement HEAD in the same way as /view/{id}
Also run gofmt on the api_handler.go
2017-05-23 13:18:19 +10:00
akuma06
99f2092028 Revert "Revert "New User Edit Panel"" 2017-05-23 04:05:33 +02:00
alucard0134
ed5152a4a0 Revert "New User Edit Panel" 2017-05-22 19:10:06 -05:00
akuma06
c8c3dc1980 New User Edit Panel
User can edit torrents
* delete torrents
+ New translation string for mod panel and user edit torrent panel
+ Improvement of messages util with implementation of T (no need to get
Tfunc now, messages util do that for you)
+ Use of @ElegantMonkey GetCategories to generate select of categories
in search and forms
2017-05-23 01:26:09 +02:00
akuma06
7bda7d1538 Fixing routes URL
fix of "user/id/-" #676
2017-05-22 09:10:15 +02:00
akuma06
0390fc5215 Mostly done 2017-05-21 00:02:57 +02:00
akuma06
da948038d1 Fix router merge 2017-05-20 14:12:36 +02:00
akuma06
369c9151f1 Merge remote-tracking branch 'refs/remotes/origin/dev' into multi-action-torrents-mod
# Conflicts:
#	router/modpanel.go
#	router/router.go
#	service/torrent/torrent.go
2017-05-20 13:58:37 +02:00
akuma06
0d5e2abf7f Added multi action on torrents 2017-05-20 13:45:15 +02: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
Ramon Dantas
0f5a349c01 Add RSS feed to User Profile (issue #197) (#631)
Uses a similar syntax to the normal /feed URL, except it's added
to the /user/id/username URL.
2017-05-20 09:09:09 +10:00
tomleb
babf0a37f0 Cleanups and fixes (#623)
* Keep naming consistent

* Remove execute bit from files

* Default to DefaultLanguage (without passing it to the func)

* Remove commented code

* Use Content-Type to get language json

* Lines of 400 characters is dumb

* Update new repo in README

* Remove useless script since we fallback to a defaultlang

* Fix fallback language panic

* Fix uninitialized MaxPerPage when not in querystr

The issue was that the req.MaxPerPage was not set (default to 0) when
the query string didn't include "max". This makes the server query the
whole db since the resulting limit is 0.

* Fix creating empty torrents (only worked once)

* Lines of 400 characters is still dumb
2017-05-19 12:55:59 +10:00
akuma06
22c87a6bbf fix handlers error 2017-05-18 03:09:23 +02:00
tomleb
9c6c66d0e9 Don't make path configurable, detect empty directory 2017-05-17 19:05:58 -04:00
tomleb
44d75f506d Add dumps view 2017-05-17 19:05:58 -04:00
PantsuDev
70f87e7aac finish repo transfer 2017-05-17 15:58:40 +10:00
ElegantMonkey
9f9b45eb71 Add pagination to RSS handler
Make it behave more like the search handler.
2017-05-16 18:32:41 -03:00
sfan5
c0be570e54 Torrent Reassign feature for modpanel 2017-05-13 17:29:21 +02:00
ElegantMonkey
dfd9caeb31 Add language selector without login 2017-05-12 19:17:34 -03:00
akuma06
61ba31b337 No more gzip 2017-05-11 22:21:12 +02:00
ayame-git
f326d801c2 i don't even remember what i fix anymore' 2017-05-10 23:05:56 +03:00
ayame-git
1bf4012eb2 yea.. 2017-05-10 21:42:20 +03:00
ayame-git
fcd0fec9a5 some pages not dispyaing corectly in mod page 2017-05-10 20:17:07 +03:00
akuma06
b88cd33794 Merge branch 'master' of https://github.com/ewhal/nyaa into akuma06/master 2017-05-10 17:38:33 +02:00
akuma06
0bf8088457 Mostly finished
Someone need to do torrent edit page
Can't do it :/
2017-05-10 17:37:49 +02:00
akuma06
032688f532 Fixed 2017-05-10 16:43:50 +02:00
akuma06
54991542cb Merge branch 'master' of https://github.com/ewhal/nyaa into akuma06/master
Conflicts:
	router/templateVariables.go
2017-05-10 15:20:14 +02:00
ripdog
aae25274c1 Add a route for the user settings form: /edit,called UserDetailsHandler 2017-05-11 01:09:36 +12:00
akuma06
46d65ba865 Fixing Mod Panel (WIP) 2017-05-10 15:08:38 +02:00
Eliot Whalan
9682a3014e Make mod urls more sane 2017-05-10 22:09:12 +10:00
SpamNeko
e312581643 wrapHandler for http.Handler to redirect to 404 handler 2017-05-10 11:04:12 +01:00
Your Name
5f7adedab5 submit report 2017-05-10 08:17:21 +00:00
Your Name
e8c133fc69 display reports properly 2017-05-10 07:57:55 +00:00
Your Name
b5adfb8eb4 Merge remote-tracking branch 'tom/mod' 2017-05-10 07:32:01 +00:00
Your Name
7bffd59e85 shenanigans 2017-05-10 06:20:17 +00:00
Your Name
771527b518 everything 'works' now 2017-05-10 05:56:02 +00:00
tomleb
1ddd4c12f8 Start mod system 2017-05-10 00:34:00 -04:00