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

169 commits

Auteur SHA1 Message Date
kilo 4fda9d0ba5 forgot to copy paste some code (#1290)
* Update main.js

* Update main.js

* Update main.js

* Update main.js

* Update main.js

* remove dumb shit
2017-07-28 13:47:26 +10:00
kilo d5888079f8 Date difference when hovering a torrent date (#1287)
* Update en-us.all.json

* Update main.js

* Update base.jet.html

* Update main.js

* Update main.js
2017-07-26 18:59:48 +10:00
akuma06 09d7adb0e3 excluding csrf_token from erase cookie 2017-07-26 09:20:11 +02:00
PantsuDev cdabd79c03 Fix more style issues 2017-07-24 15:03:43 +10:00
PantsuDev 18813627be Merge branch 'dev' of https://github.com/NyaaPantsu/nyaa into dev 2017-07-24 10:32:50 +10:00
kilo 95d1e9e192 Update main.js (#1274)
* Update main.js

* Update main.js

* Update main.js
2017-07-24 10:20:24 +10:00
kilo f5bd1103c8 More readable code (#1273)
* Update main.js

* fix some variable names here too

* change variable name

* Update main.css

* Update main.js
2017-07-23 19:08:42 +02:00
PantsuDev a931b47bff beautify assets 2017-07-23 15:50:18 +10:00
kilo e05d2b78cb JS to add ".new" class to commit's <a></a> 2017-07-23 04:14:21 +02:00
kilo fb06f72139 Update main.js 2017-07-23 02:40:39 +02:00
kilo 02df6b7310 Update main.js 2017-07-23 02:28:09 +02:00
kilo bf695d9b89 Update main.js 2017-07-23 02:22:33 +02:00
kilo 85f9f8b2e4 Update main.js 2017-07-23 01:52:36 +02:00
kilo 00b4439bff Update main.js 2017-07-23 01:41:42 +02:00
kilo 52579448fd Update main.js 2017-07-23 00:00:44 +02:00
kilo 6e5808b2b8 Update main.js 2017-07-22 23:27:02 +02:00
kilo 54b2813e3c Put rules into their own file list flag list (#1259)
* Remove html rules from upload, load rules file and call the rule function

* Update faq.jet.html

* Create rules.jet.html

* forgot to remove old list

* forgot to do that

* remove <br/>

* Update main.css

* Update g.css

* add jav flag keyword

* Update kilo.js

* add h-games keyword
2017-07-22 14:07:57 +02:00
akuma06 ce90f6fbce Improved a bit the placement of the function. Now FlagCode is in Templates js renderer (same place as the golang counterpart) 2017-07-21 01:47:36 +02:00
akuma06 5f0864f36a fixing zh-Hant flag 2017-07-21 01:38:33 +02:00
akuma06 b28fe5cf3c Moving kilo to new api 1.1.0 2017-07-20 22:00:42 +02:00
kilo a5986cc543 Fix padding of torrent list on mobile & torrent preview stuff (#1239)
* Update main.css

* Update main.css

* Update main.css

* Add two example torrents

* only keep previewed torrent when updating with newer ones

* Update upload.jet.html

* wrong class here

* Update main.css

* rollback

* Update upload.jet.html

* Update kilo.js

* Update upload.jet.html
2017-07-19 22:24:04 +10:00
akuma06 cdd25c1712 Adding some comments 2017-07-18 21:55:40 +02:00
akuma06 18e433980f Fix kilo.js 2017-07-18 21:46:00 +02:00
kilo e92527748c add two keywords & a sukebei rule (#1231)
* add two keywords

* move keywords_flags vartiable outside of function

no point in creating it every single time

* Update en-us.all.json

* add sukebei rule

* Update main.css

* Update upload.jet.html

* Update upload.jet.html

* Update main.css

* Update main.css

* Update en-us.all.json

* whoopsies

* add keywords for categories

* fix display on firefox & older browsers
2017-07-18 20:51:38 +02:00
kilo 4d24f3adea Fix missing ] 2017-07-18 13:03:53 +02:00
kilo 2e81abb3bc Automatically add flag based on keyword (#1219)
* add VOSTFR

* Update kilo.js

* debounce

* add [eng] keyword

* add [jp] keyword

* add [jpn] keyword

* add ' eng ' and '[english]'
2017-07-17 22:05:49 +02:00
kilo 68780a6652 better background color for mod tools, torrents don't move around when you show the checkboxes 🐤, fix auto-updating JS for mods (#1224)
* preliminary CSS work

* only apply button rule to #show_actions

* forgot the JS

* fix auto-updating for mods

* woops wrong file

* there
2017-07-17 22:05:24 +02:00
akuma06 e9b6f3c3c7 Fixing translation in modtools
I don't understand this though #1201 . Deletes work fine here
2017-07-17 15:10:08 +02:00
akuma06 81113001df Context list on upload preview (#1220)
* Update kilo.js

* torrent item js as a separate file to prevent redudancy

* Adding context list

* Fix indent
2017-07-17 14:20:18 +02:00
kilo 0a6ce25b30 nice commit while im editing files ;-; 2017-07-16 17:36:17 +02:00
kilo bab885d7a2 add new nyanpassu in js 2017-07-16 17:35:18 +02:00
kilo c3b2b0fbe9 update torrent lang once load is done (didn't work in Chrome before) 2017-07-16 14:41:24 +02:00
kilo e1d030c500 Update kilo.js 2017-07-16 12:51:00 +02:00
PantsuDev 913028f529 Comply with JS styling recommendations 2017-07-16 14:43:09 +10:00
akuma06 7104847af4 Improved a bit kilo.js 🐤 2017-07-16 00:17:44 +02:00
kilo 511d074e84 it works merge pls (#1204)
* remove custom_flag.css

* remove ' that had nothing to do here

* replace sukebei variable to boolean

* fix ? operator & variable name

* attempt at fixing visual cues for anonymous torrents

* Update torrents.jet.html

* add missing ,

* useless code if user logged off so moving that

* add it back here and check if logged in

* should work almost properly now

* same here

* flag-other invisible

* Update kilo.js

* Update upload.jet.html

* should work very well now

* same here

* Delete categories.png

* Add files via upload

* Update main.css

* Update kilo.js

* Update upload.jet.html

* Update kilo.js

* Update torrents.jet.html

* proper behavior for trusted people

* different flag form id

* add id

* add language name in an span

* make that span invisible =)

* Update flags.jet.html

* Update upload.jet.html

* Update kilo.js

* whoever read this is a faggot

* Update upload.jet.html
2017-07-15 21:41:57 +02:00
kilo 4fd5111193 Update kilo.js 2017-07-15 16:16:43 +02:00
ewhal 5b23521496 Merge pull request #1198 from Kiloutre/patch-13
up to date flag.min.css & removal of unwanted margin & small other stuff
2017-07-15 23:34:33 +10:00
kilo d43adf7624 Update kilo.js 2017-07-15 14:11:05 +02:00
kilo 5eb291d50b scroll to top of the page when opening refine 2017-07-15 13:08:23 +02:00
kilo 6e6adb538d Update kilo.js 2017-07-15 12:02:08 +02:00
kilo cbc0ec9110 sukebei category fix 2017-07-15 00:16:35 +02:00
kilo efca37616e sukebei category support 2017-07-15 00:15:37 +02:00
kilo 0dcb9e3c5d change value to .checked 2017-07-14 23:24:12 +02:00
kilo d166f29a74 Update kilo.js 2017-07-14 22:25:35 +02:00
kilo 7415843336 Update kilo.js 2017-07-14 22:21:12 +02:00
kilo aaf795b7d6 Update kilo.js 2017-07-14 22:05:25 +02:00
kilo 11cf6354f1 add remake JS 2017-07-14 22:04:01 +02:00
kilo 3efaad9e58 Update kilo.js 2017-07-14 21:59:05 +02:00
kilo 7382f175b9 JS script, missing flag stuff 2017-07-14 21:34:25 +02:00
kilo 678bb62bb3 Update main.js 2017-07-14 21:04:33 +10:00
kilo e92e306bdc Make category in refine update based on category in header 2017-07-14 21:04:33 +10:00
akuma06 5be870e21b Add commit from kipukun on simplemde 2017-07-13 13:57:19 +02:00
akuma06 e1d6e7df20 Changing to the new behaviour of package languages 2017-07-12 12:04:20 +10:00
akuma06 f8de340265 Added search refine on every pages + fixed kilo.js 2017-07-10 15:24:52 +02:00
kilo 328edbe9a0 no idea if that works, i think it doesn't 2017-07-10 22:11:35 +10:00
kilo d1a5a74f54 Update main.js 2017-07-10 22:11:35 +10:00
kilo 06442da77f Fix wrong JS variable name & some css stuff (#1151)
* Update main.js

* remove workaround that doesn't work

* Update torrents.jet.html

* Update search_handler.go

* Update search.jet.html

* Update main.js

* Update main.js

* Update search_handler.go

* Update main.js
2017-07-10 17:33:26 +10:00
kilo acf0ae0fad Make refine button submit form if refine dropdown doesn't exist (#1149)
* Update site.jet.html

* Update main.js

* remove onload

* Update main.js
2017-07-10 15:36:24 +10:00
kilo f5a86525d0 Header & refine dropdown changes (#1130)
* add button in header & remove two options from header search

* dont show refine button on small screens

* remove the div in there

* to put it there and add display: none when needed

* add refine class for future js code

* add function in code to toggle refine

* more html changes

* spacing changes

* add limit & show trusted and all that stuff to refine

* add margin

* obligatory css changes

* forgot {{ }} for a variable name

* add function on onclick refine button

* wrong file

* put onclick & translation on button
2017-07-10 13:57:59 +10:00
akuma06 59a9aa6ad9 Fixing Translations.js + kilo.js 🐤 2017-07-07 02:25:36 +02:00
kipukun ;_ 121101fe1c Frontend small (#1040)
* Header isn't as WIDE on resolutions past 1920

* Turn down the fucking volume because it scares the shit out of me everytime

* Make clear the mascot is clickable

* Make torrent buttons not fuckhuge

* Just show N/A on no website

* search.html: Fix minor typo in refine box
2017-06-21 11:28:47 +10:00
kipukun 95173a0f33 Frontend v9000 (#1008)
* Should fix old uploader name in torrent view

* Fix "save changes" in modtools

* Modtool more colorful

* Fix search bar placement in modpanel

* Make colors more consistent; less would be super helpful tbqach fam

* Display the old username if it's there

* Fix some admin index html

* Add custom icons and remove png code from all CSS

* Move a good amount of cosmetic code from main to classic

* Fix some weird bug with point-events; add some global icon formatting; fix mascot fucking up

* Spruce up admin panel with icons on smaller viewports, along with adding trash icon

* 404 redesign ;^)

* Mufuyu mascot on all themes; says something slightly lewd

* Fix weird user menu bug where shit would overflow
2017-06-16 08:57:52 +10:00
Ramon Dantas d8e17478f8 Country flags (language) for torrents. (#970)
* Add flags for torrents

Add a new field, .Language, to the Torrent model, and a new package,
torrentLanguages, which maps languages to flags. Added also a flag icon pack
from googlei18n/region-flags, with (mostly) public domain flags from Wikipedia.

* Optimize flags

* Use FlagSprites CSS instead of .png files

* Only use flags for languages we support

* Add test for CSS flags

Ensure that we have all the flags for the languages we support.

* Add AdditionalLanguages field to config

This allows us to support additional languages for new uploaded torrents,
even if we have no translation for it.

* Minor CSS fix

* Add "other" and "multiple" torrent languages

Also removed the TorrentLanguage struct, as it wasn't much useful.

* Fix test

* Add colspan=2 to category when language is empty

Also hide the language column if empty.

* Add lang field to search.

Hopefully it works with Elasticsearch as well, but I haven't tested
(lol Java)

* Add language field to ES index and settings

* Add language column to JS template

* Add keyword type to language ES field

* Remove 'raw' from keyword

* Set "simple" analyzer on language

* Document .Language field on Torrent model
2017-06-12 09:14:26 +10:00
PantsuDev 77295492f3
Add libre-js support 2017-06-04 15:43:41 +10:00
MMP0 87117d08de Update humanFileSize function 2017-06-02 13:46:59 -05:00
akuma06 1974692480 Forgot the selectAll.js 2017-06-02 20:22:15 +02:00
akuma06 e9002ee638 Added translations support to mass edit api + improvements
* new translation strings
* new Translations object which can be used to translate string in js
* fix a the disappearance of checkboxes on new item loaded by ajax
2017-06-02 15:42:53 +02:00
akuma06 e62ebb05ba Mass edit mod api JS (done) (#868)
* Mass Edit MOD api JS (WIP)

In continuity with the mass edit mod api, this is the javascript use of
it.
##What does it do?
* Delete of multiple torrents on index/search
* Category change of multiple torrents
* Change of owner of multiple torrents
* Lock & delete of multiple torrents

##How?
* New toolbar only visible for mods
* Checkboxes added only for mods
* Selection and click on the button in toolbar
* Nothing is submitted, you have to review the changes in a modal window
listing them.
* Then the ajax queries are initialized one at a time with a progression
bar
* You can always at any moment delete entries from the queuing list

* Improved progress bar

* Deleting part almost done

Improved modal design
All dom interactions should be done
Prepared Query for only one callback
Improved Modal to keep a link to the active modal

* Finished =D

Added some translation string

* Forgot the refreshing of the page

Just an option that can be disabled by making refreshTimeout to 0
2017-06-02 12:51:44 +10:00
akuma06 b546e6b1d3 Forgot parameters to Get() 2017-05-31 12:39:38 +02:00
akuma06 133947df0a Updating xhr request
* Querying when request has failed
* Added a maximum consecutive query parameter to limit query when server
has shutdown
* By default I've put it to -1 (no maximum), it can be modified
* Stopping with an error when too many failed query
* Removing log message in torrents.js
2017-05-31 12:36:39 +02:00
Steindór ffbbacb84a Maskot to cookie (#857)
* Put the mascot into the cookie as well, major js cleanup

* Update en-us.all.json

* removed redundant translation
2017-05-30 21:21:35 -05:00
Mitki aeb8039250 Mascot button loses its translation when clicked (#855) 2017-05-31 00:02:40 +02:00
akuma06 ae1628e921 Some js fixes and improvements
Better handling of Torrents.StopRefresh()
Keep the order of torrents
Encode html entities from torrent name (prevent execution of unwanted
html tags)
2017-05-30 15:19:45 +02:00
akuma06 b0cf17c77c Renamed the search argument FromID instead of TorrentID 2017-05-30 14:12:42 +02:00
akuma06 29056496d0 Removed console.log + added auto-update 2017-05-30 00:30:36 +02:00
akuma06 402fce9f02 Api Last Torrent + xhr automatic refresh
* Added a fiel torrentID in search param
* Search can be limited to torrentID > id provided
* Templates creation through simple JS object
* XHR management through simple JS object
* Torrents object that interface with Templates and Query to get new
torrent uploaded according to the search context
2017-05-30 00:28:21 +02:00
akuma06 dd03550c66 Keeping Mascot hidden
Should fix #808
* Mascot hide is kept while navigating with a localstorage value
2017-05-29 13:12:05 +02:00
akuma06 c533f5b398 Fixing for #791
Added a padding-right 20px in css
Added a js event listener on search box to dien it on focus and reduce
it on blur
2017-05-28 02:23:47 +02:00
kipukun 2f78f61ade Fix mascot using wrong mp3 source 2017-05-27 18:18:45 -04:00
Steindór ab2d4efead Account theme switcher (Pls merge) (#750)
* added pagination

* cleanup

* indentation fix

* fix

* Loads theme from context

* Basic theme switching working

* working properly

* Fuck golint tbqh

* united language and theme into one settings page

* made the settings page a little nicer

* fixed it so it works properly now

* removed parts of inline js and fixed bug

* removed remains of other theme switching method

* fixed very minor bug

* fix
2017-05-27 18:18:43 -04:00
MMP0 f338cab4fe Fix torrent info tables (#782)
* Fix torrent info tables

* Fix torrent info tables

* Update view.html

* Update main.js

* Update view.html

* Update view.html

* Update view.html

* Update main.css

* Update main.css

* Update view.html

* Update main.css
2017-05-27 22:14:14 +10:00
akuma06 80ab45d81e New profile user menu (#761)
* Fixing user profile page

* Modified css rule word-break to break-word
* Modified torrents table in user page to look like home listing
* Made the button reset api look like a button according to actual
design
* Modified user menu to have the same spacing accross templates
* User menu is in another template file loaded dynamically

* Fixing the access to userprofile variable

* Menu needs to access the user profile with $.UserProfile
* User Notification template variable removed, instead using user
profile variable

* Reverting back theme flickering fix
2017-05-26 14:33:55 +02:00
MMP0 488f2ca476 Fix theme bugs + Reimplement "nyanpassu" and "explosion" (#757)
* Update index.html

* Update main.css

* Update main.js

* Update index.html

* Update index.html

* Update main.css

* Update index.html

* Update main.css

* Update main.css

* Update main.css
2017-05-26 13:13:06 +02:00
kipukun 424633631c More frontend shit (#731)
* Torrent Mass Edit Api (WIP)

* Torrents can be deleted in mass from frontend with api post request
* Torrents status can be edited from frontend with api post request
-- Look to function doc for more info on how to use it

It is a WIP so it might not work =D

* Finished Mass mod Api

As per suggestion of @yiiTT in #720, I added:
* Changing torrents category
* Deletion of reports with deletion of a torrent
* Changing owner of multiple torrents

Commit also add some new translation strings.

* Make some changes

* Reports can now be cleared for the torrents selected without having to
delete them
* Users with no admin rights can't delete reports

* Fix moveto to status

moveto deprecated in api

* Tested and works!

Changes:
* Updates only the colomns of torrent table
* Moved categories config in config/torrents.go

* Make sort arrows look a lot nicer

* Add search icon into search input

* Work on navbar, fix it on mobile view

* Hide mascot on mobile views

* Make torrent view work on mobile + minor improvements

* Add status and various things to view

* ACTUALLY FINISH VIEW PAGE

* Forgot this file in last commit

* wow user profile was easy

* Work on profile page

* remove language option

* SEO improvement

* forgot the fucking bracket

* make description more weeb

* add irony

* add better irony

* Update README.md

* Make sort arrows look a lot nicer

* Add search icon into search input

* Work on navbar, fix it on mobile view

* Hide mascot on mobile views

* Make torrent view work on mobile + minor improvements

* Add status and various things to view

* ACTUALLY FINISH VIEW PAGE

* wow user profile was easy

* Work on profile page

* remove language option

* SEO improvement

* forgot the fucking bracket

* make description more weeb

* add irony

* add better irony
2017-05-25 02:20:30 +02:00
kipukun 58631c6bd4 Optimized the site (#725)
* Try to optimize site

* lmao woops

* fucking woops again
2017-05-24 16:57:48 +10:00
kipukun e9825a2683 Frontend rewrite (DONE) (#723)
* Remove Bootstrap and Jquery, and create basic nav

* More improvements to navbar, as well as work on _badgemenu

* Complete navbar HTML, obviously it still looks horrendous

* Change layout on torrent table, using grids.

* Remove Bootstrap and Jquery, and create basic nav

* More improvements to navbar, as well as work on _badgemenu

* Complete navbar HTML, obviously it still looks horrendous

* Change layout on torrent table, using grids.

* HOLY FUCK INDEX IS /DONE/

* DO UPLOAD PAGE, DELETE OLD SHITTY CSS

* Complete login page

* Remove Bootstrap and Jquery, and create basic nav

* More improvements to navbar, as well as work on _badgemenu

* Complete navbar HTML, obviously it still looks horrendous

* Change layout on torrent table, using grids.

* Remove Bootstrap and Jquery, and create basic nav

* More improvements to navbar, as well as work on _badgemenu

* Complete navbar HTML, obviously it still looks horrendous

* HOLY FUCK INDEX IS /DONE/

* DO UPLOAD PAGE, DELETE OLD SHITTY CSS

* Complete login page

* Begin work on profile page

* fucking git, man

* Damn, that looks sexy

* Complete login and register pages, include very minimal grid system, and delete all of view template

* Do view page!

* Finish view even more

* Fix dates and filesizes in torrent table

* Improve comment/captcha input

* Actually add magnet and torrent buttons

* Add open-iconic instead of fontawesome

* Improve user side-panel

* Rename Category_* to CategoryName

* Beginning to finish up

* Implement themes and add basic mobile support to front page

* Fix some slight color errors

* Fix captcha on dark

* magnet and torrent links on view
2017-05-24 14:20:51 +10:00
akuma06 369c9151f1 Merge remote-tracking branch 'refs/remotes/origin/dev' into multi-action-torrents-mod
# Conflicts:
#	router/modpanel.go
#	router/router.go
#	service/torrent/torrent.go
2017-05-20 13:58:37 +02:00
akuma06 0d5e2abf7f Added multi action on torrents 2017-05-20 13:45:15 +02:00
tomleb 7eee47b0d3 Fix bug, remove literals (#629)
* Use ModeratorDir variable

* Rename cookieHelper to cookie_helper for consistency

* Use named constant instead of literals

* Fix ability to upload when uploads are disabled

The old code let people upload under the right conditions when uploads
were disabled. (ie: User is banned and config.AdminAreStillAllowedTo is
false)

* Increase timeout (fixes #517)

* Fix inconsistent indentation *.{js, css} (fix #583)

* Fix negative page

Temporary fix. The issue was that going to a negative page caused the
sql query to have a negative offset. This caused an error in the
database query.

We need to cleanup this code, but this will work for now.

* Fix wrong PG_DATA directory due to upgrade to 9.6

* Add server status link to FAQ

* Fix failing tests

* Clarify group_vars/all and hosts doc

* Add a wrapper to protect /mod route

* Fix login page not showing form errors
2017-05-20 09:10:16 +10:00
tomleb babf0a37f0 Cleanups and fixes (#623)
* Keep naming consistent

* Remove execute bit from files

* Default to DefaultLanguage (without passing it to the func)

* Remove commented code

* Use Content-Type to get language json

* Lines of 400 characters is dumb

* Update new repo in README

* Remove useless script since we fallback to a defaultlang

* Fix fallback language panic

* Fix uninitialized MaxPerPage when not in querystr

The issue was that the req.MaxPerPage was not set (default to 0) when
the query string didn't include "max". This makes the server query the
whole db since the resulting limit is 0.

* Fix creating empty torrents (only worked once)

* Lines of 400 characters is still dumb
2017-05-19 12:55:59 +10:00
kipukun b1824092ff Moved mascot to the left, made her clickable with sound 2017-05-17 21:37:10 -04:00
akuma06 e2047843f3 Merge branch 'dev' into patch-19 2017-05-18 02:53:36 +02:00
akuma06 54cd4f2217 Update main.js 2017-05-18 02:51:53 +02:00
akuma06 4a52a1f3e3 Fix JS error + Seeding Mobile View
https://my.mixtape.moe/cvmemz.png
2017-05-18 02:49:48 +02:00
MMP0 e45a4a1c75 Fix 2017-05-18 09:44:36 +09:00
MMP0 2e8b36957e Small changes 2017-05-18 09:43:17 +09:00
akuma06 64d073f03c No hour on short and Hour on comments
So reverted modif from date-short
Added new date-comments to have hours on them (when screen is big
enough)
Edited the view for displaying date comments, they were displayed on the
border (even with old date-short)
2017-05-18 01:21:57 +02:00
akuma06 78ce328059 Fix #534
Now hours should be displayed in user language and timezone
2017-05-18 00:02:10 +02:00
akuma06 63844f0d4b Fix #590 2017-05-17 23:00:50 +02:00