Commit Graph

72 Commits

Author SHA1 Message Date
TheAMM c655463078 search: Allow specifying multiple usernames...
...by repeating &u=user in the GET parameters.
No UX for this yet.
Reworks the RSS URL generator to fit with duplicated keys.
2019-10-31 22:56:47 +02:00
Nicolas F 16814d6eb7 Add trusted application functionality (#533)
* Add trusted application functionality

This lets users apply for trusted status, given certain minimum
requirements. Moderators can then review the applications, giving
a recommendation, and administrators can accept or reject them.

If an application is accepted or rejected, the user receives an
e-mail about it.

Markdown images are not rendered in applications to prevent browsers
from sending automatic requests to untrusted webservers.

Users who have had their application rejected cannot re-apply for a set
amount of days.

* minor fixes
2019-08-10 18:18:44 -07:00
Alex Ingram 8f4202c098 Improve mobile user experience. 2018-04-24 23:19:14 -05:00
Nicolas F 291f859a4f Use Flask-Assets to minify self-hosted JS files (#468)
* Use Flask-Assets to minify self-hosted JS files

By having Flask-Assets minify the two JS files we ship, namely
main.js and bootstrap-select.js, we can shave off 28406 bytes.

The minified files are generated on startup. If one wishes to
manually clean them up or build them, they can use the
"flask assets" management command, e.g. "flask assets clean".

* Workaround to fix tests

State carries over in tests, which is the dumbest shit ever. Fix it
by clearing the bundles before setting them.
2018-04-04 16:02:05 +02:00
Arylide 0b98b2454a New help section for IRC and some prod changes I never put in the repo because lazy. 2018-02-22 23:23:53 -08:00
Arylide ca7dc276e2 Fix some text and revert a js thing 2017-10-20 22:24:36 -07:00
Nicolas F b4c9d7cd1b Fix filter dropdowns if JS is disabled (#389)
Before bootstrap-select is loaded, a small JS piece replaces the
class for the pickers with the appropriate bootstrap-select classes.

If there is no JS, the dropdowns will stay as form-control.
2017-10-20 21:01:36 -07:00
nyaadev 4091cba837 fix mysql error and bad colors in css 2017-09-19 01:32:45 +02:00
Anna-Maria Meriniemi c5d705210d Read-only maintenance mode setting for config.py (#356)
Disables all POSTs, optionally allowing users to log in (without updating last login date)
Blocked POSTs will redirect to the GET endpoint if possible, otherwise to referrer or in last case, home page.
API requests will get a plaintext message with 405 status code.
2017-09-04 18:16:52 -04:00
sfan5 4995f95ebd Improve dark theme (#357)
* Add 'dark' class to <body> if dark theme is activated

* Make dark theme suck considerably less
2017-09-03 18:18:39 -04:00
nyaadev 57a71be7b8 minor changes 2017-08-31 14:20:34 +02:00
Alex Ingram df288bfadd Add Firefox search provider. (#353)
* Add Firefox search provider.

* Add search provider to layout.

* Add search thing for Sukebei, too.

* Fix layout.
2017-08-30 23:52:50 -04:00
A nyaa developer f8a314df4f Better bans (#341)
* better bans

* put jinja2 template into correct file
2017-08-25 18:53:35 -04:00
Kfir Hadas 9fef343c1b Move torrent edit and upload into 'torrents' blueprint
Move supporting functions and variables into other files
* nyaa.views.torrents:
  - _create_upload_category_choices
* nyaa.backend:
  - get_category_id_map
2017-07-27 14:14:00 +03:00
Kfir Hadas eccb0ebdff Move '/' and '/rss' routes into 'main' blueprint
and update templates.
2017-07-27 14:14:00 +03:00
Kfir Hadas 0887dde6fc Move /user/<user_name> route into a blueprint
Move supporting functions and variables into other files
* nyaa.utils:
  - cached_function
  - chain_get
* nyaa.search:
  - DEFAULT_MAX_SEARCH_RESULT
  - DEFAULT_PER_PAGE
  - SERACH_PAGINATE_DISPLAY_MSG
  - _generate_query_string
2017-07-27 14:14:00 +03:00
Kfir Hadas 3913d8cea2 Move admin routes into blueprint
and update templates

Routes:
* /reports
* /adminlog
2017-07-27 14:14:00 +03:00
Kfir Hadas f316353176 Move account routes into blueprint (#292)
and update templates,
and remove unused imports

Routes:
* /login
* /logout
* /register
* /profile
2017-07-27 14:14:00 +03:00
Kfir Hadas 911fbc317f Move static routes into a blueprint
and update templates

Routes:
* /help
* /rules
* /xmlns/nyaa
* /about (commented out)
2017-07-27 14:14:00 +03:00
Arylide 6988daf803 HTML Changes 2017-07-22 20:31:50 -07:00
TheAMM c31749c1d5 Add link for site-revision vs Github master comparison in footer
Quality of Life. What new features?
2017-07-22 21:41:48 +03:00
Arylide 2e8e548067 Revert "Autofocus on search input box"
This reverts commit c9389cb888.
2017-07-17 17:02:19 -07:00
mreweilk c9389cb888 Autofocus on search input box 2017-07-11 23:28:30 -04:00
mreweilk dd8cb4757e Admin Log 2.0 (#283)
* Admin log added

* Add admin log to top bar

* Fixed some admin log bugs

* Remove comment_id column because comments die when they are killed

* Fix tabs in admin log template

* Fixed sort of admin logs to be created_time desc

* Fix navbar wrapping to a new line

when 992px <= width <= 1200px

* Put reports and admin log in "Admin" dropdown

Applied ./lint.sh fixes

Fixed long lines

* Updated log to be text instead of id based to account for future deletions

* Small fix in log message formatting
2017-07-04 23:13:59 -05:00
UnKnoWn bd0f9edce3 Reorder the search bar
Moving media queries to the end to ensure priority
2017-06-07 04:15:45 +08:00
Kfir Hadas c70a60b719 UI Fixes (#246)
* Fix markdown renderer

Use a simple for loop instead of `for (var target of markdownTargets)`, because it's unsupported in IE.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of#Browser_compatibility

* view.html : HTML Fixes

- Remove unmatched `</a>`
- Add missing `</div>`
- Use single quotes in {{ }}
- Closing tags comments

* layout.html

- Use single quotes in {{ }}
- Closing tags comments

* help.html: Convert all `<p>` to `<div>`

HTML spec doesn't allow lists inside `<p>` elements.

* Missing semicolon in `<script>`
2017-06-05 20:23:30 -04:00
snowfag 68c2c965a4 Move hardcoded urls into config. 2017-06-03 14:40:32 -04:00
TheAMM 505b4e18bd Move to markdown-it, render markdown in DOMContentLoaded
No more separate <script>s for comments
Adds a link to a GFM cheatsheet on markdown form
Spaces to tabs on "markdownEditors" DOMContentLoaded
2017-06-01 06:28:38 -05:00
nyaazi bea63315cd Merge branch 'master' into reports 2017-05-29 16:20:48 +03:00
nyaazi 5332ba1a49 Merge branch 'master' into reports 2017-05-26 15:25:02 +03:00
shm0o 3edc73a518 templates/layout.html: use url_for for the appropriate endpoints 2017-05-25 19:33:47 -04:00
shm0o 18dd7cd66f static_cachebuster: build the url with url_for 2017-05-25 19:33:47 -04:00
TheAMM 3f49f17baa Add simple OG metadata tags to templates
Hello, #185
2017-05-26 01:03:59 +03:00
TheAMM 3bd4898a65 Hotfix #193
Temporary workaround because CSS is hard.
2017-05-26 00:09:37 +03:00
TheAMM 1ab3d6e3eb Add cachebuster helper function for static css/js 2017-05-25 20:11:37 +03:00
Kfir Hadas a64cac5e5e Basic collapsible file tree 2017-05-25 12:53:23 +03:00
TheAMM 4f1576e086 Fancy grammar in your anime torrents 2017-05-24 21:54:50 +03:00
TheAMM d287aaf974 Show "Search <user>'s torrents..." on user pages in search field 2017-05-24 17:34:53 +03:00
ReimuHakurei 3418cb6175 More validation. 2017-05-24 06:45:00 +00:00
ReimuHakurei 3efda25f88 Increment css version 2017-05-24 06:11:20 +00:00
ReimuHakurei 8d393f5917 Make our HTML actually valid. Fix indentation. 2017-05-24 06:06:39 +00:00
ReimuHakurei 16cfcff846 Fix broken search. 2017-05-24 05:45:29 +00:00
ReimuHakurei 0d839eca35 More layout improvements. 2017-05-24 05:28:30 +00:00
ReimuHakurei 428b0bf8c7 Fix search on mobile. 2017-05-24 05:06:51 +00:00
ReimuHakurei dfe745c635 Add a wider viewport of 1400px for very wide screens (1600px+). 2017-05-24 04:09:16 +00:00
ReimuHakurei 4fa9972252 Merge branch 'master' of https://github.com/nyaadevs/nyaa 2017-05-24 04:08:16 +00:00
ReimuHakurei b0b77775d7 Unfuck the layout, and remove the search update info from the about box on the home page to declutter. 2017-05-24 04:04:32 +00:00
snowfag 34fe2c5c67 change glyphs for buttons. 2017-05-23 22:16:05 -04:00
snowfag 4a7d8646b6 Update upload/edit buttons. 2017-05-23 21:11:58 -04:00
snowfag 0770822824 Change CRLF to LF. 2017-05-23 21:06:32 -04:00