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

43 Révisions

Auteur SHA1 Message Date
akuma06 ee808dc7a1 Fix for Travis and update to Go mod (#1771)
* Removing Vendor folder and go dep files
Adding support to Go mod

* Fixing message format for boolean argument (%t)

* Updating depency versions
Fixing go-i18n to latest v1 release (v1.10.0)
Repairing a test due to golang text update
Fixing logging information messages
Update to latest changes for anacrolix torrent API

* Update .travis.yml

Go dep is not needed anymore

* Update .travis.yml

* Go modules env variable

Adding support for go modules inside travis script

* Moving env variable

* Fixing test issue

* Fixing a format error in previous code
2019-06-17 21:16:31 +00: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 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
akuma06 94097dc2bb Fixing Double anidbID (shoud also fix twice flags) + removed pointer to config in functions. We have a singleton so don't need to pass it as argument 2017-08-02 17:12:52 +02:00
akuma06 03ea72595d OAuth API [done] (#1275)
* Initial Commit for OAuth API

This builds and run and return the right error.
Need to test it and then adding all users as possible client

* Added mising dependency

* just compile already...

* Fixing template test

* Imrpovements

Moved db stuff in models
Added some tests
Added form in modpanel to add/update a client
Added controllers for add/update of client

* Added Forms + speed improvements

Controller oauth client listing + html
Controller oauth client delete + messages
Messages on comment delete
New ES config that disable ES if set to false. Improve load speed on local development
Fix a load config bug
Fix index admin & translation string sign_out broken by @ewhal

* Sanitize empty strig in form array + css

Multiple empty array of strings are sanitized for the oauth client create form
Added some css for the form display

* Upload and Create form works

* Fix splitting response types

* Removing required on secret when updating

* fix travis error

* Fix travis template test

* Update dependency

* Moved to jinzhu instead of azhao

* randomizen secret on creation

* Final touch on oath api

improved display name
fix grant form csrf
fix login csrf on oauth

* Fix gorm test

* fix template test

* Fixing deleted dependency issue

* Make travis faster

* Fix typo

* Fix csrf for api calls

* This shouldn't be exempt

* Removing hard coded hash

@ewhal Don't forget to replace the hash in tokens.go with another one

* Added an example on how to use OAuth middleware

* Renamed fosite utils to oauth2 utils
2017-07-28 13:46:40 +10:00
PantsuDev d9142a73c3 Fix most go lint warnings 2017-07-23 15:50:18 +10:00
akuma06 2ddb3d454e Fix config load order. Configor has a reverted config files load priority :') 2017-07-22 01:24:13 +02:00
akuma06 4714c5c0f5 Improviong dynamic load of configs by putting only one variable one 2017-07-21 01:36:25 +02:00
akuma06 5d2a911b89 Fix for config cli args 2017-07-21 01:20:04 +02:00
akuma06 713ab02450 Added configor as a new library (#1126)
* Added configor as a new library

Now config is a singleton. You only need to do config.Get() instead of doing config.Conf.

* Forgot godep save 🐤

* Fix accidental removal of }
2017-07-10 22:11:05 +10:00
sfan5 1675b12cad Fix incorrect feed URLs (closes #971) 2017-06-08 20:08:30 +02:00
akuma06 7dc9004e7d New Config for sukebei
Just launch with : `./nyaa -conf config/sukebei.yml`
2017-06-02 12:44:38 +02:00
akuma06 e116b30b40 Better handle of test files
After some thoughts, it is better to use the config from config files
than default ones
2017-05-31 10:49:01 +02:00
akuma06 5376b9e271 New config files (#854)
* New config files

As decided, config files are parsed at runtime.
I decided to go for YAML config files because there can be comments in
it.
There are 2 files:
* config/default_config.yml <= which shouldn't be edited unless we add a
config parameter
* config/config.yml <= which is the user-defined config. This file
shouldn't be commited

Changed every call to config.XXX to config.Conf.XXX (look to the new
stucture of config in config/types.go)

Of course, putting config parameters in config.yml overrides config in
config_default.yml. You don't have to put everything in it, just add
what you want to override.

* Fixing test

Replacing conf.New by config.Conf

* Fixing call to config.Conf to config.Config{} in test files

* Might have fixed testing with this

Printf instead of Fatalf

* Renaming config.yml in example file

* Forbid commiting config.yml

* Should be now fixed

* Do not need this file anymore
2017-05-30 21:21:57 -05:00
John Smith 0159579611
Copy Programmatically 2017-05-29 16:29:22 +10:00
akuma06 6481e90a0c Golint friendly next (#756)
* Gofmt friendly

Keeping Go source code in line with what they preconize

* Golint Friendly Next

So I have made some variables unexported
Added comments in every function that I know what it does
Removed some deprecated stuff that I was sure of
Added a comment on possible deprecated methods "Is it deprecated?"
Changed some variable/method name according to golint recommendations

* Update filelist.go
2017-05-26 12:12:52 +02:00
Eliot Whalan b4b1b1c26a
go fmt all the code 2017-05-24 17:11:13 +10:00
akuma06 4cbbb95e4f Notification for Users (WIP) 2017-05-20 20:53:05 +02:00
sfan5 4c24318cb3 More sukebei fixes (#649)
* Remove useless .Table() from db usage

This is handled via TableName() already

* Optimization: omit file-list fetching for old torrents

* Use seperate tables for reports & files on sukebei

* Fix invalid pages in nav if <5 pages total
2017-05-21 00:26:22 +10:00
sfan5 a3fa6df938 Remove bugs (#643)
* Fix S/L/D columns wasting huge amounts of space

Partially reverts 0c9cdfa8bf.

* Move last scrape below seed-bar

Also fixes the very misleading indentation

* Show category name on view page too

* Fix fucked up login page (fixes #640)

* Fix empty page on login w/o pass (fixes #634)

* Fix incorrectly colored error text in day mode

* Better readable footer in night mode

* Prepare having old uploader names on sukebei and various fixes for sukebei

* Different HTML title for sukebei
2017-05-20 20:45:27 +10: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
Eliot Whalan cec71bd759 Add in support for commenting on sukebei 2017-05-16 12:53:02 +10:00
Eliot Whalan b927bbfbd4 Change config to use torrents by default 2017-05-15 19:09:05 +10:00
Eliot Whalan 7d5369cfe1 Make table name for torrents selectable 2017-05-15 16:24:06 +10:00
ElegantMonkey df2c9bc2f7 Fix conflicts 2017-05-14 21:19:29 -03:00
Atvaark cd844aec45 Replace 'en-us' literals with the default language
This consolidates the places where a default language has to be set.

- Removed import of the 'userService' package into the 'languages' util
  package
  This was required to prevent a cyclic import between the two packages.
- Added a 'UserRetriever' interface to read the language setting of users
  inside the 'languages' package
2017-05-14 22:10:07 +02:00
ElegantMonkey 2da2ad4214 FilesizeFetcher -> MetainfoFetcher 2017-05-14 08:20:34 -03:00
akuma06 ed26ee81eb Merge branch 'dev' into dev 2017-05-14 00:55:17 +02:00
Atvaark 6e546facc0 Fix i18n file errors
- Fixed an error in the spanish and chinese translation file
- Refactored reading the translation files
  Instead of ignoring errors in the non-default language files
  the error will now be returned and the remaining files will
  not be loaded.
- Added a unit test to check if all translation files are valid
- Added an i18n config to specify the translations dir and the
  default language
2017-05-13 22:52:17 +02:00
ElegantMonkey a068984af3 Add filesize fetcher mode 2017-05-13 14:58:48 -03:00
Atvaark b12e812b36 Add database logmode to the config
This allows users to change the default logging verbosity (errors)
to either *detailed* (prints SQL statements) or *silent*.
Also added support for using a custom logger function.

- Fixed the gorm unit test that checks the automigrations
  They will actually fail if any errors were logged now.
- Added a postgres unit test
  Currently disabled because it would need a running local
  postgres db and  a change to the .travis.yml file to work
  inside the CI build.
2017-05-11 22:28:09 +02:00
Jeff Becker 0e8a3cde3b Merge branch 'cache-interface' into merge-cache-interface 2017-05-11 09:24:20 -04:00
Jeff Becker 059ea7d2a8 abstract out cache 2017-05-11 09:01:53 -04:00
Jeff Becker 1089883ed5 initial 2017-05-10 13:29:35 -04:00
Chris MacLeod c9b72206a5 Consistency, formatting, error checking, cleanup, and a couple bug fixes (#245)
* Checkpoint: it builds

The config, db, model, network, os, and public packages have had some
fixes to glaringly obvious flaws, dead code removed, and stylistic
changes.

* Style changes and old code removal in router

Router needs a lot of work done to its (lack of) error handling.

* Dead code removal and style changes

Now up to util/email/email.go. After I'm finished with the initial sweep
I'll go back and fix error handling and security issues. Then I'll fix
the broken API. Then I'll go through to add documentation and fix code
visibility.

* Finish dead code removal and style changes

Vendored libraries not touched. Everything still needs security fixes
and documentation. There's also one case of broken functionality.

* Fix accidental find-and-replace

* Style, error checking, saftey, bug fix changes

* Redo error checking erased during merge

* Re-add merge-erased fix. Make Safe safe.
2017-05-09 21:34:40 -05:00
sfan5 975ce5e6d4 Don't look for old comments on new torrents 2017-05-08 23:53:37 +02:00
Jeff Becker 37350a1233 add initial optional i2p connectivity 2017-05-07 15:51:37 -04:00
akuma06 dc050d29fc Updated my own branch 2017-05-06 17:53:17 +02:00
ayame-git 19a72dfe08 config file works now 2017-05-06 21:43:15 +03:00
akuma06 a456a5f9f2 Fixed parameters through command line for DB
config is now a singleton
can use config.GetInstance() to know the context
2017-05-06 17:37:56 +02:00
Eliot Whalan 0d6f5ef50b Add caching? 2017-05-06 15:30:32 +10:00
Eliot Whalan f50a0f9ace Merge branch 'master' of github.com:ewhal/nyaa 2017-05-05 23:18:18 +10:00
akuma06 ade17dad04 Merge branch 'master' of https://github.com/ewhal/nyaa
Conflicts:
	main.go
2017-05-05 15:08:02 +02:00