Commit Graph

113 Commits

Author SHA1 Message Date
katnyaa 159d5a5d9e Fix lint errors 2017-05-22 15:12:17 +01:00
nyaadev a4c7dd7912 Add ReCaptcha to upload page if user is not logged in.
Bring back CSRF to upload form (Use the upload API)
2017-05-21 19:29:21 +02:00
nyaadev 9af778217b DB CHANGE: Add uploader ip address to torrent column and show on torrent view page for superadmins.
Added migration script!: remove sukebei_ lines if your local db does not have those.
Show users ip address on user page for superadmins.
Rename Admin to Moderator internally.
Moderators can now change user level to trusted.
Superadmins can make users moderator.
Improve changing user level.
2017-05-21 19:12:15 +02:00
nyaazi 92a6074fa2 Merge branch 'master' into reports 2017-05-21 18:48:45 +03:00
TheAMM af0cca2f8c Display full category names on upload/edit category lists 2017-05-20 22:50:40 +03:00
TheAMM b9d88e8960 Restructure upload.html and edit.html as well as route logic
Rename variables and reformats user/admin logic
Add an is_trusted field to upload and edit forms

Restructure fields on upload and edit pages
Add simple styling for checkboxes
Add titles (mouseover) for checkboxes with crude explanations
Show Anonymous checkbox during upload and check & disable it for guests
Show Trusted checkbox for users at or above Trusted level
Adjust description field rendering to show field label above it

