Commit Graph

98 Commits

Author SHA1 Message Date
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
Nicolas F 90607d6993 main.css: fix stat styling on dark mode 2019-05-20 16:02:04 +02:00
Nicolas F 8614da6322 view.html: fix comment text copypasting in Firefox
Firefox would insert a lot of weird whitespace, because its
user-select would default to "all" and not "text", so it copypastes
the whitespace of otherwise completely invisible HTML elements.

I don't know why Firefox does this. It's stupid, and not what the
user expects. They're copying what they see, not what the DOM is.
2019-04-30 23:12:11 +02:00
Nicolas F 8f1925ce05 search_results: various fixes to the DOM
Avoid repeated style attributes, instead use nth-child CSS selectors
and classes where appropriate.

Also, get rid of the useless <div> around column headings. They don't
seem to do anything useful and are just more stuff for the browser's
layout engine to juggle around.

We can also use Jinja2 to remove some of the unnecessary whitespace
around table headings, which makes things like copy-pasting in Firefox
act less weird. This includes some other whitespace fixes too.
2019-04-30 23:11:40 +02:00
Nicolas F 38f8880966 Make blue info bubble dismissible, configurable (#526)
Infobubble text is now in a separate file, along with a timestamp
in the main file, so that changes to it don't result in merge
conflicts too often.

We also add some JS to make the bubble dismissible, keeping track
of the last timestamp that was dismissed in localstorage.

A timestamp of 0 disables the infobubble altogether.
2019-04-08 19:50:30 -07:00
Nicolas F 86b7eb7ccd Revert "Make blue info bubble dismissible, configurable (#508)"
This reverts commit 62ec8a5236.
2018-08-03 04:34:19 +02:00
Nicolas F 62ec8a5236 Make blue info bubble dismissible, configurable (#508)
Infobubble text is now in a separate file, along with a timestamp,
so that changes to it don't result in merge conflicts too often.

We also add some JS to make the bubble dismissible, keeping track
of the last timestamp that was dismissed in localstorage.
2018-08-02 19:16:28 -07:00
Nicolas F f04e0fd2ae comments: fix editing for users with a CAPTCHA (#502)
* comments: fix editing for users with a CAPTCHA

My bad!

* Update help.html
2018-06-16 16:57:14 -07:00
Alex Ingram 8f4202c098 Improve mobile user experience. 2018-04-24 23:19:14 -05:00
Alex Ingram 8498ff8e62 Fix torrent index on narrow viewports. (#484)
people should get bigger monitors
2018-04-23 15:47:18 -07:00
Nicolas F e9b1f6a6c4 Add some rel attributes to links inside markdown (#461)
I currently don't differentiate between "trusted" markdown and
untrusted, but this should be good enough. Basically tells the
browser not to send a referrer, and (not sure if relevant here)
not to expose a window opener object. Also tells search engines
that the link is not endorsed with "nofollow".
2018-03-25 16:30:07 -07:00
sfan5 418856a4bf Undo responsive table for reports (#444)
It was removed on purpose in fdb041c23b.
Instead just add a CSS rule to fix the table header.
2018-02-01 11:35:04 -08:00
sfan5 0fac1c820d Update dark theme (#441)
* Update dark theme CSS

* Use reponsive table on Admin > Reports page

Fixes dark theme styling of the table header.
2018-02-01 10:50:31 -08:00
Leo Izen f0bd96fe8d static: losslessly optimise PNG images even more (#432)
Used TruePNG and zopflipng to optimise the images even more,
saving a whopping 4073 bytes.

The optimisation is lossless, i.e. the decoded pixel values do not
change at all.
2018-01-16 21:34:43 -08:00
Nicolas F d00f3686f7 static: losslessly optimise PNG images (#427)
Used zopflipng to optimise the images, saving a whopping 8238 bytes.

The optimisation is lossless, i.e. the decoded pixel values do not
change at all.
2017-12-22 06:44:39 -08:00
TheAMM faf7548cd0 Convert edited timestamp to local time 2017-11-10 05:50:50 +02:00
TheAMM 0b094a7229 Decode HTML entities in comments, make blockquotes smaller
Flask escapes < > etc, and the markdown parser does not consider
&gt; as > aka blockquote. Fixed by decoding HTML source before
rendering markdown.
2017-11-10 02:12:08 +02:00
Shane 72c997173c [Schema+config change] Comment editing (#396)
* Comment editing
* Optional time limit for comment editing
2017-11-05 16:26:30 +02: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
Anna-Maria Meriniemi de1fd2f1bc [Config change] Upload ratelimit for non-trusted uploaders (#384)
* Implement upload ratelimit for non-trusted uploaders

Users may upload X torrents in Y minutes after which they
will have to wait Z minutes between uploads.

* Show torrent period count when ratelimited

* Only ratelimit new accounts
2017-10-09 18:41:18 -07:00
Arylide 0eea181020 Fix search form typo and some HTML 2017-10-03 16:57:40 -07:00
nyaadev 4091cba837 fix mysql error and bad colors in css 2017-09-19 01:32:45 +02:00
Arylide 5e93d7ec6d probably fix a css thing and change out a tracker 2017-09-04 15:14:26 -07:00
sfan5 45e1a650fb Improve dark theme (2) (#358)
* Further improve dark theme

* do something about .alert-info, idk
2017-09-04 18:01:40 -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
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
nyaadev 0bcd782695 Minor improvements 2017-08-15 01:41:31 +02:00
Alex Ingram 570ee1225a Fix broken comment CSS 2017-07-08 20:03:14 -05: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
Nicolas F fdb041c23b Don't use responsive table on reports list
The responsive table actually does *worse* in narrow layouts because
the action column fucks off out of view and needs to be scrolled to
if the report reason is long. With a normal table you may not get
consistent row heights, but at least you don't have to horizontally
scroll to perform an action.

Also fixed a goof where I used a style attribute instead of making
the max-width for the action column a class.
2017-06-27 16:07:10 +02:00
Nicolas F 9dfce327b6 Improve reports table styling
Condense the table, vertically align the text inside rows, use a
bootstrap styled select, group it together with the review button
and shrink it down a little.
2017-06-27 15:25:55 +02:00
nyaazi 9fbaf3c12a Setting height for comment textarea (#253) 2017-06-07 23:53:25 +03: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
Kfir Hadas 467270837c Enable `linkify` for Markdown parser
Autoconvert URL-like text to links
2017-06-05 02:36:18 +03:00
Nicolas F ae30e9c95c Get started with a bare-bones help page
It includes little anchors over headings that you can click to link
your one reading-challenged friend to the right section.

In the future, adding an explanation of the different categories
and labels under a new h2 would be a good thing.
2017-06-01 06:28:49 -05: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
Kfir Hadas fa946844d1 Style fixes
Comments box changed the height of the `<tr>`
Tweak icon/text sizes.
2017-05-26 19:23:34 +03:00
Kfir Hadas aad5a0c6ea Update style
Add support for sorting comments (in advance),
add th for sorting by comments_count, add title to the counter box and fix it being under the torrent's name,
2017-05-26 18:25:56 +03:00
Kfir Hadas 90695cad11 Add number of comments to torrent lists
Will only show when number of comments is above zero.
2017-05-26 16:50:31 +03:00
nyaazi 5332ba1a49 Merge branch 'master' into reports 2017-05-26 15:25:02 +03:00
Anna-Maria Meriniemi 0394639954 Calculate comment age clientside, show timestamp in mouseover title (#191)
Resolves outdated comment ages thanks to caching and will show timestamps in local time.
2017-05-25 21:13:35 +03:00
Kfir Hadas e91fdb70da Strip collapse functionality from file list panel 2017-05-25 16:41:07 +03:00
Kfir Hadas ae4d75ecde Show first level's items based on amount
Currently set to show when list has 20 items or less
2017-05-25 15:16:29 +03:00
Kfir Hadas e0ffadb08c Fix extra margin/padding of files and folders 2017-05-25 14:43:50 +03:00
Kfir Hadas a64cac5e5e Basic collapsible file tree 2017-05-25 12:53:23 +03:00
ReimuHakurei 8d393f5917 Make our HTML actually valid. Fix indentation. 2017-05-24 06:06:39 +00:00