1
0
Fork 0
mirror of https://github.com/ProjectSynthoria/SynthoriaArchive.git synced 2025-03-12 23:36:54 +02:00
Commit graph

338 commits

Author SHA1 Message Date
Matt Kliewer
708e0da5a1 Add logging to report view and add option to disable (ban) a user for superadmins 2017-07-09 18:07:31 -05:00
Alex Ingram
570ee1225a Fix broken comment CSS 2017-07-08 20:03:14 -05:00
zapzapzap1
1ae577acdb Add links to torrent clients' download pages (#259)
* Add links to torrent client's download pages

* Fuck uTorrent

* Goodbye, uTorrent
2017-07-08 00:10:33 -05:00
Kfir Hadas
c466e76471 Fix RFC822 filters + More tests (#257)
* Make rfc822 filters compatible with Windows systems.

.strftime() is relative to the system it's being run on.
UNIX has '%s' for seconds since the EPOCH, Windows doesn't (ValueError).
Solution: use .timestamp() to achieve the same result on both platforms.
This also allows us to drop the float() around it, since it returns a float.

* Start testing filters

* Add placeholders for more tests

* Make 'tests' folder a Python package

Now you can run tests with just `pytest tests`

* Update readme and travis config

* Test timesince()

* Update and organize .gitignore

Deleted: (nothing)
Added: Coverage files, .idea\

* Test filter_truthy, category_name

* Tests for backend.py

* Tests for bencode.py

* Move (empty) test_models.py to tests package

* Tests for utils.py

* Fixes for flattenDict

* Change name to `flatten_dict`
* `newkey` was assigned but never used

* Add a helper class for testing

* Show coverage on Travis

(only Travis for now...)

* Remove IDE

* Use correct assert functions

* Update README.md
2017-07-07 16:14:37 -05:00
Matt Kliewer
45e3834f2a Change portion of welcome message 2017-07-05 13:15:58 -04:00
Kfir Hadas
3b55af85f0 Fix torrent deletion log
* Fix `url referenced before assignment.`
* Fix every action logged as delete/undelete
2017-07-05 13:48:34 +03: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
25535e9cb9 Add extra information to reports list
Shows whether the reporter is trusted, whether the uploader is trusted,
the name of the uploader and for superadmins the IP for the uploader.
2017-06-27 15:56:46 +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
Nicolas F
f1df776410 Add alert about reports that nobody will read
Apparently some people don't understand what the report button
is for. Adding this small warning can be considered a success even
if it just leads to one less stupid report.
2017-06-27 14:40:58 +02:00
TheAMM
081eb16246 Make username regex to stop the validation chain
with a decorator to replace ValidationError with StopValidation
2017-06-19 16:05:42 +03:00
Kfir Hadas
94574d1682 Hide "Report" button for site guests (#265) 2017-06-14 20:07:53 +03:00
Johnny Ding
ffb2cdec5f Merge pull request #251 from sharkykh/tests
INITIAL UNIT TESTING FUCK YEAH
2017-06-07 23:27:53 -07:00
Kfir Hadas
16e72a2a9c set noqa to ignore a single error 2017-06-08 04:14:04 +03:00
nyaazi
9fbaf3c12a Setting height for comment textarea (#253) 2017-06-07 23:53:25 +03:00
Kfir Hadas
6f526de5ea Lint 2017-06-07 19:38:19 +03:00
aldacron
80fecd5496 add description and keywords 2017-06-06 23:53:19 -07:00
UnKnoWn
bd0f9edce3 Reorder the search bar
Moving media queries to the end to ensure priority
2017-06-07 04:15:45 +08:00
Johnny Ding
06735a6536 Merge pull request #243 from nyaadevs/elasticsearch-fullword
Multi-field search display_name to match words over ngram limit. Resolves #205
2017-06-05 20:34:04 -07: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
TheAMM
2d0cf7cbb4 [ES Schema change] Multi-field search display_name to match words over ngram limit
This fixes searching for "Machiavellianism", 16 chars ("Machiavellianis", 15 chars, worked previously).
Does not (seem to!) break anything, but requires a re-indexing of ES.
2017-06-05 17:29:00 +03:00
aldacron
ae71b6ed59 clean up motds 2017-06-05 00:04:21 -07:00
aldacron
566e7d8cf8 resolves #239 2017-06-05 00:02:52 -07:00
Alex Ingram
0a12db74d0 Change report button to btn-xs as a temporary fix. 2017-06-05 00:45:50 -05:00
Kfir Hadas
467270837c Enable linkify for Markdown parser
Autoconvert URL-like text to links
2017-06-05 02:36:18 +03:00
TheAMM
6592bec67c Clean up info api script
And a tiny bit of the serverside endpoint.
2017-06-04 00:52:11 +03:00
kyamiko
570a06bd9e API Info (#157)
Squashing 11 commits into one.
2017-06-03 23:57:53 +03:00
snowfag
abfb5c178e Update rules page. 2017-06-03 15:06:15 -04:00
snowfag
68c2c965a4 Move hardcoded urls into config. 2017-06-03 14:40:32 -04:00
Kfir Hadas
3165389d52 Fix lint check + update lint script (#224)
* Fix PEP8 E301 on nyaa/models.py

* Add utils/ to lint checker

* Run of lint.sh + manual fixes

As suggested https://github.com/nyaadevs/nyaa/pull/157#issuecomment-305051428

* Fix backwards tick in README

* Updated script

* Update Travis config
2017-06-01 06:40:33 -05:00
ReimuHakurei
3e2437bba1 Fix merge mistake. 2017-06-01 11:37:50 +00:00
Alex Ingram
b5e70ba0b0 Merge branch 'master' into focus-report-field 2017-06-01 06:30:34 -05:00
Nicolas F
e564b3ee19 Change label of button on edit page
Small nitpick change.

"Edit" being the button that saves the edits might be a little
confusing, whereas "Save Changes" is less ambiguous and more
easily recognised.
2017-06-01 06:29:14 -05: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
80587e02fe Default description to "" in field renderer
Otherwise we get None on upload page
2017-06-01 06:28:38 -05:00
TheAMM
f4fb9fc065 Render markdown text field manually in the template
We need to escape newlines in the editor as well!
2017-06-01 06:28:38 -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
Nicolas F
07d45b6223 Focus report reason text field when reporting
A small convenience change which by sets the focus to the newly
opened modal dialog's text field if the report button is hit.

This way, people can type away their gripes with the torrent without
having to click into the text field first.
2017-05-30 19:31:28 +02:00
TheAMM
051f3f38d2 Clean up Torrent flag properties 2017-05-30 12:46:27 +03:00
nyaazi
5525337931 Replace the header titles 2017-05-30 10:29:59 +03:00
TheAMM
2b331c307e Optimize MySQL COUNT queries and pagination
Also leaves 'Torrent.trackers' as 'select' for the joining, since we don't need it on listings
2017-05-29 18:27:34 +03:00
nyaazi
5dc8bdaf74 For the green 2017-05-29 16:24:45 +03:00
nyaazi
bea63315cd Merge branch 'master' into reports 2017-05-29 16:20:48 +03:00
TheAMM
32fa021f34 Turn comments icon on search result into link to comments
Also cleans up torrent.id/torrent.meta.id
2017-05-28 02:46:04 +03:00
Anna-Maria Meriniemi
f02836f75e Merge pull request #194 from shm0o/url-stuff
More `url_for`
2017-05-28 02:42:42 +03:00
TheAMM
16194a12a3 Fix typo in ES search sort keys 2017-05-27 21:37:26 +03:00
Anna-Maria Meriniemi
ea17f2d4da Merge pull request #169 from sharkykh/num-comments
Add number of comments to torrent lists
2017-05-27 21:36:29 +03:00
TheAMM
260dc2cdc8 Forbid caching when debugging 2017-05-27 21:33:20 +03:00
Anna-Maria Meriniemi
d65602ee9f [DB Changes! Read PR!] Merge pull request #196 from nyaadevs/elasticsearch-comment-count
Elasticsearch comment count. Read PR #201 as well.
2017-05-27 20:12:43 +03:00