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

21 Révisions

Auteur SHA1 Message Date
kilo 0a765b5589 Things (#1740)
* Add new followers directly to user.Followers

* Update user.go

* Remove useless condition

* Query an update of user followers if at 0 when looking at his profile

* Fix comment not appearing until you refreshed the torrent page

* call ViewHandler so that comments visually update properly

* Remove now useless imports

* Add "uploader" userstatus in comment

* GetLikings() & GetFollowers() now return count too

* Don't update follower count here

* Update follower count directly here

* show liking count

* Update user.go

* Update profile.jet.html

* Update torrentParam.go

* Fix locked torrents that were shown even when they should not

* Update torrentParam_test.go

* remove inline styling

* Update main.css

* Update upload.jet.html

* Update main.css

* Update tomorrow.css

* Update classic.css

* Update classic_colors.css

* Update index_site.jet.html

* Make announcements support markdown

* Add markdown form to announcement creation

* fix "report" text position

* Add exclude search option to exclude words

* Make sure the "NameLike" value is the search query because we edit it during a search

* Show search content in page title for /feed too

* rollback

* Add "Search" variable that shows exactly what is being searched

* Use "Search.Search" variable here instead of NameLike because NameLike is edited

* Update torrentParam_test.go

* Update torrentParam.go

* remove redundant spaces from NameLike

* Update torrentParam.go

* Update torrentParam.go

* Update torrentParam.go

* Update torrentParam.go

* turn date input into type date

* bigger date inputs

* add support for YYYY-MM-DD dates

* rollback this change

* rollback

* Update search.jet.html

* Update helpers.go

* Update template_functions.go

* Update torrentParam.go

* only uploader & staff can comment on locked torrents

* Add "Upload to Nyaa/Sukebei" button for mods

* Update torrentlist.jet.html

* Update view.jet.html

* Update view.jet.html

* fix wrong page title for notifications page
2017-11-20 11:13:00 +10:00
kilo 5dcd30676f
Janitor (#1728)
* Fix "torrent is being generated" message showing up even when the torrent couldn't be generated

* Add janitor user status

* Remove usage of deprecated HasAdmin() function

* Give Janitors access to mod panel

* Stop using deprecated HasAdmin() function

* Stop using deprecated HasAdmin() function

* Update edit.go

* Update profile.go

* Rollback bad changes, remove redundant email check and stop using deprecated function

* Show every userstatus (member, janitor, banned, mod) in comments

* Return empty status if anonymous

* Show no userstatus for anonymous profile

* Show moderation link to janitors too

* Stop using deprecated HasAdmin() function

* Stop using deprecated HasAdmin() function

* Stop using deprecated HasAdmin() function

* Add Janitor to userstatus select in user edit

* "Janitor" translation string

* didnt mean to commit this change

* rollback wrongfully comitted changes

* rollback commit

* Update CHANGELOG.md

* Fix wrong id for translation

* remove deprecated HasAdmin() function again

* change name of variable used in comment loop for clarity purposes

* visual cue for locked torrents in torrent listing for admins

* add visual cues for hidden torrents in admin torrent listing

* Dont show delete buttons for janitors

* janitor cannot delete torrents

* show block/unblock button in torrent list for janitors instead of delete button

* fix function that didnt get executed

* add ban buttons on userlist & visual cue for banned users

* Fix "user successfully deleted" message showing even if user wasnt deleted

* Add "ban" button, no "delete" button for jantiors

* add "unban" and "ban" translation strings

* add "unban" and "ban" translation strings

* different <form> for ban button

* Update index.jet.html

* add userprofile ban route

* add toggleBan() function, janitors dont need captcha either

* fix panic error when deleting an anonymous comment

* add user_banned_by and user_unbanned_by

* add user_banned_by and user_unbanned_by

* Make ToggleBan() return whether or not the user is now banned

* Add handler for /ban route

* change log filter

* hide locked torrents from regular users

* hide locked torrents from regular users

* hide locked torrent from api search for regular users

* change function to CurrentOrJanitor

* change function to currentorjanitor

* change function to currentorjanitor

* add CurrentOrJanitor function

* fix extra (

* fix extra ) and wrong variable name

* Fix wrong value for janitor user status

* Fix user edit that did not work because of "unique constraint user.emails" error

* only immediately visually update user if user has been updated successfully

* use FindAllForAdminsOrderBy in order to preload users

* create FindAllForAdminsOrderBy that preloads users

* Show username instead of ID in Uploader column in admin panel

* Fix userprofile buttons overflowing at some specific resolutions

* Mods can set users as janitors

* Show ban/unban buttons on userprofile for janitors

* Identical styling for usermenu links and buttons

* dont show ban buttons on other staff

* add ban message through get parameter

* make toggleBan() trigger user update

* Add "user_banned" and "user_unbanned"

* add "user_banned" and "user_unbanned"

* Visual cue for banned user

* banned users can still log in

* visual cue for banned user in  badgemenu

* locked status if banned user on upload

* banned users cannot comment

* Put "banned" text between ()

* add GetCategoryName() to template_test

* add GetCategoryName() that returns full category name from full category string

* Show search content in page title if it exists, or search category if it exists, otherwise shows "Home"

* error message when user uploads an torrent & is banned

* add torrent_uploaded_locked

* add torrent_uploaded_locked

* fix delete definitely button that never appeared

* Show delete definitely button on admin panel index

* admins can undelete a torrent by editing it's status

* Trigger ViewHandler() directly instead of redirecting

* Render the template directly instead of triggering torrent view handler

* bigger usermenu buttons once responsive design kicks in

* make btn-* class non-bold

* Responsive notification page

* visual cue for locked torrents in torrent listing

* Update search.go

* Update search.go

* Update api.go

* Update helpers.go

* Update template.go

* Update torrentParam.go

* remove "hidden" class

* Update search.go

* fix an html error

* Add files via upload

* Update admin.jet.html

* Update index.go

* Update index.go

* Update router.go

* Update torrentParam_test.go

* Update torrentParam_test.go

* fix extra "

* fix bad copypaste

* Update CHANGELOG.md

* Update guidelines.jet.html

* Update CHANGELOG.md

* add Guidelines and Moderation Guidelines

* fix missing commas

* Update torrentlist.jet.html

* Update find.go

* Update stats.go

* Update view.jet.html

* Update index.jet.html
2017-11-14 09:39:39 +01:00
kilo 95a1600f7e
Update template.go 2017-10-31 01:38:47 +01:00
kilo 97b8171bd9
Update template.go 2017-10-31 01:34:23 +01:00
kilo 5496d6e19d Lower amount of torrents shown in user profile from 20 to 15, user not found page (#1631)
* Lower amount of torrents shown in user profile

* Additional routes for user search

* Handler for user not found page

* User not found error page, with input to search username

* Move theme css in their own folder

* Delete g.css

* Delete classic.css

* Delete classic_colors.css

* Delete tomorrow.css

* Delete bg-body.png

* Delete bg-header-tile.png

* Delete s_bg-header-tile.png

* Change path used by stylesheet in html head

* Change theme path used by JS theme changers

* Update user_not_found.jet.html

* Update CHANGELOG.md

* Update en-us.all.json

* fix ad scrolling

* remove useless stuff

* fix travis & json file

* fix travis again

* remove duplicate

* Update CHANGELOG.md

* Writing an username instead of an userid in userprofile URL will no longer return the Anonymous profile

* redirect to username search instead of rendering a template without checking if username exists
2017-10-04 15:46:06 +02:00
kilo 9fcd597cbc Remove useless class & add onions in faq (#1612)
* Remove useless class

* add onions to faq

* Fix complement tag JS thinking you submitted the form when cancelling the modal

* Update classic.css

* Update publicSettings.go

* Update template.go

* Update template_test.go

* remove OwO

* ditto

* Update view.jet.html

* fix website link / torrent hash not always being shown fully below 810px

* Update publicSettings.go

* Remove now useless cookie creation line

* Fix few IE-specific bugs

* Update ad.jet.html

* Update base.jet.html

* Delete Games_300x250.jpg

* Delete Onahole_300x250.jpg

* Delete Touhou_300x250.jpg

* Delete Touhou_728x90.jpg

* Delete Games_728x90.jpg

* Delete Snacks_300x250.jpg

* Delete Snacks_728x90.jpg

* Delete Onahole_728x90.jpg

* Update main.css

* Update main.css

* Update listing.jet.html
2017-09-30 14:50:54 +02:00
kilo 6ca8ffe5fc Default & dark theme set in .yml (#1610)
* Update default_config.yml

* Update publicSettings.go

* Update base.jet.html

* Update config.go

* Update structs.go

* Update base.jet.html

* Update base.jet.html

* Update main.js

* Update base.jet.html

* Update base.jet.html

* Update publicSettings.go

* Update template.go

* Update template_test.go

* Update template.go

* Update classic.css

* allow user profile URl to contain just ID

* Update router.go

* Add nyaa.pt to mirrors

* Update main.js

* Update main.js

* Add /username/:username userprofile route

* Update profile.go
2017-09-22 14:54:19 +10:00
kilo 870b72f1e9 "No comments" message, avatar in comments, classic theme improvements, some other changes, Old Navigation (#1545)
* Update view.jet.html

* Update en-us.all.json

* Update view.jet.html

* Update CHANGELOG.md

* fix travis

* Update classic.css

* Update view.jet.html

* Update main.css

* Update classic.css

* Update classic.css

* Update classic.css

* add link to user page & avatar in comment

* stylisation for avatar in main.css

* Update classic.css

* Fix wrongly placed ::before

* Add rule list to terms of service

* import rules on register

* fix refine-container-2's inputs

* Update base.jet.html

* Update en-us.all.json

* Update CHANGELOG.md

* GenNav changes to constantly put HTML for nav arrows regardless of page

* css changes for website nav etc etc

* add OldNav global variable

* Add OldNav to test.go

* Update publicSettings.go

* change OldNav's value type

* Old navigation in settings

* add OldNav in user variables

* add oldNav input handler in settings.go

* Change OldNav's default value into false

* Create OldNav.jet.html

* Update search.jet.html

* remove character that had nothing to do here

* fix wrong variable name

* fix worng variable name and travis

* Update classic.css

* Add sort order & type to old nav

* add toString() function in test

* add toString() function

* translation string for oldnav setting

* Use translation string in settings.jet.html

* fix few html errors

* ditto

* travis fix test

* remove useless charset

* remove useless things

* add spaces before attributes

* attempt at fixing travis 2

* fix wrong variable name

* Update classic.css

* fix travis plsss
2017-09-11 19:45:39 +02:00
kilo d1d4bf8e28 Remove hide ads options (#1536)
* Update base.jet.html

* Update settings.jet.html

* Update template.go

* Update publicSettings.go

* Update user.go

* Update settings.go

* Update main.js

* Update base.jet.html

* Update template_test.go

* Update en-us.all.json
2017-09-08 20:46:45 +02:00
kilo 70a865e49a Show message pinned at the bottom of the window warning of cookie usage to comply with EU law (#1506)
* Add global variable to template_test

* Add global variable related to EU cookie law

* Add GetEUCookieFromRequest function that checks if the EU cookie exists (to comply with EU law)

* Add div at bottom of page if no EU cookie set

* add styling in css

* Prevent message from showing up any more than once

* prevent cookie from being erased by resetCookies() function

* Fix wrong function return type

* shorter condition

* Import timeHelper

* Update template_test.go

* remove variable name

* Update template_test.go
2017-09-06 07:55:00 +02:00
Miiiiaaooooo 25e6fe2942 Ads enabled settings, ads in FAQ, ads actually in code (#1493)
* Update base.jet.html

* Remove inline styling, put whole thing into a div instead of center to be able to move it at other places at will

* Move inline styling in there & some adjustements that will need further tweaking

* Add GetAdsEnabledFromRequest() function

* Ads Enabled global var

* Need to add global var in test file for it to work properly

* AdEnabled handler in settings

* Create AdsEnabled var for users

* Check if user wants to hide ads

* change var name

* change var name

* change var name

* change var name

* var name changes

* Add ad enabled settings & put each indiviidual setting into a span

* add |raw

* add translation strings

* add ads to faq

* Remove <br> and add faq link

* Fix travis

* Fix wrong condition check

* exclude aldColors & hideAds cookie from deletion

* remove useless things

* Fix template_test.go

* No idea why that part got removed

* Forgot }}

* lower padding for ad container
2017-09-04 21:48:47 +10:00
kilo 5a184bfb50 "Alternating Colors" option in settings (#1440)
* Non-bold torrent name when using alternating background colors

* Add alternating colors for g.css

* Add alternating colors for classic.css

* Add alternating colors for tomorreuw

* Update classic.css

* Add alternating colors to settings page

* Add alt-colors class to tbody if enabled

* Add GetAltColorsFromRequest() function to get AltColors cookie value

* Create AltColors variable for usage in listing

* Make settings handle altColors input

* Add AltColors in user struct

* Returned the wrong variable here

* Turn function return value into bool

* Condition checks variable like a bool

* ditto

* better color for g.css

* even better color

* better

* Last change for g.css

* Improvement for tomorrow

* Update classic.css

* add alt-colors class to upload preview

* Add alt-colors to user profile

* more vivid color for g

* Fix typo

* Remove browser outline for refine when clicked on

* remove browser outline

* Fix rules that didn't apply and category icon being way too small on user profile thanks to usage of percentage

* Remove show-xs class for search inputs

* Turn refine button back into position: absolute to pin at very bottom of refine

* Alternating colors for g's trusted, remake & aplus

* Update tomorrow.css

* attempt at fixing travis

* test (will have to rollback that change)

* rollback

* will have to rollback

* will have to rollback

* will have to rollback

* will have to rollback

* add AltColors variable to template test

* rollback

* rollback

* rollback

* rollback
2017-08-30 15:21:45 +10:00
akuma06 c6168be8b1 Tag Search + Tests + Search slight refactor [DONE] (#1342)
* Tag Search + Tests + Search slight refactor

First commit improving search. Different struct have their own file with their tests. This way of separating struct by files is inspired by the go packages I've seen so far.

Added new behaviour as discussed in #1334

* fix fallback to ES

* Added some comments to explain PG fallback + log err moved

* Refactored search

Nearly fully covered
WhereParams struct has disappeared for Query struct instead
In DB model, we use an interface implementing Query struct methods

* 1rst Refactor of Tags (WTF already?!)

Prepare Tags for the refactored system. Now there will be descriptive tags for a particular release (ecchi, BDSM, ....) and typed tags.
Typed tags are tags relevant to all torrents and can be limited to some input value. For example, video quality is a typed tag limited to some values (hd, full hd, sd, ...). In the same way, anidbid is also a typed tag but doesn't have default values.

Furthermore, the location storage of tags have changed, now accepted descriptive tags are stored in the torrents table in the column "tags" and they are separated by commas.
In the opposite, accepted typed tags can have have their own column in the torrents table. For example, anidbid, vndbid will populate the column DbID when accepted. On the other hand, videoquality will populate the same way as descriptive tags.

This behaviour depends on the callbackOnType function in tag/helpers.go

* fix for modtools :')

* Added anidb, vndb, dlsite & vmdb id fields in torrent model.
Tags don't have an accepted field anymore.
Accepted Tags are in torrent.AcceptedTags and non-accepted ones in torrrent.Tags.

New Helper + New Changelog for translation string.

* New upload/edit form for torrent tags.
Now the inputs are dynamically generated by the helper tag_form.
No more modal window in those form, only inputs.
Support of tags in API
New translation string for the  link to the modal on torrent view.
More comments in the functions for tags

* Improving how config for tags work. Adding a test on them with understandable messages.
Config for tags have now a Field attribute which is linked to the Torrent model. For example anidbid tag type has now a AnidbID field in config which is the name of the field in torrent model (AnidbID). Every new tag type need to have a field attribute with its counterpart in torrent Model.
Fixing some errors

* Fix compile error + Tests Errors

* Improve performance by caching the list of tags with an index
Adding/removing tags works/tested
New translation strings

TODO: test/fix adding tag on upload/edit

* Mini fix to display video quality
+ tags works/tested on modo edit

* Fix editing tags on modpanel

* Edit tags works

* Add translation string

* Add search backend for tags.
?tags=xxx,eee,ddd
?anidb=21
?vndb=23
?vgmdb=24
?vq=full_hd

* Fix Ajax tag Removal&Add

* Added form for descriptive tags

* Forgot to add the link between database and form for descriptive tags.

* Adding the increase/decrease pantsu for descriptive tags

* Fix #1370

* When you actually forgot to commit files after having forgotten commits
2017-08-22 11:48:10 +10:00
akuma06 7bb008cb19 Fix for userID = 0 was current user 2017-07-29 18:42:02 +02:00
PantsuDev cdabd79c03 Fix more style issues 2017-07-24 15:03:43 +10:00
akuma06 c5b3702fcd Fix #1251
Removed the old search parameter on /api.
Fixed issue with navigatation.
Fixed issue with notifications.
Fixed issue with fake anonymous upload on search with userID.
Fixed issue with number of upload on user page.
Moved api to version 1.1.0 with search displaying same as /api
2017-07-20 20:21:57 +02:00
akuma06 e91116ce8d Forgot to revert this 2017-07-20 13:34:41 +02:00
akuma06 b3a8471ac4 Fix notification issue.
Fix #1246
2017-07-20 13:33:50 +02:00
akuma06 9fdb749e61 Add back limit of torrents in profile to 20 and also fix issue with number of torrent uploaded maxed to 50 2017-07-20 00:38:23 +02:00
akuma06 ad2e80e3a7 Some fixes and add test on template functions 2017-07-19 21:33:07 +02:00
akuma06 ee95510242 Template refactor (#1212)
* Template rafactor

Now templates go files are in /templates in a templates package. Controllers only have controller files

* Fix template test. Forgot I moved ReassignForm
2017-07-16 17:20:35 +02:00
Renamed from controllers/template.go (Browse further)