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

31 Révisions

Auteur SHA1 Message Date
kilo a2ea5b3bea
Search page title function & Fix ES (#1745)
* Update torrentParam.go

* Update template_functions.go

* Update listing.jet.html

* Update listing.jet.html

* Update template_functions.go

* Update template_functions_test.go

* Update template_functions_test.go

* Update template_functions_test.go

* Update template_functions_test.go

* Update torrentParam_test.go

* Update template_functions_test.go

* rollback

* Update torrentParam.go

* Update torrentParam_test.go
2017-11-23 12:20:14 +01:00
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 fdbf06e610 Increase max torrent per page, fix HTML errors, other fixes (#1723)
* Increase max torrent per page

* Increase max torrent per page

* fix html error by changing an ID into a class

* change css selector from id to class

* Update oldNav.jet.html

* Update classic.css

* Update captcha.jet.html

* Fix order of torrents in admin panel index

* Update settings.jet.html

* make lang postform have same name as cookie
2017-11-09 11:53:38 +10:00
kilo c253c06623
Update template_functions.go 2017-11-01 09:59:06 +01:00
kilo 1bf6c7203f
Update template_functions.go 2017-11-01 09:05:27 +01:00
kilo 8a5b41e811
Update template_functions.go 2017-11-01 08:52:44 +01:00
kilo 503b3acf58
Update template_functions.go 2017-11-01 08:38:44 +01:00
kilo 948d6131d8
Update template_functions.go 2017-10-31 23:19:10 +01:00
kilo 52f2ec248d
Update template_functions.go 2017-10-31 22:56:10 +01:00
kilo 45e8afe989
Update template_functions.go 2017-10-31 01:37:24 +01:00
akuma06 b2b48f61b0 Torrent Generation on not found error (#1600)
* [WIP] Torrent Generation on not found error
As asked in #1517, it allows on-the-fly torrent generation. Since it uses magnet links, it needs some time to connect to peers. So it can't be instant generation, we need the user to wait and try after a minute at least.

* Replace Fatal by simple error

* attempt at fixing travis

* del

* Add Anacrolyx dependency

* Add back difflib

* Remove .torrent suffix in the url example

* Add some explanations when file missing page shown

* Ignore downloads directory

* Either use cache (third-party site) or own download directory

* Wrong import

* If there is an error then it means we aren't generating a torrent file

May it be "torrent not found" or "We do not store torrent files" which are the two only existing errors for this page

* hash is never empty

* TorrentLink may be empty at times

So we add a /download/:hash link if it is

* Update README.md

* Made a mistake here, need to check if false

* Update en-us.all.json

* Update CHANGELOG.md

* Torrent file generation can be triggered by click on button if JS enabled

* Update download.go

* Update download.go

* Use c.JSON instead of text/template

* Return to default behavior if we don't generate the file

* Don't do the query if returned to default behavior

* Add "Could not generate torrent file" error

* Fix JS condition & lower delay until button updates

* Start download automatically once torrent file is generated

* Fix torrentFileExists() constantly returning false if external torrent download URL

* torrent-view-data is two tables instead of one

This allows the removal of useless things without any problem (e.g Website link), but also a better responsibe design since the previous one separated stats after a certain res looking very wonky

* CSS changes to go along

* Remove useless <b></b>

* Update main.css

* In torrentFileExists, check if filestorage path exists instead of looking at the domain in torrent link

When checking if the file is stored on another server i used to simply check if the domain name was inside the torrent link, but we can straight up check for filestorage length

* Fix JS of on-demand stat fetching

* ScrapeAge variable accessible through view.jet.html

Contains last scraped time in hours, is at -1 is torrent has never been scraped
Stats will get updated if it's either at -1 or above 1460 (2 months old)

* Refresh stats if older than two months OR unknown and older than 24h

Show last scraped date even if stats are unknown

* Add StatsObsolete variable to torrent

Indicating if:
- They can be shown
- They need to be updated

* Update scraped data even if Unknown, prevent users from trying to fetch stats every seconds

* Torrent file stored locally by default

* no need to do all of that if no filestorage

* fix filestorage path

* Fix torrent download button stuck on "Generating torrent file" at rare times

* fix some css rules that didn't work on IE

* Fix panic error

Seems like this error is a known bug from  anacrolyx torrent https://github.com/anacrolix/torrent/issues/83

To prevent it, I'm creating a single client and modifying the socket.go to make it not raise a panic but a simple error log.
2017-10-21 09:40:43 +02:00
kilo 8a8137fd58 Make old navigation use user torrent search route when needed (#1678)
* Update template_functions.go

* Update listing.jet.html

* Update oldNav.jet.html

* Update template_functions_test.go

* Update template_functions_test.go

* Update view.jet.html

* Update torrent.go
2017-10-18 05:46:58 +02:00
kilo 1ec2a77974 fix wrong translation string being used on user edit page for mods & improve stats.go (#1665)
* fix wrong translation string being used on user edit page for mods

* fix css rule that did not apply

* fix error in stats.go

* stats.go scrapes default trackers if torrent has no tracker

* remove useless thing

* change behavior of right arrow in page list (now goes to latest page)

* fix { too much

* Update view.jet.html

* Update view.jet.html

* pin user search input & link at the bottom of user page

* HTML to go along
2017-10-15 13:18:57 +02:00
kilo 2044a3c98a bottom margin for comment avatar & other small things (#1646)
* bottom margin for comment avatar

* Resetting API key now redirects you back to edit page

* move important faq things up in the faq

* Add div as high as header instead of top margin for #content

* Fix modtools showing behind ad

* No margin-top for body

* add functions that will be used in the future to file.go

* Update create.go

* fix css rule that didn't apply

* Fix some JS of upload form that kept shitting out errors since i updated the upload form

* Update upload.jet.html

* fix duplicate id on a form

* Fix very very slightly misaligned input

* fix html error on filelist

* Add FullDate variable to torrents

* Create Go function that returns an user-friendly date when fed a go date

* akuma must hate me for butchering the template_functions_test file

* Make use of said function in view.jet.html

* Forgot to vars.set the function

* Remove useless title

* Make use of function in listing

* modify JS to fetch full date from title instead of innerText

* Fix title date & two functions looping on non-existing objects

* Show full dates in an AM/PM format like on live

* Torrent dates on UTC+0 by default
2017-10-11 03:24:09 +02:00
kilo bad9285eb4 "No API token" message if no API token, small changes (#1644)
* No API token message if no API token

* Update CHANGELOG.md

* Update en-us.all.json

* move delete user button to the right

* prettier button hovering text color [tomorrow]

* Update en-us.all.json

* use of translation strings for certain themes

* ditto

* Remove hardcoded theme name, make use of translation strings in function if it exist

* Update template_functions_test.go

* Update template_functions_test.go

* Update template_functions.go

* fix travis

* remove useless condition
2017-10-10 02:33:38 +02:00
kilo 88904bade9 Medium changes (#1642)
* lower top margin for comment usernames & avatar

* Update classic.css

* temporary workaround to hide quadrupled comments

* Update view.jet.html

* Add "search from user" input below user rss link, change styling of follow button to fit other links

* all into the same div

* Remove padding of usersearch input in panel, remove useless css rule

* min-width for user buttons, max-width for the input

* Don't show "search from this user" if it's your profile

* remove max-width when responsive userprofile kicks in

* remove useless css rule

* Update view.jet.html

* le fix

* optimize stats.go a bit and add comments

* Update stats.go

* Update template_functions_test.go

* Update template_functions.go

* Remove hardcoded theme list, generate dynamically

* ditto

* Add possibility of forcing a theme for everyone

* in the .yml config file

* Make it ignore both user settings and cookies

* add forced theme in default theme config struct

* Update publicSettings.go

* fix missing , & travis

* Update template_functions_test.go

* Update main.css

* fix travis

* Update template_functions_test.go

* travis
2017-10-07 01:39:38 +02:00
kilo cd128df436 s (#1606)
* Update template_functions.go

* Update template_functions.go

* Update main.js

* remove useless condition

* Update main.js

* Fix login on nyaa -> log off sukebei issue

* Update user.go

* Update main.js
2017-09-21 14:18:55 +10:00
kilo f3881734e2 Make sukebei have all ads PLUS onahole instead of only onahole (#1598)
* Update ad.jet.html

* Update base.jet.html

* Update template_functions.go

* Update template_functions_test.go

* Update ad.jet.html
2017-09-20 09:59:17 +10:00
kilo 43fd3e8956 Sync JS cookies & Go cookies's domain & random other things (#1571)
* create JS domain variable

* use domain JS variable when creating cookies

* Create getDomainName() function in Go

* Update template_functions_test.go

* Update template_functions_test.go

* recreate cookie when resetCookies() is called

* Update main.css

* Update classic.css

* show "unknown" instead of "0 0 0" if stats are unknown

* don't show top ad if there's an announcement

* remove BBCode support that broke description's line breaks

* remove useless identifier

* hide error instead of fixing it

* Update markdown_test.go

* Update markdown_test.go

* css for tags in classic

* remove wrong explanation for alternating color

* fix RSS URL in header

* remove eu cookie <div> from base

* fix cookie warning never showing up

* Update main.js

* nyaa.se-like styling for upload form on classic.css

* Smaller markdown toolbar on classic upload form

* Fix indent, non-round borders for markdown & language list on classic

* Update view.jet.html

* add fillZero function

* ditto but in test

* Update view.jet.html

* add RJ prefix to dlsite link

* Update template_functions_test.go

* Update listing.jet.html

* prevent responsiveness of upload form in classic.css

* remove now useless css rule

* fix tag input padding on classic

* Update template_functions_test.go

* rollback workaround

* rollback workaround

* rollback workaround

* remove now unused function

* ditto

* Update main.css
2017-09-17 22:10:43 +02:00
kilo 8d8bb5cf1f miao (#1563)
* Add files via upload

* Update main.css

* Create ad.jet.html

* add testRand function in template_test

* add rand function

* Update base.jet.html

* Update listing.jet.html

* Update classic.css

* import math/rand

* attempt at fixing travis

* Update template_functions_test.go

* Update template_functions_test.go

* Update classic.css

* Update ad.jet.html

* Update ad.jet.html

* Update main.css

* Update classic.css

* Update base.jet.html

* Update base.jet.html

* Update main.css

* Update base.jet.html

* Update main.css

* Update classic.css

* Update main.css

* Update classic.css

* Update classic.css

* forgot a max-width

* Update classic.css

* Add files via upload

* Add files via upload

* Update classic.css

* Update classic.css

* Update classic.css

* dont show in moderation pages
2017-09-15 10:57:32 +10:00
kilo 65772d8654 rollback the rollback (#1554)
* rollback the rollback

* fix classic.css padding

* remove </img> tag

* Update torrents.jet.html

* Fix html tag

* fix footer & ad showing over the TOS

* move setting & add it's explanation

* Update en-us.all.json

* include nav in listing directly instead of refine

* Update search.jet.html

* remove now useless css rules

* Update main.css

* Update base.jet.html

* exclude old navigation cookie from deletion

* add torrent uploaded total size to user profile
2017-09-12 15:03:26 +02:00
kilo 1b0211cfb9 Remove https for dlsite, fix few html errors, small css improvements (#1551)
* Remove https for dlsite

* Update listing.jet.html

* Update torrent_item.jet.html

* Update torrent_item_upload.jet.html

* Update torrents.jet.html

* remove role attribute

* remove role attribute

* login & register page styling

* website-nav stylisation for main.css

* remove now useless css rules

* up to date main.css

* OwO

* Update main.css

* Last stylisation changes for classic's nav

* margin-left

* add categories

* add TestgenSearchWithCategory to template_test

* add genSearchWithCategory function

* forgot to close the function call

* Update template_functions_test.go

* Update template_functions.go

* Update template_functions.go

* attempt at fixing template_functions

* Update template_functions.go
2017-09-12 00:17:35 +02:00
kilo 615ff10dc8 Fix some html errors (#1549)
* Remove useless / that created html error

* Slightly bigger font for torrent name on view.html, padding fixes

* Set kilo.js to look for span class name instead of name to remove HTML error

* Change span name into class to remove html errors

* remove name attribute

* remove link to user profile is Anon or invalid userid

* fix duplicate class attribute

* remove useless center, remove useless attribute, remove useless yield errors & bad name attribute

* turn name attribute into ID

* JS changes to go along

* fix travis

* Delete OldNav.jet.html

* Create oldNav.jet.html

* turn <li> into <span>

* Update classic.css

* Update main.css

* Update g.css

* Update tomorrow.css

* Update tomorrow.css

* Update classic_colors.css
2017-09-11 21:59:17 +02: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 f8112723f8 fix "torrent file button grayed out for old torrents (anicache.com link)" (#1542)
* add strfind function & check for pantsu.cat when checking torrent file exists

* test

* Update listing.jet.html

* Update view.jet.html

* Update torrents.jet.html

* Update template_functions_test.go
2017-09-09 14:05:51 +02:00
kilo 548a0df333 (merge this second) (#1530)
* Update template_functions.go

* Update template_test.go

* Update admin.jet.html

* Update template_test.go

* right file

* Update template_functions_test.go

* forgot a }

* Update admin.jet.html

* Update template_functions_test.go

* Update template_functions.go

* Update template_functions.go
2017-09-08 23:08:12 +10:00
kilo 35d4eb9ca8 Add torrentFileExists function, check if torrent file exists and if it doesn't lower the opacity on the torrent download button (#1504)
* Add torrentFileExists function

* If torrent file doesn't exist, put torrent download button opacity at 50%

* ditto for listing

* Forgot an if

* attempt at fixing travis by adding function into test templates

* Attempt at fixing travis by having sex with my own mother

* fix wrong error message

* Add torrentFileExists as global function

* Update template_functions.go
2017-09-06 12:30:49 +10:00
akuma06 4a26d50ed1 Fixing FileList IdentifierChain not available error 2017-07-19 22:12:03 +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_functions.go (Browse further)