Add title (mouseover) for edit icon on torrent page
Show uploader for admins on anonymous torrents
Show uploader for admins when editing others' torrents
2017-05-20 22:00:45 +03:00
nyaazi 04c9ef6685 Redundant query 2017-05-20 15:02:26 +03:00
nyaazi ec0f8000d7 Usage of WTForms for report action 2017-05-20 14:23:29 +03:00
nyaazi 73c84ce5ec Remove duplicate reports for already reviewed torrent 2017-05-20 13:58:58 +03:00
nyaazi 354736720b Implemented report action
Actions: Close report, Hide torrent, Delete torrent
2017-05-20 13:33:58 +03:00
Simon Veit Engmann cc957ccc96 Changed RSS feed to conform to RSS standards and added a namespace 2017-05-20 01:13:04 +02:00
TheAMM 358c75036b Fix RSS link generation on user pages
Also removes a debug print (oops #2)
2017-05-19 23:20:15 +03:00
nyaazi 799d5914d6 Added reports page 2017-05-19 20:52:04 +03:00
TheAMM 68b5bc045b Add "magnets" parameter for RSS, slightly clean up home and view_user 2017-05-19 20:11:20 +03:00
nyaazi 98fbe6efb1 Adding report table, route and view. 2017-05-19 20:03:47 +03:00
TheAMM daef4a9c6a Finalize RSS ES fix 2017-05-19 19:25:48 +03:00
TheAMM e7614bcef1 Merge branch 'update-rss-template' of https://github.com/sharkykh/nyaa into sharkykh-update-rss-template 2017-05-19 18:31:10 +03:00
nyaadev 2a1f8fab87 pep8 2017-05-19 14:36:33 +02:00
TheAMM e554f9ae97 Fix category name on icon titletext, fixes #131
Also reformats the cat_id if-logic
2017-05-19 15:24:09 +03:00
TheAMM 18ebf201b8 Add a function for getting a id->category name map
Redo _create_upload_category_choices to use new function
Also removes (renames) by_id from models.SubCategory (we use composite key)
2017-05-19 15:21:20 +03:00
Mart 02fa705330 Merge pull request #107 from UnKnoWn-Consortium/patch-2
Make profile page more profile
2017-05-19 00:20:41 -04:00
TheAMM e5fce168a0 Upload API V2 2017-05-18 16:46:07 +03:00
kyamiko 746ea8b63d Comment debug print 2017-05-18 00:06:53 -04:00
kyamiko 785a8db0c8 Updated api/upload 2017-05-17 23:56:36 -04:00
UnKnoWn 2ef053dec8 Update routes.py 2017-05-18 04:37:22 +08:00
martstern 04047a5712 make admin unable to set own user class, fix missing post method 2017-05-17 09:17:08 -04:00
martstern 931b2b0b83 added user class display and editing 2017-05-17 06:02:15 -04:00
aldacron 40c311f80a fix registration 2017-05-17 02:36:27 -07:00
aldacron a2ca6eb2ac changed cache control from 1 hr to 5 mins 2017-05-17 01:05:55 -07:00
aldacron 5a1e44faff added success message after torrent edit 2017-05-17 00:56:51 -07:00
aldacron 8ffcbca4d5 improved profile page user flow. clears data on success and shows current email. also, flashes success message if successful 2017-05-17 00:53:07 -07:00
Johnny Ding ad17558ec3 Merge pull request #53 from sharkykh/pep8
Fix PEP8 errors and warnings
2017-05-17 00:08:42 -07:00
UnKnoWn cfb3fafd64 Merge remote-tracking branch 'refs/remotes/nyaadevs/master' 2017-05-17 14:51:47 +08:00
UnKnoWn 1fb249be35 Enforce password check on email change
Updated route handler to enforce current password check on all account details.
2017-05-17 05:10:25 +08:00
Johnny Ding 033e83562f Merge pull request #79 from nyaadevs/legacy-args
Support legacy arguments in search route
2017-05-16 13:04:52 -07:00
TheAMM dcad0572c5 RSS: add a simple one-hour Cache-Control 2017-05-16 15:59:03 +03:00
Kfir Hadas dbd3229956 PEP8 routes.py (E501) 2017-05-16 12:56:12 +03:00
Kfir Hadas 4e9409fb30 AutoPEP8 (after elasticsearch merge) 2017-05-16 12:47:06 +03:00
sharkykh beb5be9989 8: PEP8 routes.py (E265, E266, E713)
E265	block comment should start with ‘# ‘
E266	too many leading ‘#’ for block comment
E713	test for membership should be ‘not in’
2017-05-16 12:43:33 +03:00
sharkykh 1b99908283 PEP8 routes.py (E501)
line too long
2017-05-16 12:42:32 +03:00
sharkykh a79c0f8a93 PEP8 (a run of lint.sh) 2017-05-16 12:42:12 +03:00
sharkykh d4621a23a7 Add bare torrent hash
lambda is probably not the best way to go,
suggestions for improvement are welcome!
2017-05-16 12:31:35 +03:00
nyaadev0 472b78bac1 Support legacy arguments in search route 2017-05-16 04:27:13 -05:00
aldacron 00c768c722 merged elasticsearch, let's hope this doesn't break shit 2017-05-16 01:28:55 -07:00
aldacron 1d0177480e updated time display 2017-05-16 01:04:08 -07:00
aldacron 2005174358 finished up rss, changed rss behavior to include pre-defined trackers only, also cleaned up debug statements 2017-05-16 00:46:25 -07:00
aldacron 899aa01473 hooked up ES... 90% done, need to figure out how to generate magnet URIs 2017-05-15 23:51:58 -07:00
martstern 8a87ca93a5 styled user info better, show user class on profile 2017-05-16 00:20:40 -04:00
aldacron c2c547e786 some more elasticsearch work, including index mapping and analyzer 2017-05-15 11:14:01 -07:00
martstern eb59116429 allow admin to give trusted to users. show users their own info when logged in 2017-05-15 07:49:25 -04:00
sharkykh dd1f1b6834 Nicer looking file list (basic table) 2017-05-15 09:28:48 +03:00
aldacron 1c1a4747c8 Resolves #48 2017-05-14 01:39:28 -07:00
queue 8c951210d4 es: implement highlighting
no apologies for styling. somebody else with opinions will fix it later.
2017-05-14 02:19:42 -06:00
queue 3cbe2e4221 WIP hack in es as the provider for search results
real sketch. lots of stuff is still broken. But! you can
make elasticsearch q= style queries and it shows up properly.
only first page works; need to adapt pager to elasticsearch's "total-hits" thing.
2017-05-14 02:01:26 -06:00
nyaadev 064c33ecf4 Fix cookies messing with cache
Change Display name to Torrent display name for clarity
2017-05-13 19:26:43 +02:00
nyaadev a3422ce068 RSS: Fix #2 #5 and #12 2017-05-13 16:14:00 +02:00
TheAMM 43406fb831 Don't use a keyword as a variable name! 2017-05-13 08:20:14 +03:00
TheAMM b2106089b6 [backend] Move upload handling from routes.py into backend.py
Preparing for a better api
2017-05-13 03:38:38 +03:00
TheAMM 6990effaf7 [upload] Send 400 if POSTed at with a bad form 2017-05-13 03:15:34 +03:00
nyaadev b2b8ae9722 S T O P H A R D C O D I N G U R L S 2017-05-13 01:59:52 +02:00
TheAMM 38a3ba277c Make sure torrent backup directory exists before writing torrent 2017-05-13 02:41:52 +03:00
TheAMM 4f9ddfd7bc [templates] Clean up row headers to use a common macro, add title for s/l/d icons 2017-05-12 22:24:45 +03:00
nyaadev 00d65e312c Initial commit. 2017-05-12 20:51:49 +02:00