Compare commits

..

2891 Commits
v3.0.x ... dev

Author SHA1 Message Date
Pig Fang
52f6fefed0
chore: remove unavailable sponsor info 2026-03-30 21:42:23 +08:00
Steven Qiu
840555df42
make tests happy 2026-03-09 23:13:47 +08:00
Steven Qiu
9aa867e8aa
refactor: do not catch exceptions when cannot read options 2026-03-09 20:21:43 +08:00
Steven Qiu
d70b39f445
feat: add Auto-Submitted header to emails
@see https://datatracker.ietf.org/doc/html/rfc3834
Hopefully this could prevent sender being spammed by auto replies...
2025-10-09 01:54:37 +08:00
SANYE-YA
33055ecbf9
fix avatar (refactor needed) (#666) 2025-08-07 05:08:13 +08:00
Steven Qiu
2e39fbce77
fix: avatar (refactor needed) 2025-07-31 19:59:29 +08:00
Steven Qiu
1b3b020d52
fix: make imagick sanitize result stable 2025-07-27 03:34:35 +08:00
Steven Qiu
33d805ee82
fix: skinlib 2d preview (refactor needed) 2025-07-26 21:38:33 +08:00
Steven Qiu
57c02dd51c
fix: check if imagick installed 2025-07-25 17:43:53 +08:00
Steven Qiu
5b6bb98860
chore: update README 2025-07-25 17:39:02 +08:00
Steven Qiu
c01112a6c1
chore: use imagick for Intervention\Image 2025-07-25 17:13:54 +08:00
Steven Qiu
064b0967fc
chore: complete Facade namespaces in use statements 2025-07-02 19:29:19 +08:00
Steven Qiu
9f4c59abec
chore: no .DS_Store [skip ci] 2025-07-02 19:29:19 +08:00
Steven Qiu
d8547a0a3d
refactor: use Intervention/Image to sanitize textures 2025-07-02 19:12:46 +08:00
Steven Qiu
9c51bd602b chore: remove redundant VSCode launch profile 2025-06-29 16:50:14 +08:00
Steven Qiu
bc3f504ca3 chore: ci 2025-06-29 16:50:14 +08:00
Steven Qiu
761cbb7828
feat: max texture width & texture sanitize (#662)
* feat: sanitize uploaded file when user upload texture

* feat: limit max texture width to avoid png bomb

* style: apply php-cs-fixer fixes

* chore: set default value for max_texture_width option

* Update skinlib.yml

Co-authored-by: Pig Fang <g-plane@hotmail.com>

---------

Co-authored-by: Pig Fang <g-plane@hotmail.com>
2025-06-29 16:09:55 +08:00
Steven Qiu
01fe3eb4cb
chore: set filename for ci snapshot build artifact 2025-06-28 17:48:16 +08:00
Steven Qiu
f03dd8122b
chore: remove redundant command in ci 2025-06-28 17:47:28 +08:00
Steven Qiu
cfda2a6bf8
style: apply php-cs-fixer fixes 2025-06-28 06:17:40 +08:00
Steven Qiu
74ce668221
fix: phpunit test 2025-06-28 06:16:49 +08:00
Steven Qiu
5a18d24464
fix: db exception in tests 2025-06-28 03:46:17 +08:00
Steven Qiu
5125862f80
fix: unexpected db query during composer install 2025-06-27 19:23:20 +08:00
Steven Qiu
fa791857ec
fix: ci snapshot build 2025-06-26 21:47:35 +08:00
Steven Qiu
24ad29ea99
style: apply php-cs-fixer fixes 2025-06-26 21:16:56 +08:00
Steven Qiu
cdfb972bd0 fix: scopes missing after cache clear 2025-06-26 21:15:53 +08:00
Zephyr Lykos
1985ce6ff8
config: switch default registry 2025-06-25 22:57:43 +08:00
Steven Qiu
d84eb65d55
Handle null route when request is handled by middleware 2025-06-22 21:50:57 +08:00
Steven Qiu
16474fb5d0
Remove locale cookie for API requests (#660)
* Do not set locale cookie for API requests

https://t.me/blessing_skin/184899

* Remove redundant code
2025-06-22 17:48:48 +08:00
Jerry
186138b884
Fix Netlify links (#656)
* Update README-zh.md

fix: wrong link

* Fix Netlify link

---------

Co-authored-by: Steven Qiu <tnqzh123@littlesk.in>
2025-06-22 17:40:50 +08:00
Zephyr Lykos
9ca6e37e39
chore: update deps 2025-01-18 16:44:33 +08:00
Steven Qiu
866e182c31
Fix #583 (#584) 2024-01-12 20:44:58 +08:00
Zephyr Lykos
739b9c97d7
tests: fix CheckRoleTest warning 2024-01-12 20:41:37 +08:00
Zephyr Lykos
0a43c5aa67
style: format code 2024-01-12 20:37:11 +08:00
Zephyr Lykos
35bd4524e6
ci: bump snapshot builds to PHP 8.2 2024-01-12 20:35:16 +08:00
Zephyr Lykos
eba91d5f1d
chore: update frontend deps 2024-01-12 20:31:53 +08:00
Zephyr Lykos
d764836244
ci: update deps 2024-01-12 20:31:37 +08:00
Zephyr Lykos
b1b4a71c3e
chore: update deps 2024-01-12 20:24:47 +08:00
Zephyr Lykos
fb74b43d64
upgrade dependencies 2023-08-26 14:29:53 +08:00
Zephyr Lykos
2a24506c15
config: switch default registry to CloudFront 2023-07-22 15:10:29 +08:00
Asnxthaony
f436c056e0
fix: load PluginServiceProvider first 2023-05-31 16:47:56 +08:00
Asnxthaony
77b58de7ef
update to checkout@v3 2023-05-30 17:57:08 +08:00
Asnxthaony
f5a5367e3e
fix ci 2023-05-30 17:42:45 +08:00
Asnxthaony
b811a7ae41
BREAKING: increase PHP version requirement to 8.1.0 2023-05-30 16:43:57 +08:00
Asnxthaony
d96dff1144
revert auto load Console commands 2023-05-30 15:09:39 +08:00
Asnxthaony
169ca11030
BREAKING: get ready for Laravel 10 2023-05-30 14:56:27 +08:00
Asnxthaony
b25b7588a9
use twig 3 & upgrade dependencies 2023-05-30 13:19:17 +08:00
Asnxthaony
46cccdb708
feat: generate source maps for production 2023-05-27 00:39:09 +08:00
Asnxthaony
7d9b34ecc9
fix: allow open CLI from anywhere 2023-05-27 00:37:47 +08:00
Asnxthaony
a13879f2df
fix: use unique routes name 2023-05-27 00:36:01 +08:00
Asnxthaony
1e8c0f85d5
upgrade dependencies 2023-05-26 23:46:10 +08:00
Tianle Xu
2a181c9a77
fix(i18n): typo in en/auth.yml (#527) 2023-05-06 00:36:17 +08:00
Haowei Wen
1698f1162e fix ci 2023-02-10 21:28:31 +00:00
Haowei Wen
cba50ecc59 Make skin viewer resizable 2023-02-10 20:35:30 +00:00
Haowei Wen
908f191ac8 Fix sending request to /textures/undefined 2023-02-10 19:30:04 +00:00
Haowei Wen
5a5dbea05b Upgrade skinview3d 2023-02-10 06:48:55 +08:00
Haowei Wen
950f2e6c7a Update fontawesome to 6.3.0 2023-02-09 20:13:05 +00:00
Haowei Wen
ec7be1bf63 Fix dev container 2023-02-09 19:48:30 +00:00
Pig Fang
5c4afe8f80
update middlewares 2023-01-29 11:59:30 +08:00
Pig Fang
ececb3486b
upgrade PHP dependencies 2023-01-29 11:51:06 +08:00
Pig Fang
bebdea9c20
user menu can be controlled by plugins 2023-01-26 09:37:23 +08:00
Pig Fang
b8188c91be
remove meta.js file 2023-01-25 12:01:29 +08:00
Pig Fang
0b516d02c5
clean up 2023-01-25 11:48:46 +08:00
Pig Fang
82dd87703f
first argument of option() function is required 2023-01-25 11:45:33 +08:00
Pig Fang
63b828d46b
remove Workbox 2023-01-24 18:22:16 +08:00
Pig Fang
7d005f7e4a
update test 2023-01-17 10:09:44 +08:00
Pig Fang
5750c1ae94
add test 2023-01-17 10:08:04 +08:00
Pig Fang
7eff0cb66d
update Composer lock file 2023-01-17 10:05:39 +08:00
Pig Fang
eff859a864
update php-cs-fixer config & apply fixes 2023-01-16 23:15:41 +08:00
Pig Fang
64dea61ec9
refactor 2023-01-16 23:06:31 +08:00
Pig Fang
0b169df679
fix running php-cs-fixer 2023-01-16 23:02:44 +08:00
Pig Fang
e72b68f8d6
disable PHP 8.0 in CI temporarily 2023-01-16 22:58:37 +08:00
Pig Fang
f1414c1dcb
add PHP 8.2 in CI 2023-01-16 22:56:27 +08:00
Pig Fang
7086098536
fix #463 2023-01-16 22:54:49 +08:00
Pig Fang
fb35d58a65
update Composer lock file 2023-01-16 22:53:08 +08:00
薄荷牛奶萌
9120efe1c6
The interface has been modified. (#514)
Co-authored-by: Pig Fang <g-plane@hotmail.com>
Co-authored-by: Zephyr Lykos <git@mochaa.ws>
2023-01-11 12:58:37 +08:00
Asnxthaony
564672b436
fix: allow logout when user are banned 2022-12-29 12:06:58 +08:00
Pig Fang
cc8873ec31
New translations setup.yml (Chinese Simplified) (#510) 2022-12-10 10:08:44 +08:00
Pig Fang
fa90b96682
bundle Font Awesome 2022-10-08 15:58:14 +08:00
Pig Fang
f1c7845b8d
New translations admin.yml (Japanese) (#479) 2022-09-29 22:58:56 +08:00
Pig Fang
be244cde60
New translations user.yml (Chinese Simplified) (#469) 2022-08-21 15:02:10 +08:00
bingling_sama
2dc2409d3f
fix: email verification resend link visibility on dark mode (#461) 2022-08-05 14:26:11 +08:00
Pig Fang
32fa6a8a52
New Crowdin updates (#455)
* New translations auth.yml (Spanish)

* New translations options.yml (Spanish)

* New translations user.yml (Spanish)
2022-08-05 14:24:03 +08:00
mochaaP
ec790b41f1
chore(bootstrap): remove environment check
This is not necessary as we should leave troubleshooting to users themselves. It's not our responsibility to warn about misconfigurations.
2022-07-14 03:31:52 +08:00
Pig Fang
b8337bed19
New translations user.yml (Chinese Traditional) (#439) 2022-07-13 01:14:24 +08:00
mochaaP
73e308f15a fix(admin): chart title color on dark mode 2022-07-11 21:16:47 +00:00
mochaaP
3e50237846 Revert "chore(gitpod): private port by default"
This reverts commit b7c3e06590.
2022-07-11 21:05:33 +00:00
Pig Fang
33b64625d9
New translations auth.yml (Spanish) (#436) 2022-07-12 04:15:52 +08:00
Pig Fang
c2c6ef8e51
New Crowdin updates (#432)
* New translations user.yml (French)

* New translations user.yml (Spanish)

* New translations user.yml (German)

* New translations user.yml (Greek)

* New translations user.yml (Italian)

* New translations user.yml (Japanese)

* New translations user.yml (Korean)

* New translations user.yml (Dutch)

* New translations user.yml (Portuguese)

* New translations user.yml (Russian)

* New translations user.yml (Chinese Simplified)

* New translations user.yml (Chinese Traditional)
2022-07-06 14:00:13 +08:00
Haowei Wen
a153753dc5 fix typo 2022-07-06 13:43:14 +08:00
Asnxthaony
e965a53c18
feat(closet): add sanity check on closet management 2022-07-05 17:09:06 +08:00
Asnxthaony
1a7f76ea69
fix(skinlib): cast allow_downloading_texture to boolean 2022-07-04 19:11:05 +08:00
mochaaP
fe7307d655
chore(docs): add requirement for OpenSSL 1.1.1 [skip ci] 2022-06-28 14:56:24 +08:00
mochaaP
411f85b43b
chore(docs): add requirement for OpenSSL 1.1.1 2022-06-28 14:55:18 +08:00
mochaaP
4303d14e64
chore: remove stale bot 2022-06-27 11:39:46 +08:00
mochaaP
b7c3e06590 chore(gitpod): private port by default 2022-06-23 10:19:33 +00:00
mochaaP
8fd8b806b1 Revert "fix(test): disable concurrency"
This reverts commit b190ffb3d2.
2022-06-23 09:18:57 +00:00
mochaaP
2786626a3f fix: text overflow on home page 2022-06-23 08:39:43 +00:00
mochaaP
8279817d8c chore: switch default marketplace source 2022-06-23 08:19:46 +00:00
mochaaP
b737a65f5f Bump version to 6.0.2 2022-06-23 07:58:55 +00:00
mochaaP
01f3bd4eea Revert "fix: update lockfile"
This reverts commit b35a526d7b.
2022-06-23 07:55:23 +00:00
mochaaP
a8f2f64260 chore(ci): frozen yarn lockfile on test 2022-06-23 07:43:05 +00:00
mochaaP
b190ffb3d2 fix(test): disable concurrency 2022-06-23 07:19:50 +00:00
mochaaP
3686f6a2bd fix(ci): yarn cache 2022-06-23 07:16:26 +00:00
mochaaP
b35a526d7b fix: update lockfile 2022-06-23 07:13:58 +00:00
mochaaP
e7d4eaa69a Revert "chore: bump dependencies"
This reverts commit aa55856d91.
2022-06-23 07:03:53 +00:00
mochaaP
d3599b1a1c fix(test): workaround race condition 2022-06-23 07:00:38 +00:00
mochaaP
aa55856d91 chore: bump dependencies 2022-06-23 06:31:10 +00:00
mochaaP
ac63dc368c chore: fixed width icons 2022-06-23 06:02:11 +00:00
mochaaP
c81fd58ec4 chore: align checkbox with title 2022-06-23 06:01:24 +00:00
mochaaP
f0a692f492 fix: card color on dark mode 2022-06-23 06:00:47 +00:00
mochaaP
68701d1b3c fix: export global with Object.assign 2022-06-21 15:07:47 +00:00
mochaaP
190642224d fix: running on gitpod 2022-06-21 15:07:22 +00:00
mochaaP
6ebe817b47
Bump version to 6.0.1 2022-06-19 16:01:46 +08:00
mochaaP
0f31756643 fix: export globals
This reverts commit 899de768f0.
2022-06-17 07:49:13 +00:00
mochaaP
f90a8c5371 fix: jQuery export 2022-06-17 07:38:37 +00:00
mochaaP
0394597b52 chore: use project typescript in vscode 2022-06-17 07:21:31 +00:00
mochaaP
9384e7dde6 chore: migrate to gp ports wait 2022-06-17 07:21:06 +00:00
mochaaP
eca2dffc31 fix: remove gitpod config from tsconfig 2022-06-17 14:03:20 +08:00
mochaaP
cca94c85ad chore: move in gitpod config 2022-06-17 13:47:29 +08:00
mochaaP
899de768f0 fix: export globals 2022-06-17 13:24:52 +08:00
mochaaP
74db97c644 Revert "expose React globals"
This reverts commit ccbb4f42f0.
2022-06-17 13:20:49 +08:00
Pig Fang
ccbb4f42f0
expose React globals
fix bs-community/blessing-skin-plugins#145
2022-06-15 14:16:37 +08:00
Pig Fang
e57038256c Bump version to 6.0.0 2022-06-13 17:41:08 +08:00
graywolf
663d9120b6
feat: sort closet by desc (#412)
for consistency with skinlib
2022-06-03 20:11:59 +08:00
Pig Fang
205f89bfc5
New translations setup.yml (Japanese) (#391) 2022-04-20 14:06:34 +08:00
mochaaP
7b267497c0
fix(build): composer autoload 2022-04-18 22:21:29 +08:00
mochaaP
c0112c7e25
chore(ci): manual notification push 2022-04-17 05:32:39 +08:00
mochaaP
81b7d0d7b7
feat(ci): snapshot builds 2022-04-17 03:43:18 +08:00
mochaaP
d4ea48c904
chore: make typescript happy (explicit any) 2022-04-17 02:33:36 +08:00
mochaaP
e4d35ad012
feat: re-add docker build support (#395)
also fixed failed ci
2022-04-17 02:23:48 +08:00
mochaaP
2452ed06da
chore: new copyright footer options (#392)
Squashed commit of the following:

commit ea640e77447e5a120f679c0b8f27d048487dd560
Author: Cinnamoroll-Rabbit <101342651+Cinnamoroll-Rabbit@users.noreply.github.com>
Date:   Sat Apr 16 23:16:00 2022 +0800

    chore: new copyright footer options
2022-04-17 02:17:54 +08:00
Pig Fang
b738b388ae
New Crowdin updates (#390) 2022-04-15 11:46:44 +08:00
Pig Fang
157994aaea
New translations options.yml (Russian) (#388) 2022-04-10 09:31:57 +08:00
Asnxthaony
c2a6ba9570
fix webpack config 2022-03-26 02:07:55 +08:00
Pig Fang
5596c636b7
New Crowdin updates (#383) 2022-03-24 08:30:37 +08:00
Pig Fang
5fc5c2c8c2
remove usage of jsDelivr
fix #369
fix #372
fix #375
2022-02-16 17:57:01 +08:00
Pig Fang
424ab20db1
fix possible React Hooks issues 2022-02-13 12:09:08 +08:00
Pig Fang
8b3376bf9b
refactor: use facade instead of service container 2022-02-13 12:05:39 +08:00
Pig Fang
ca42d65d1c reset page when changing skin library search query
fix #362
2022-02-12 18:11:48 +08:00
Asnxthaony
ab58c86695
reset page to 1 on new search 2022-02-12 18:04:49 +08:00
Pig Fang
3ebaf81880
fix loading AdminLTE dependencies 2022-02-12 17:57:47 +08:00
Pig Fang
8ecfc076fd
add pre-commit hook to format code 2022-02-12 17:37:16 +08:00
Pig Fang
fce1e8874f
apply Prettier fixes 2022-02-12 17:35:09 +08:00
Pig Fang
192c968bae
fix tests 2022-02-12 17:31:17 +08:00
Pig Fang
04065aa427
upgrade AdminLTE 2022-02-12 17:26:38 +08:00
Pig Fang
1cfbbd6967
fix WebP compatibility 2022-02-07 09:19:48 +08:00
Pig Fang
e4bd8a7702
Bump version to 6.0.0-rc.2 2022-02-05 22:16:25 +08:00
Pig Fang
b42f87eaa2
check prerelease when releasing 2022-02-05 22:14:08 +08:00
Pig Fang
7de23b6652
fix WebP compatibility 2022-02-05 22:04:17 +08:00
Pig Fang
b8205cd71f
apply Prettier fixes 2022-02-05 16:24:37 +08:00
Pig Fang
e0bbc2f3f5
fix tests 2022-02-05 16:16:41 +08:00
Pig Fang
5579bed8f0
upgrade skinview3d 2022-02-05 15:02:58 +08:00
Pig Fang
1c105629fc
simplify VS Code extensions recommendation [skip ci] 2022-02-04 22:54:21 +08:00
Pig Fang
1b55037db6
add npm script for type checking 2022-02-03 18:00:08 +08:00
Pig Fang
69e54d3198
fix logo in readme [skip ci] 2022-01-05 11:19:45 +08:00
Pig Fang
11a2c602ee
fix rendering content policy 2021-12-14 23:23:13 +08:00
Pig Fang
72be88b494
remove an extension recommendation 2021-12-14 23:12:12 +08:00
Pig Fang
2530f13f60
add PHP 8.1 to CI 2021-12-12 19:41:08 +08:00
Pig Fang
89db8299bb Bump version to 6.0.0-rc.1 2021-12-12 19:36:55 +08:00
Pig Fang
1b00600c3b
BREAKING: increase PHP version requirement to 8.0.2 2021-12-12 19:20:06 +08:00
Pig Fang
b2c5cca240
remove PHP 7.4 from CI 2021-12-12 18:15:21 +08:00
Pig Fang
efa20f4940
fix test 2021-12-12 18:13:39 +08:00
Pig Fang
faea0126ea
apply php-cs-fixer fixes 2021-12-12 17:59:27 +08:00
Pig Fang
88b5da401a
upgrade PHP dependencies 2021-12-12 10:58:08 +08:00
mochaaP
f3d1b196ff
fix: build on node 17 2021-11-12 14:54:22 +08:00
Pig Fang
0276d2a35b
bump version to 6.0.0-beta.4 2021-10-31 15:26:58 +08:00
Pig Fang
e253e7bff5
upgrade dependency (fix #311) 2021-10-31 15:07:47 +08:00
Pig Fang
09b7f949b7
update sponsors and backers 2021-09-04 17:19:49 +08:00
Pig Fang
07c79da198
ignore size limit warning 2021-08-23 15:35:14 +08:00
Pig Fang
e89b65afdf
fix chart data (fix #336) 2021-08-22 19:27:34 +08:00
Pig Fang
6db0a0adeb
change date format of chart in admin panel 2021-08-22 18:14:56 +08:00
Pig Fang
458791df14
New Crowdin updates (#335) 2021-08-22 17:21:29 +08:00
Pig Fang
3f7ba49c2c
fix player name rule 2021-08-22 16:45:26 +08:00
Pig Fang
2c579a4043
fix chart data 2021-08-22 12:47:25 +08:00
Pig Fang
d98beae262
tweak charts of admin panel 2021-08-22 12:04:13 +08:00
Pig Fang
014864e47d
change font of usage in admin panel 2021-08-22 11:06:55 +08:00
Pig Fang
b5eecc837d
New Crowdin updates (#329) 2021-08-22 10:58:46 +08:00
Pig Fang
e0d6403499
apply Prettier fixes 2021-08-22 10:57:45 +08:00
Pig Fang
79ec6e206a
fix duplicated logout modal (fix #332) 2021-08-22 10:50:58 +08:00
Pig Fang
e8ec0c4c0d
remove "url-loader" and "file-loader" 2021-08-22 10:39:41 +08:00
Pig Fang
61f0bf174f
report webpack warnings 2021-08-21 23:06:23 +08:00
Pig Fang
ff017573c3
use lock icon to indicate a private texture 2021-08-19 23:23:02 +08:00
Pig Fang
c12c1fbd01
make whole card of skin library item clickable 2021-08-19 23:15:56 +08:00
Pig Fang
7512eeb465
upgrade blessing/texture-renderer to accept fixes 2021-08-15 15:05:38 +08:00
Pig Fang
2b4364f2f7
New Crowdin updates (#322) 2021-08-11 23:27:02 +08:00
Pig Fang
4044e50aa5
enable Russian translations option 2021-08-08 13:29:56 +08:00
Pig Fang
d8a02a6a46
New Crowdin updates (#319)
Finished Russian.
2021-08-08 13:16:00 +08:00
Asnxthaony
61ce97ad79
use cached scopes 2021-08-07 13:20:47 +08:00
Pig Fang
a79cb1c639
update issue templates config 2021-07-30 14:46:26 +08:00
Pig Fang
e1262b4179
update issue templates 2021-07-30 14:41:27 +08:00
Asnxthaony
20e299e6c3
fix i18n 2021-07-30 06:27:57 +08:00
Asnxthaony
1f24e75f76
added missing service provider 2021-07-27 08:06:13 +08:00
Pig Fang
861412dcfb
update stale label 2021-07-26 09:38:08 +08:00
Pig Fang
38a6e436a9
New Crowdin updates (#303) 2021-07-25 13:26:40 +08:00
Pig Fang
4875564ee4
apply php-cs-fixer fix 2021-07-25 13:26:13 +08:00
Pig Fang
baf4921479
new player name rule: allow UTF-8 2021-07-25 13:14:08 +08:00
Pig Fang
1b0e9ae8d5
add stale bot 2021-07-25 11:43:58 +08:00
dz_paji
b886556137
Update auth.yml (#309) 2021-07-15 20:35:30 +08:00
Pig Fang
12801e5f04 Bump version to 6.0.0-beta.3 2021-07-03 15:42:21 +08:00
Pig Fang
ab8d1a970c
New Crowdin updates (#297) 2021-06-21 09:25:14 +08:00
Pig Fang
3ef1b249f4 update readme 2021-06-07 09:56:36 +08:00
Pig Fang
46c0119c7f fix dependencies 2021-06-07 09:54:29 +08:00
Pig Fang
35963a7e70 Revert "upgrade PHP dependencies"
This reverts commit 7388e46a2d.
2021-06-07 09:49:32 +08:00
Pig Fang
7388e46a2d upgrade PHP dependencies 2021-06-07 09:39:58 +08:00
Pig Fang
af76ac1a6b
fix color in dark mode 2021-06-06 22:41:02 +08:00
Pig Fang
073da66623
support toggling dark mode 2021-06-06 18:07:08 +08:00
Pig Fang
9c54427b08
add IDE helper 2021-06-06 17:32:35 +08:00
Pig Fang
b941210d3c
fix TypeScript errors 2021-06-06 14:33:28 +08:00
Pig Fang
7e04f72292
support dark mode UI 2021-06-06 14:27:21 +08:00
Pig Fang
1ad19878f8
upgrade AdminLTE 2021-06-05 20:05:12 +08:00
Pig Fang
09bba22227
upgrade Prettier 2021-06-05 17:11:42 +08:00
Pig Fang
7381699690
upgrade Jest and TypeScript 2021-06-05 17:10:41 +08:00
Pig Fang
ed82469f88
upgrade webpack-related dependencies 2021-06-05 16:14:39 +08:00
Pig Fang
c9838025f6
New Crowdin updates (#288) 2021-05-22 16:37:39 +08:00
Pig Fang
c4e292c877
fix resolving report with non-existing reporter 2021-05-04 18:32:35 +08:00
Pig Fang
b7af1ebf19
fix: check texture size for capes 2021-05-04 18:20:24 +08:00
Pig Fang
6226784b10
apply php-cs-fixer fixes 2021-05-04 18:17:45 +08:00
Pig Fang
5550b877df
add php-cs-fixer as dev dependency 2021-05-04 18:17:01 +08:00
Pig Fang
bb0a1dbc40
upgrade composer/semver 2021-05-04 18:05:39 +08:00
Pig Fang
8813e58269
re-enable PHP 8.0 on CI 2021-05-02 11:40:05 +08:00
Pig Fang
9cf1269798
upgrade PHP dependencies 2021-05-02 11:35:41 +08:00
Pig Fang
14fd06a11f
fix tests 2021-05-02 11:35:28 +08:00
Pig Fang
332b8cf7ef
remove unnessary "skip-ci" detection 2021-05-02 11:23:09 +08:00
Pig Fang
0a74ddd903
fix linting error 2021-05-02 11:22:11 +08:00
Pig Fang
4ccee9e47e
update sponsors and backers 2021-05-02 11:13:44 +08:00
Asnxthaony
387fe81a60
feat: OAuth scope (#287)
Co-authored-by: Pig Fang <g-plane@hotmail.com>
2021-04-18 15:31:57 +08:00
Pig Fang
5fb4240a47
fix page isn't updated when switching category in closet
fix #284
2021-04-03 10:14:21 +08:00
Pig Fang
6f638dd9fc
fix tests 2021-04-03 09:42:24 +08:00
Pig Fang
2b474437f0
don't switch category when click current closet tab
fix #279
2021-04-03 09:24:01 +08:00
Pig Fang
25a93d79b7
upgrade testing-library 2021-04-03 09:04:19 +08:00
Pig Fang
49df9d92a0
New Crowdin updates (#267) 2021-02-20 10:59:34 +08:00
Pig Fang
97057bc432
fix order of loading front-end l10n file 2021-02-18 09:43:23 +08:00
Pig Fang
fa3a3a16cb
upgrade Jest 2021-02-18 09:39:30 +08:00
Pig Fang
1db946e372
fix panic on empty notification content 2021-02-17 22:40:02 +08:00
Pig Fang
de1f596401
Bump version to 6.0.0-beta.2 2021-02-17 16:04:27 +08:00
Pig Fang
460153104c
upgrade "blessing/texture-renderer" 2021-02-17 16:01:13 +08:00
Pig Fang
28b80278ba
upgrade Laravel 2021-02-17 10:32:32 +08:00
Pig Fang
45a854450e
swap readme default language 2021-02-17 10:25:54 +08:00
Pig Fang
ad6eabff0d
update sponsors 2021-02-15 11:07:12 +08:00
Pig Fang
7be5a4ea62
Bump version to 6.0.0-beta.1 2021-02-15 10:58:56 +08:00
Pig Fang
89bb2b4db9
reject single-layer alex texture 2021-02-13 15:19:12 +08:00
Pig Fang
6f97c1efcc
remove usage of iconv 2021-01-30 17:31:43 +08:00
Pig Fang
eae6ff887c
remove "tymon/jwt-auth" package 2021-01-30 16:43:14 +08:00
Pig Fang
4020571e53
enable "zh-TW" option 2021-01-30 13:00:50 +08:00
Pig Fang
d229cb1190
upgrade webpack-related deps 2021-01-30 12:54:14 +08:00
Pig Fang
9a88570387
New Crowdin updates (#255) 2021-01-30 11:58:55 +08:00
Pig Fang
03076a9405
New Crowdin updates (#244) 2021-01-02 16:48:31 +08:00
Pig Fang
f2ddcb6ce4
use React 17 new JSX runtime 2021-01-02 16:38:18 +08:00
Pig Fang
746832a9f6
upgrade TypeScript 2021-01-02 16:12:59 +08:00
Pig Fang
928d6ffa8c
Revert "add PHP 8.0 tests on CI"
This reverts commit 2b620c3338.
2021-01-02 16:06:02 +08:00
Pig Fang
d5fd4e4c1b
upgrade PHP dependencies 2021-01-02 16:04:38 +08:00
Pig Fang
2b620c3338
add PHP 8.0 tests on CI 2021-01-02 15:55:32 +08:00
Pig Fang
4ae6368931
run php-cs-fixer 2021-01-02 15:51:37 +08:00
Pig Fang
64f2beda02
upgrade PHP dependencies (fix #247) 2021-01-01 19:03:58 +08:00
Steven Qiu
5b7bf8e7aa
Correct a word 2020-12-24 09:34:19 +08:00
Pig Fang
84c544b683
New Crowdin updates (#243) 2020-11-08 16:41:05 +08:00
Pig Fang
34c90b50f2
upgrade to webpack 5
Web CLI update:
* commander -> cac
* enquirer -> prompts
2020-11-06 15:37:45 +08:00
Pig Fang
b07e227e91
upgrade webpack loaders and plugins 2020-11-04 14:31:32 +08:00
Pig Fang
7e8f7a4a68
tweak CSS minification 2020-11-04 11:34:36 +08:00
Pig Fang
d2ffb5b9bf
fix test 2020-10-31 10:54:50 +08:00
Pig Fang
66eb658410
generate asset tags at compile time 2020-10-31 10:43:47 +08:00
Pig Fang
17ad007d40
scripts -> tools 2020-10-30 10:11:50 +08:00
Pig Fang
2163356f7e
remove Composer --no-suggest flag 2020-10-30 10:04:51 +08:00
Pig Fang
4731fc0940
fix prefetch 2020-10-26 16:12:09 +08:00
Pig Fang
3669f18e6f
update sponsors 2020-10-26 11:37:32 +08:00
Pig Fang
cf4ebfeaff
upgrade React to 17 2020-10-26 11:22:44 +08:00
Restent Ou
e9dc9ab32f
fix broken link in readme (#241) 2020-10-25 20:05:56 +08:00
Pig Fang
43d410081e
run fmt 2020-10-25 17:46:40 +08:00
Pig Fang
ddb939e562
upgrade front-end tests related deps 2020-10-25 17:35:27 +08:00
Pig Fang
d3ebd0432e
enable React strict mode 2020-10-25 10:55:58 +08:00
Pig Fang
9bfc0e6076
don't allow to render avatar for non-skin texture 2020-10-18 12:12:28 +08:00
Pig Fang
311b0690fc
upgrade Laravel to 8 2020-10-14 11:56:34 +08:00
Pig Fang
a5921770f0
use PHP 7.4 syntaxes 2020-10-14 09:48:45 +08:00
Pig Fang
0959ec02d1
tweak CI 2020-10-13 11:10:49 +08:00
Pig Fang
2c226fb1fd
upgrade PHPUnit 2020-10-13 11:06:35 +08:00
Pig Fang
986a64fe71
require PHP 7.4 2020-10-13 10:10:03 +08:00
Pig Fang
59f7bc106d
update backers 2020-10-13 09:52:34 +08:00
Pig Fang
4054301101
tweak CI 2020-10-13 09:48:05 +08:00
Pig Fang
6bc5d4468d
fix release step on CI 2020-10-13 09:46:24 +08:00
Pig Fang
3146144733
Bump version to 5.2.0 2020-10-13 09:20:01 +08:00
mochaaP
fad9e87990
chore(docs): Discord badge & markdownlint (#235) 2020-10-03 00:24:53 +08:00
Pig Fang
27499848f1
improve forms UX by adding proper HTML attributes (#234) 2020-10-01 20:37:27 +08:00
Pig Fang
3815b9d4c6
disallow admin to delete self (fix #229) (#233) 2020-10-01 16:33:42 +08:00
Pig Fang
aa78ca9535
New Crowdin updates (#232) 2020-10-01 10:57:10 +08:00
Pig Fang
2751e824b9
New Crowdin updates (#231) 2020-09-18 19:37:48 +08:00
Pig Fang
d6ac5eb5d1
support .well-known/change-password 2020-09-07 19:19:16 +08:00
Pig Fang
f9d3a500db
New Crowdin updates (#228) 2020-09-03 09:27:53 +08:00
Pig Fang
1d82dcb5df
require submitting email when verifying email 2020-08-31 19:48:31 +08:00
Pig Fang
171ea171d5
New Crowdin updates (#227) 2020-08-30 23:02:30 +08:00
Pig Fang
93a3d64eff
add missing i18n text 2020-08-30 22:44:57 +08:00
Pig Fang
f6971892a3
relax "disabled functions" check 2020-08-29 10:09:53 +08:00
Pig Fang
81a343dd56
fix CI config 2020-08-24 10:05:44 +08:00
Pig Fang
22193a4991
Bump version to 5.1.1 2020-08-24 09:59:53 +08:00
Pig Fang
f665c7fe31
fix texture is missing from uploader's closet
when set to private
2020-08-24 09:50:58 +08:00
Pig Fang
9916ad1344
fix incorrect behavior of option_localized function 2020-08-22 18:23:01 +08:00
Pig Fang
5f4ad85f0f
fix front end i18n can't be updated
fix bs-community/blessing-skin-plugins#74
2020-08-22 18:10:37 +08:00
Pig Fang
10d5b95358
use GitHub Actions to release 2020-08-22 17:15:14 +08:00
Pig Fang
5d2384498c
tweak CI config 2020-08-22 15:59:05 +08:00
Pig Fang
acddaf92ba
fix re-enable an enabled plugin 2020-08-22 15:10:33 +08:00
Pig Fang
02ca2108a3
New Crowdin updates (#221) 2020-08-22 11:30:37 +08:00
Pig Fang
a783470343
remove changelog files 2020-08-22 11:05:25 +08:00
Pig Fang
02b66161e0
fix release script 2020-08-22 10:39:06 +08:00
Pig Fang
999674457c
mark plugin_assets function as deprecated 2020-08-22 09:53:37 +08:00
Pig Fang
d13e1ba2af
use relative URL for route function (fix #222) 2020-08-21 23:10:14 +08:00
Pig Fang
479e1cbda3
fix tsc errors 2020-08-21 18:53:33 +08:00
Pig Fang
b9de4223f8
upgrade TypeScript to 4.0 2020-08-21 10:11:29 +08:00
Pig Fang
5449ac6395
Bump version to 5.1.0 2020-08-20 11:52:56 +08:00
Pig Fang
03c705ec35
change plugins marketplace source 2020-08-20 11:52:28 +08:00
Pig Fang
9998786b9b
remove parsedown 2020-08-20 10:42:04 +08:00
Pig Fang
8f731e9031
parsedown -> commonmark 2020-08-20 10:28:27 +08:00
Pig Fang
d75a7d3ead
fix that private texture can be used as avatar 2020-08-20 10:14:38 +08:00
Pig Fang
3c6325ca46
fix report page 2020-08-20 09:51:46 +08:00
Pig Fang
963334e5ee
refactor access control 2020-08-20 08:53:43 +08:00
Pig Fang
5b738ffe6f
refactor SkinlibController 2020-08-20 08:48:53 +08:00
Pig Fang
d10bcae197
provide better message when texture is missing 2020-08-19 18:34:17 +08:00
Pig Fang
fe1a03fd8f
tiny tweak 2020-08-19 18:02:25 +08:00
Pig Fang
0f791f42cc
tweak UI text 2020-08-19 17:58:31 +08:00
Pig Fang
bf860d6a68
fix that texture isn't checked if it's existed in closet
when being applied to player
2020-08-19 12:13:19 +08:00
Pig Fang
3f717e1d1e
New Crowdin updates (#216) 2020-08-19 11:27:58 +08:00
Pig Fang
f4201f091d
clean up i18n 2020-08-19 10:37:46 +08:00
Pig Fang
423b46d006
update issue template 2020-08-18 09:39:31 +08:00
Pig Fang
995d191afb
tweak CI 2020-08-17 15:08:18 +08:00
Pig Fang
7f8f773ceb
update sponsors 2020-08-17 15:05:18 +08:00
Pig Fang
e9dbb5f713
fix status code for private texture 2020-08-14 10:32:08 +08:00
Pig Fang
765b63d5cb
clean up i18n 2020-08-09 16:54:35 +08:00
Pig Fang
7997393fb3
clean up i18n 2020-08-08 22:44:29 +08:00
Pig Fang
9b416897dc
clean up i18n 2020-08-08 22:21:49 +08:00
Pig Fang
ade67fa6f8
clean up i18n 2020-08-08 21:53:21 +08:00
Pig Fang
76a78e187f
fix message for private textures
doesn't match with HTTP status code
2020-08-08 09:31:31 +08:00
Pig Fang
7e4d58d9f0
update sponsor 2020-08-07 09:02:02 +08:00
Pig Fang
6b50357347
update sponsors and backers 2020-08-01 09:47:23 +08:00
Pig Fang
3a874a1aba
upgrade dependencies 2020-07-29 19:16:01 +08:00
Pig Fang
2066987bde
refactor tests 2020-07-29 18:50:45 +08:00
Pig Fang
353db6f250
fix previews and avatars cannot be indivdually cached
by image format

fix #212
2020-07-29 18:38:21 +08:00
Pig Fang
f607ba8a41
add API of fetching avatar and preview by texture hash 2020-07-29 10:57:53 +08:00
Pig Fang
e50aed9017
New Crowdin updates (#209) 2020-07-29 10:33:45 +08:00
lookas
36ad2cf781
Fix a bug of redirecting https to http (#208) 2020-07-23 10:57:41 +08:00
Pig Fang
db57a56e25
display errors when checking environment 2020-07-20 23:13:38 +08:00
Pig Fang
b5a1f2ffc2
fix duplication of private textures (fix #194) 2020-07-20 23:08:28 +08:00
Pig Fang
8f2e48df52
tweak linting 2020-07-20 22:19:24 +08:00
mochaaP
20b172c842
fix: homepage nav links not vertically centered (#201) 2020-07-20 07:16:14 +08:00
mochaaP
701541a4ad
feat(docs): links for README badges (#202) 2020-07-20 07:15:13 +08:00
Pig Fang
8baca0306a
update changelogs 2020-07-19 15:28:35 +08:00
Pig Fang
5517e70cda
fix route names duplication (fix #199) 2020-07-19 15:22:03 +08:00
Pig Fang
f33ee62c92
New Crowdin updates (#195) 2020-07-19 07:31:31 +08:00
mochaaP
b4527664d6
feat: click to select hash (#198)
* feat: click to select hash

* chore: lint
2020-07-19 07:30:46 +08:00
Pig Fang
58da4edf2f Bump version to 5.0.0 2020-07-18 11:31:41 +08:00
Pig Fang
d4546e24f3
remove pre-release argument 2020-07-17 21:47:01 +08:00
Pig Fang
a4849c702a
add missing url 2020-07-16 18:51:28 +08:00
Pig Fang
2d92d6f35c
update url 2020-07-16 18:35:03 +08:00
Pig Fang
11305acc6a
re-enable eslint 2020-07-13 11:25:40 +08:00
Pig Fang
dce22c49ad
tweak tsconfig 2020-07-13 10:40:31 +08:00
Pig Fang
5f6f84bb4c
fix environment check 2020-07-13 10:26:06 +08:00
Pig Fang
aea797869b
fix env file 2020-07-12 23:31:40 +08:00
Pig Fang
cc4549d059
fix reading notification 2020-07-12 11:02:29 +08:00
Pig Fang
2d1bac84e0
tweak avatar style 2020-07-09 22:15:09 +08:00
Pig Fang
58a4d6bea0
update readme 2020-07-08 15:19:35 +08:00
Pig Fang
6a161d6ee1
update readme 2020-07-08 14:39:45 +08:00
Pig Fang
92bd000181
tweak CSS 2020-07-07 09:55:39 +08:00
Pig Fang
60f711143d
add more checks before setup 2020-07-06 09:27:11 +08:00
Pig Fang
05b0437e4c
check "zip" extension 2020-07-05 11:43:49 +08:00
Pig Fang
30c4779f3b
Bump version to 5.0.0-rc.5 2020-07-05 10:24:48 +08:00
Pig Fang
743f9119a6
upgrade dependencies 2020-07-05 09:46:57 +08:00
Pig Fang
c145803840
tiny tweak 2020-07-04 18:32:16 +08:00
Pig Fang
2bfa018e96
fix viewer background 2020-07-04 18:10:13 +08:00
Pig Fang
62ac0f5f9c
fix css of skin library item 2020-07-04 17:54:05 +08:00
Pig Fang
e786fff10d
set perPage according to screen width 2020-07-04 17:45:55 +08:00
Pig Fang
9856157cec
tweak UI state 2020-07-04 17:12:26 +08:00
Pig Fang
5a5c255f77
tweak pagination 2020-07-04 16:41:30 +08:00
Pig Fang
c798b4cb25
don't escape inline css 2020-07-04 16:34:49 +08:00
Pig Fang
08e9f8be98
add skeleton for texture detail page 2020-07-04 16:25:48 +08:00
Pig Fang
b44d0724ef
fix fetching Telegram bot 2020-07-04 15:21:43 +08:00
Pig Fang
96a3f5d987
add token to fetch bot binary 2020-07-04 15:20:39 +08:00
Pig Fang
a6c10ced20
no need to copy lang files 2020-07-04 15:13:23 +08:00
Pig Fang
9feb567d41
tweak side menu 2020-07-04 15:02:38 +08:00
Pig Fang
bf01939452
fix for too long nickname at skin library 2020-07-04 11:52:44 +08:00
Pig Fang
44a31de2cd
add skeleton for players management 2020-07-04 11:23:24 +08:00
Pig Fang
49ff44ee6f
add skeleton for users management 2020-07-04 10:54:10 +08:00
Pig Fang
6b695a745b
add skeleton for closet 2020-07-04 09:36:46 +08:00
Pig Fang
feda32b726
allow to customize perPage at closet 2020-07-04 09:30:57 +08:00
Pig Fang
a28abb70ac
add skeleton 2020-07-03 19:10:45 +08:00
Pig Fang
0bf1458b0a
refactor webpack config with TS 2020-07-03 16:30:46 +08:00
Pig Fang
14e969ebbb
upgrade dependencies 2020-07-03 15:56:58 +08:00
Pig Fang
e9f8be1653
implement RFC 0001 2020-07-02 12:20:05 +08:00
Pig Fang
cf40ca01ea
move jQuery to devDependencies 2020-07-02 11:26:40 +08:00
Pig Fang
cd01b26168
tweak TS config 2020-07-02 11:19:53 +08:00
Pig Fang
26c04824d7
extend valid time of cookie locale 2020-07-02 09:22:30 +08:00
Pig Fang
56c1c481f5
tweak chart 2020-07-01 16:27:34 +08:00
Pig Fang
6b7e7a8370
fix displaying number of label in admin chart 2020-07-01 16:08:00 +08:00
Pig Fang
a26ddfbf19
allow to customize fallback locale 2020-07-01 15:33:50 +08:00
Pig Fang
a12b8aeefa
fix typo 2020-06-30 17:49:04 +08:00
Pig Fang
d38e159205
allow to register custom Web CLI programs 2020-06-30 17:48:03 +08:00
Pig Fang
42c10d7856
fix message text for enabling/disabling plugin
at artisan CLI
2020-06-30 11:03:54 +08:00
Pig Fang
2d68b3c818
update environment checker 2020-06-30 10:18:48 +08:00
Pig Fang
c8af8ccd3e
update route of notifications 2020-06-30 09:28:22 +08:00
Pig Fang
db74a9c051
remove unnecessary code 2020-06-30 09:27:40 +08:00
Pig Fang
e018ced5d8
fix TypeScript errors 2020-06-28 22:49:24 +08:00
Pig Fang
d4e482abb7
tweak URL of user avatar 2020-06-28 22:43:41 +08:00
Pig Fang
b8dab4b57a
fix blessing global 2020-06-28 22:23:10 +08:00
Pig Fang
d242c124e9
fix TypeScript errors 2020-06-28 16:33:35 +08:00
Pig Fang
62a5e856e3
increase service worker file version 2020-06-28 16:18:53 +08:00
Pig Fang
9c5945235c
update type definition 2020-06-28 16:14:56 +08:00
Pig Fang
54fda11cb4
fix tests 2020-06-28 16:05:29 +08:00
Pig Fang
78491fcca6
fix CI 2020-06-28 15:59:42 +08:00
Pig Fang
017db1788b
add migration 2020-06-28 15:57:46 +08:00
Pig Fang
d87791ab3d
fix loading assets from CDN 2020-06-28 15:54:41 +08:00
Pig Fang
9b6bf7ba7a
clean up 2020-06-28 15:43:44 +08:00
Pig Fang
aa4c34dd01
fix cross origin issue for assets 2020-06-28 15:35:48 +08:00
Pig Fang
49b7483cdb
update config 2020-06-28 11:35:52 +08:00
Pig Fang
a3ea8e3c62 fix test 2020-06-26 09:21:09 +08:00
Pig Fang
ea26abcc3b add missing migration from laravel/passport 2020-06-26 09:06:45 +08:00
Pig Fang
4e3ce6782f mark addUserBadge deprecated 2020-06-26 08:59:51 +08:00
Pig Fang
db2e04ab64 update readme 2020-06-25 16:17:02 +08:00
Pig Fang
835ce71a16 update readme 2020-06-25 16:13:52 +08:00
Pig Fang
ae687b8cf5 Bump version to 5.0.0-rc.4 2020-06-24 16:31:23 +08:00
Pig Fang
a955fdfefa add t to global blessing variable 2020-06-24 16:12:29 +08:00
Pig Fang
87bc54e6f8 clean up 2020-06-24 16:12:11 +08:00
Pig Fang
38943ababf rename 2020-06-24 16:12:01 +08:00
Pig Fang
694f882931 upgrade dependencies 2020-06-24 16:00:05 +08:00
Pig Fang
78c1373960 clean up comments 2020-06-24 15:25:36 +08:00
Pig Fang
98714a8851 apply php-cs-fixer 2020-06-24 10:52:02 +08:00
Pig Fang
ffef98ad2e refactor update 2020-06-24 10:49:53 +08:00
Pig Fang
ce43f9a586 fix loading i18n of plugins 2020-06-23 18:17:16 +08:00
Pig Fang
49b18783ba fix toast tests 2020-06-23 17:52:50 +08:00
Pig Fang
7a78c612bf fix toast 2020-06-23 15:37:18 +08:00
Pig Fang
56ec01f32a disable cache at development 2020-06-23 10:24:28 +08:00
Pig Fang
ffc5ae4619 make suggestions customizable 2020-06-22 16:31:43 +08:00
Pig Fang
d4aa16773d improve email input control 2020-06-22 16:16:09 +08:00
Pig Fang
94a28806e1 refactor 2020-06-22 10:17:08 +08:00
Pig Fang
5a42f3c44d fix name of email "from" not recognized
(close #187)
2020-06-21 18:57:48 +08:00
Pig Fang
a7b9d19b9b update sponsors 2020-06-20 10:41:13 +08:00
Pig Fang
dba8e5a035 Bump version to 5.0.0-rc.3 2020-06-20 09:42:17 +08:00
Pig Fang
06b937f8ce fix 503 page 2020-06-20 09:42:02 +08:00
Pig Fang
07ba462073
New Crowdin updates (#186) 2020-06-20 09:32:04 +08:00
Pig Fang
ef7dfd2a71 extract "disable-registration" as plugin 2020-06-19 19:05:51 +08:00
Pig Fang
4d22e0d2ee fix tsc errors 2020-06-18 11:52:17 +08:00
Pig Fang
153d852f76 fix delete method doesn't work on AliCDN
fix #184
2020-06-18 11:45:10 +08:00
Pig Fang
46f4a1b3c5
New Crowdin translations (#181) 2020-06-18 09:47:09 +08:00
Pig Fang
f4161d8fc5 add missing route
close bs-community/blessing-skin-plugins#59
2020-06-16 10:03:28 +08:00
Pig Fang
6568ed311d tweak routes of i18n management 2020-06-16 09:50:30 +08:00
Pig Fang
86c39e6b12 remove inline scripts as possible 2020-06-11 19:27:15 +08:00
Pig Fang
9f6cec56a8 fix previewing textures at players page 2020-06-11 17:53:21 +08:00
Pig Fang
d018f207f3 remove unnecessary SQL queries 2020-06-11 15:34:18 +08:00
Pig Fang
6c4eb5441e Bump version to 5.0.0-rc.2 2020-06-11 10:23:04 +08:00
Pig Fang
40300ca17f fix uploading texture (fix #180) 2020-06-11 10:22:52 +08:00
Pig Fang
2df480fe94 update sponsors 2020-06-10 22:25:49 +08:00
Pig Fang
1a914b0db6 fix installing plugin 2020-06-09 10:23:26 +08:00
Pig Fang
44a86e70c5 reimplement hooks 2020-06-08 10:40:23 +08:00
Pig Fang
f22867c7cf remove unnecessary hook 2020-06-08 09:56:21 +08:00
Pig Fang
2fb67537df optimize querying reports 2020-06-08 09:51:35 +08:00
Pig Fang
322b1a4c5e Bump version to 5.0.0-rc.1 2020-06-08 08:30:40 +08:00
Pig Fang
7bcee679c7 fix tsc error 2020-06-07 23:41:15 +08:00
Pig Fang
aeb8a0800c extract oauth client as plugin 2020-06-07 23:38:08 +08:00
Pig Fang
1e85794256 add UI rows for auth pages 2020-06-07 18:54:52 +08:00
Pig Fang
95fed10535 fix mounted event 2020-06-07 18:09:21 +08:00
Pig Fang
b0ea5cdd63 tweak plugins management page 2020-06-07 17:38:18 +08:00
Pig Fang
30e25cf0a8 fix player isn't updated
after closet item was removed
2020-06-07 11:10:04 +08:00
Pig Fang
88e3ed7a07 add more events for ClosetManagementController 2020-06-07 10:54:26 +08:00
Pig Fang
de95ea8111 tiny tweaks 2020-06-07 10:28:54 +08:00
Pig Fang
0053df977a update tests 2020-06-07 10:25:09 +08:00
Pig Fang
73c529c152 add more events and filters for SkinlibController 2020-06-07 10:11:35 +08:00
Pig Fang
b9a40af92d add more fillable fields on models 2020-06-06 15:48:43 +08:00
Pig Fang
ab264604e0 tiny tweak 2020-06-06 11:22:16 +08:00
Pig Fang
c7b8cdab40 correct the implementation of useMount 2020-06-06 10:12:16 +08:00
Pig Fang
a1ce50609f update changelog 2020-06-06 09:53:19 +08:00
Pig Fang
78f6c6c286 clean up 2020-06-05 23:42:12 +08:00
Pig Fang
946896117a refactor SkinlibController 2020-06-05 23:35:49 +08:00
Pig Fang
160dbff834 fix blade template 2020-06-05 23:25:59 +08:00
Pig Fang
3b7d3c2c34 add cs check on CI 2020-06-04 21:50:46 +08:00
Pig Fang
f1294c8f57 fix build script 2020-06-04 21:32:33 +08:00
Pig Fang
9141af2a70 refactor fetching texture info 2020-06-04 18:12:58 +08:00
Pig Fang
0ce4610c0c tiny tweaks 2020-06-04 16:42:10 +08:00
Pig Fang
b8d85ad2b3 refactor texture uploading 2020-06-04 16:36:10 +08:00
Pig Fang
d991db1640
New Crowdin translations (#179) 2020-06-04 16:26:07 +08:00
Pig Fang
d09fcc0f96 update i18n of validation message 2020-06-04 15:59:41 +08:00
Pig Fang
8dde6e0e2f update i18n of validation message 2020-06-04 15:47:46 +08:00
Pig Fang
fa30825656 tweak about locale 2020-06-04 14:53:13 +08:00
Pig Fang
3841459bcf remove EncryptUserPassword event 2020-06-03 17:08:22 +08:00
Pig Fang
70bf5f10bc
New Crowdin translations (#178) 2020-06-03 14:57:06 +08:00
Pig Fang
7ae9a05f0c extract "single-player" function as plugin 2020-06-03 14:47:44 +08:00
Pig Fang
f4c2da3b31 fix routes 2020-06-03 10:21:16 +08:00
Pig Fang
e54fecd6e5 simplify player owner checking 2020-06-03 09:24:31 +08:00
Pig Fang
f78d37cd6e refactor filter usage 2020-06-03 09:14:47 +08:00
Pig Fang
a451c498d6 refactor routes 2020-06-03 09:02:25 +08:00
Pig Fang
e4d8289eba refactor validation 2020-06-02 18:34:10 +08:00
Pig Fang
b8ab1f41e5 add more events and filters for PlayerController 2020-06-02 18:24:00 +08:00
Pig Fang
1f291bd671 apply php-cs-fixer 2020-06-02 18:23:36 +08:00
Pig Fang
069ec27e6f add type annotation 2020-06-02 15:46:04 +08:00
Pig Fang
d40bc66438 add more events and filters for AuthController 2020-06-02 10:49:06 +08:00
Pig Fang
a3aa914520
New Crowdin translations (#177) 2020-06-02 10:07:36 +08:00
Pig Fang
a454f526ba add more events and filters for UserController 2020-06-01 17:29:24 +08:00
Pig Fang
cf95b3a345 simplify sign calculation 2020-06-01 16:59:42 +08:00
Pig Fang
ecc3d02167 tweak service worker 2020-06-01 16:20:28 +08:00
Pig Fang
1f842a09dd update sponsors and backers 2020-06-01 09:26:49 +08:00
Pig Fang
d7f92bf3b2 tweak user API 2020-06-01 09:07:26 +08:00
Pig Fang
f6650c1636 fix dependency issue 2020-05-31 19:17:15 +08:00
Pig Fang
c121747cc0 upgrade PHP dependencies 2020-05-31 18:22:08 +08:00
Pig Fang
b8a4dd8e34 fix foot composer 2020-05-31 16:43:52 +08:00
Pig Fang
eabcc540e2 update .vscode 2020-05-31 16:40:15 +08:00
Pig Fang
0acfa1174b refactor 2020-05-31 16:37:09 +08:00
Pig Fang
ba251beeca add filters for head and foot composers 2020-05-31 16:30:56 +08:00
Pig Fang
d86bdd22d9 add filter for user panel 2020-05-31 16:20:34 +08:00
Pig Fang
30e4c7d28a add filter for side menu 2020-05-30 16:39:01 +08:00
Pig Fang
dde61d31f4 convert viewer background images format to WebP 2020-05-30 11:35:24 +08:00
Pig Fang
4d25b2042d convert background image format to WebP 2020-05-30 11:18:13 +08:00
Pig Fang
248362487f update coverage ignore 2020-05-30 11:16:49 +08:00
Pig Fang
1cf4101cde commit generated code to vcs 2020-05-30 11:10:38 +08:00
Pig Fang
c662121ad9 fix output 2020-05-30 10:58:53 +08:00
Pig Fang
2656b92fce tweak build 2020-05-30 10:55:30 +08:00
Pig Fang
5094cff07a generate URLs by codegen 2020-05-30 10:44:36 +08:00
Pig Fang
46223eba4f fix score calculation at upload page (fix #174) 2020-05-29 10:34:48 +08:00
Pig Fang
6f55045f9e refactor routes 2020-05-29 09:09:10 +08:00
Pig Fang
f36852a24b add events and filters for closet 2020-05-28 18:44:42 +08:00
Pig Fang
8b2f2db6eb refactor controllers 2020-05-27 17:28:24 +08:00
Pig Fang
d2d549b657 send verification email after registering 2020-05-27 16:37:55 +08:00
Asnxthaony
975464efb6
remove defer attr 2020-05-25 19:21:36 +08:00
Pig Fang
9bcace175d Bump version to 5.0.0-beta.9 2020-05-22 09:30:05 +08:00
Pig Fang
cb2e7bb866 fix test 2020-05-21 22:42:24 +08:00
Pig Fang
d6953ac5bb fix test 2020-05-21 22:37:08 +08:00
Pig Fang
cde0c7bbbb tweak tests 2020-05-21 22:30:15 +08:00
Pig Fang
d9dbe8ee65 fix test 2020-05-21 19:22:02 +08:00
Pig Fang
2c0bd3be74 fix test 2020-05-21 19:16:38 +08:00
Pig Fang
3bcdcd0533 fix tests 2020-05-21 19:14:00 +08:00
Pig Fang
de44c0b785 add fallback for creating avatar and preview 2020-05-21 18:33:01 +08:00
Pig Fang
9211e6fb33 fix tests 2020-05-21 15:04:47 +08:00
Pig Fang
3e919367dd fix tests 2020-05-21 14:42:17 +08:00
Pig Fang
12dab489d6 change format of avatar and 2D preview to WebP 2020-05-21 11:49:16 +08:00
Pig Fang
361868038f add missing css 2020-05-21 11:36:41 +08:00
Pig Fang
24d3a2e50a revert 2020-05-21 11:35:27 +08:00
Pig Fang
cccaef302a template tweak 2020-05-21 11:22:56 +08:00
Pig Fang
d1afc6645c optimize loading css 2020-05-21 10:52:14 +08:00
Pig Fang
93880b5ac1 tweak service worker 2020-05-20 12:12:48 +08:00
Pig Fang
ed73106116 add prefetch at home page 2020-05-20 12:07:37 +08:00
Pig Fang
3e2ff83cc8
New Crowdin translations (#173) 2020-05-20 10:17:01 +08:00
Pig Fang
8f6c2fc8b8 run prettier 2020-05-20 10:11:38 +08:00
Pig Fang
6de0f8ef60 add tid at reports management page 2020-05-20 10:09:31 +08:00
Pig Fang
6b536a04ac update icon 2020-05-20 10:06:51 +08:00
Pig Fang
3ba1726774 reduce resource size of home page 2020-05-20 10:03:47 +08:00
Pig Fang
71ba65bd85 tweak heading level of score dialog 2020-05-20 09:31:56 +08:00
Pig Fang
31a3fa6564 add missing user.banned event 2020-05-19 19:02:09 +08:00
Pig Fang
abf19161f9 fix 2020-05-19 18:47:14 +08:00
Pig Fang
3395bda800 fix webpack config 2020-05-19 18:25:57 +08:00
Pig Fang
8b0891d1da split React package 2020-05-19 17:10:55 +08:00
Pig Fang
68d57da1d9 use service worker to cache resources 2020-05-19 17:02:54 +08:00
Pig Fang
6d84747458 fix css class name 2020-05-19 15:04:18 +08:00
Pig Fang
e0c7dc346e update JS dependencies 2020-05-19 09:33:41 +08:00
Pig Fang
1a894513c5 update PHP dependencies 2020-05-18 19:16:40 +08:00
Pig Fang
1042de2f8f tweak 2020-05-18 16:46:19 +08:00
Pig Fang
907d370b19 tweak resources loading 2020-05-18 16:40:31 +08:00
Asnxthaony
50502baea7
fix i18n 2020-05-18 12:25:22 +08:00
Pig Fang
8a59985180 fix tsc errors 2020-05-16 22:11:15 +08:00
Pig Fang
c48583dd6d run prettier 2020-05-16 22:05:16 +08:00
Pig Fang
ec24dff36a refactor styling system 2020-05-16 21:56:08 +08:00
Pig Fang
16b4ee7b6d refactor: trans -> t 2020-05-15 11:39:31 +08:00
Pig Fang
dfeff83b5e clean up 2020-05-15 11:31:30 +08:00
Pig Fang
291efe730f rewrite reports management page with React 2020-05-15 11:05:04 +08:00
Pig Fang
c0d9d18efc fix modal "applying texture to player" 2020-05-14 23:16:39 +08:00
Pig Fang
bfe205ddb3 tweak css 2020-05-14 09:41:40 +08:00
Pig Fang
94642a7cd7 tweak 2020-05-14 09:30:20 +08:00
Pig Fang
42508a9990 fix readme link 2020-05-14 09:21:18 +08:00
Pig Fang
b9c986db59 remove unused code 2020-05-13 18:49:47 +08:00
Pig Fang
3556f29a24 refactor with const enum 2020-05-13 18:40:09 +08:00
Pig Fang
3e1a10a461 rewrite users management page with React 2020-05-13 18:12:01 +08:00
Pig Fang
f795194dc3 refactor tests 2020-05-13 10:54:35 +08:00
Pig Fang
b8c60aa948 simplify 2020-05-13 10:42:35 +08:00
Pig Fang
2f3dbe7f89 test: add assertion 2020-05-13 09:28:23 +08:00
Pig Fang
496b732cb9 upgrade TypeScript 2020-05-13 09:23:17 +08:00
Pig Fang
fff60b37ac require super admin to download or upload plugin 2020-05-12 18:50:58 +08:00
Pig Fang
370311db54 simplify 2020-05-11 11:17:00 +08:00
Pig Fang
6ecb068376
New Crowdin translations (#169) 2020-05-11 09:20:13 +08:00
Pig Fang
15af883976 tiny tweaks 2020-05-10 23:34:04 +08:00
Pig Fang
504d985c8d tweak players API (breaking change) 2020-05-09 10:11:07 +08:00
Pig Fang
88d9901e77 clean up 2020-05-08 23:29:14 +08:00
Pig Fang
5e051eadfe refactor 2020-05-08 23:16:13 +08:00
Pig Fang
63556cabae tiny tweak 2020-05-08 16:21:40 +08:00
Pig Fang
b4b75151fd fix globals for Wappalyzer detection 2020-05-06 11:45:01 +08:00
Pig Fang
ca8d743870 move Dockerfile out 2020-05-04 11:34:17 +08:00
Pig Fang
0e755dbc53 add Docker (Apache) 2020-05-03 15:41:06 +08:00
Pig Fang
437ac5b120 rewrite plugins market with React 2020-05-01 23:44:30 +08:00
Pig Fang
b183dae6bd add API for closet management 2020-05-01 22:52:43 +08:00
Pig Fang
0dbdcc255e tweak UI text 2020-05-01 12:14:02 +08:00
Pig Fang
e6f919940f refactor with immer 2020-05-01 09:00:57 +08:00
Pig Fang
3ad2f93c82 fix wrong texture type after resetting viewer 2020-05-01 08:38:39 +08:00
Pig Fang
1b7f14e0e0 add missing title 2020-05-01 08:36:11 +08:00
Pig Fang
7c6bfd6271 add API for players management 2020-05-01 08:34:47 +08:00
Pig Fang
d7849346cc refactor 2020-05-01 08:30:18 +08:00
Pig Fang
aff278622c add table view mode for players management 2020-05-01 08:25:02 +08:00
Pig Fang
3df0f1c65a update changelog 2020-04-30 23:00:06 +08:00
Pig Fang
6e82468692 refactor hooks 2020-04-30 22:57:57 +08:00
Pig Fang
80d67c4518 update sponsors 2020-04-30 18:49:47 +08:00
Pig Fang
af351d211b rewrite players management page with React 2020-04-30 18:47:37 +08:00
Pig Fang
c6ef42d477
New Crowdin translations (#168) 2020-04-30 11:26:29 +08:00
Pig Fang
55990f24be fix searching textures in skin library 2020-04-27 18:46:22 +08:00
Pig Fang
5ea1187f2a fix adding texture from skinlib to closet 2020-04-26 21:57:14 +08:00
Pig Fang
840722c80b fix pagination 2020-04-26 21:31:19 +08:00
Pig Fang
bec071fdb9 remove first page and last page of pagination 2020-04-26 17:52:18 +08:00
Pig Fang
262dca0f8e tweak html tag 2020-04-26 11:12:10 +08:00
Pig Fang
c9a8fddd57 meta: update name 2020-04-26 11:01:07 +08:00
Pig Fang
79b770a8f0 update sponsors 2020-04-24 17:32:08 +08:00
Pig Fang
70e9570057 upgrade dependencies 2020-04-23 15:40:17 +08:00
Pig Fang
f4eae872d1 remove fallback locale property 2020-04-23 11:47:26 +08:00
Pig Fang
57632d52bc fix plugins management page 2020-04-23 11:34:42 +08:00
Pig Fang
beb2c96aef fix title of plugin readme 2020-04-23 11:09:45 +08:00
Pig Fang
00eaa15cf2 add PHPDoc 2020-04-19 19:36:39 +08:00
Pig Fang
7093eaedd1 Bump version to 5.0.0-beta.8 2020-04-08 08:55:18 +08:00
Pig Fang
75887efda6 run php-cs-fixer 2020-04-07 16:09:38 +08:00
Pig Fang
1669269ca3 allow l10n of plugins market registry 2020-04-07 16:09:30 +08:00
Pig Fang
f0e3b6a866 fix skin library page 2020-04-07 15:52:57 +08:00
Pig Fang
cad6845e68 Merge branch 'dev' of github.com:bs-community/blessing-skin-server into dev 2020-04-07 14:16:56 +08:00
Pig Fang
d116b10b16 fix loading artisan commands 2020-04-07 14:16:48 +08:00
Asnxthaony
800370ca47
converted CRLF line break to LF 2020-04-07 12:54:48 +08:00
Asnxthaony
7479217d03
Bump version to 5.0.0-beta.7 2020-04-07 12:14:56 +08:00
Pig Fang
b53ccd4801 update registry url 2020-04-07 11:56:54 +08:00
Pig Fang
ef4e925058 update issue template 2020-04-07 10:04:38 +08:00
Pig Fang
71a1caf95d expose React to global at development env 2020-04-06 16:55:12 +08:00
Pig Fang
0f45600e21 add filters for login and registration 2020-04-06 11:13:56 +08:00
Pig Fang
04703cc7e5 handle http 400 properly 2020-04-06 10:53:51 +08:00
Pig Fang
2039a0a554 tweak test 2020-04-05 10:22:09 +08:00
Pig Fang
ca37fa8db2
New Crowdin translations (#157) 2020-04-05 10:21:32 +08:00
Pig Fang
988b0ace8c add commands for managing plugin 2020-04-05 10:15:00 +08:00
Pig Fang
afd7ea993b allow to login even update is pending 2020-04-01 16:31:34 +08:00
Pig Fang
67f2d513ea tweak tests 2020-04-01 15:34:14 +08:00
Pig Fang
7afdc9e9ba add new command for update 2020-04-01 15:34:06 +08:00
Pig Fang
31bd48eec7 add missing page URL query 2020-04-01 14:43:21 +08:00
Pig Fang
a4e51def37 Bump version to 5.0.0-beta.6 2020-04-01 10:32:34 +08:00
Pig Fang
efb2bdccea ignore some tests temporarily 2020-04-01 10:30:07 +08:00
Pig Fang
6423afdc2d fix tests 2020-04-01 10:19:25 +08:00
Pig Fang
31ebd8bd35 fix i18n of missing uploader 2020-04-01 10:07:34 +08:00
Pig Fang
33e249f5d2 fix missing dependency 2020-03-31 16:14:37 +08:00
Pig Fang
850efe9fe2 load core libraries from jsDelivr 2020-03-30 17:21:02 +08:00
Pig Fang
058e0d9f22 clean up 2020-03-30 12:15:17 +08:00
Pig Fang
a886935b12 extract vue from main chunk 2020-03-30 10:29:17 +08:00
Pig Fang
fd2e3f2c1b rewrite "password reset" with React 2020-03-30 10:12:35 +08:00
Pig Fang
b7ac9bbfa1 add signature check for visiting "reset" page 2020-03-30 10:01:37 +08:00
Pig Fang
9e87f42dd9 add pagination for reports 2020-03-30 09:38:05 +08:00
Pig Fang
33dbb9a3da update changelog 2020-03-30 09:29:34 +08:00
Pig Fang
490f8f3bac fix type errors 2020-03-30 09:22:18 +08:00
Pig Fang
361444ca7e rewrite registration page with React 2020-03-29 23:02:43 +08:00
Pig Fang
6c4f5d61f4 tweak 2020-03-29 10:16:06 +08:00
Pig Fang
1c97734bf6 fix email url 2020-03-29 09:53:24 +08:00
Pig Fang
5d9bb28281 attempt to fix "invalid signature" issue 2020-03-28 22:36:27 +08:00
Pig Fang
b93efb91ae simplify 2020-03-28 18:26:07 +08:00
Pig Fang
9f560c67bd rewrite "Translations" page with React 2020-03-28 18:25:12 +08:00
Pig Fang
0efcde3172 tweak modal types 2020-03-28 16:09:12 +08:00
Pig Fang
6dc22f73f7 upgrade deps 2020-03-28 12:18:52 +08:00
Pig Fang
aa835f7d03 rewrite login page with React 2020-03-27 22:56:08 +08:00
Pig Fang
2e78da928b make url generation flexible 2020-03-27 22:34:14 +08:00
Pig Fang
effba662a0 fix pagination click event 2020-03-27 16:38:07 +08:00
Pig Fang
231b9ee5bf tweak 2020-03-27 16:01:29 +08:00
Pig Fang
8f2f57ffc8 fix skin library history state 2020-03-27 12:24:11 +08:00
Pig Fang
6bd7e4744f fix test 2020-03-26 18:35:12 +08:00
Pig Fang
2229fcf66b rewrite "auth.forgot" page with React 2020-03-26 18:15:13 +08:00
Pig Fang
1b8c335cac add captcha component 2020-03-26 17:54:01 +08:00
Pig Fang
375fcb38b4 fix emitting mounted event 2020-03-26 11:49:34 +08:00
Pig Fang
9a29df2a07 load front end i18n as assets 2020-03-26 11:20:12 +08:00
Pig Fang
dbef3043eb do not break when failed to load i18n 2020-03-26 11:19:43 +08:00
Pig Fang
3fbf32ed14 clean up 2020-03-26 10:32:36 +08:00
Pig Fang
458d462831 load viewer backgrounds via webpack 2020-03-26 10:24:44 +08:00
Pig Fang
530ed88bd1 unify generating webpack asset url 2020-03-26 10:15:48 +08:00
Pig Fang
04dfdfb6c2 run php-cs-fixer 2020-03-26 10:15:18 +08:00
Pig Fang
be46c524ef add initial value for blessing.extra 2020-03-26 10:14:28 +08:00
Pig Fang
4417cdc0c4 fix webpack config 2020-03-26 10:13:40 +08:00
Pig Fang
f4276d1ccf "table" tag should not be used for layout 2020-03-24 18:44:45 +08:00
Pig Fang
c219a0f03f rewrite skin library with React 2020-03-24 18:05:46 +08:00
Pig Fang
1d6da0eab9 add command 2020-03-24 10:07:04 +08:00
Pig Fang
4007a46736 add prettier 2020-03-23 17:14:20 +08:00
Pig Fang
79bacf69e0 remove outline for "a" element 2020-03-23 10:38:45 +08:00
Pig Fang
c50f265b8e refactor closet command 2020-03-22 12:21:17 +08:00
Pig Fang
ce297f66f9 tweak 2020-03-21 17:34:42 +08:00
Pig Fang
4c981529e1 add closet command for Web CLI 2020-03-21 17:30:44 +08:00
Pig Fang
d57dabe188 fix 2020-03-21 11:08:41 +08:00
Pig Fang
24adc02f17 refactor 2020-03-21 11:06:24 +08:00
Pig Fang
ced43d4277 simplify 2020-03-21 09:38:46 +08:00
Pig Fang
4c52f82393 refactor pagination 2020-03-20 19:03:10 +08:00
Pig Fang
d603f48bad refactor 2020-03-20 17:14:18 +08:00
Pig Fang
76f0b040ad upgrade deps 2020-03-20 16:19:28 +08:00
Pig Fang
b6c58ef23f rewrite texture detail page with React 2020-03-20 16:19:18 +08:00
Pig Fang
2c313ebde2 update vscode-related 2020-03-19 16:26:04 +08:00
Pig Fang
a2e8632ca4 remove dump-server 2020-03-19 15:26:03 +08:00
Pig Fang
a409404263 add PHP debug 2020-03-19 15:09:36 +08:00
Pig Fang
0671964ead add debugger 2020-03-19 11:19:07 +08:00
Pig Fang
d27034425a fix toast style 2020-03-19 10:00:21 +08:00
Pig Fang
4f76f05003 fix closet previewer don't apply texture type
fix #152
2020-03-19 09:26:29 +08:00
Pig Fang
2a3d9c544d fix formatting unresolved plugins 2020-03-18 11:23:46 +08:00
Pig Fang
52340ff28c Bump version to 5.0.0-beta.5 2020-03-18 11:01:41 +08:00
Pig Fang
ecf2f6792f es2016 -> es2017 2020-03-18 11:01:28 +08:00
Pig Fang
dd44b43b04 tweak webpack 2020-03-18 11:00:32 +08:00
Pig Fang
9ca87451ed
New Crowdin translations (#151) 2020-03-18 11:00:01 +08:00
Pig Fang
9f8f1e786a increase browser requirement 2020-03-18 10:48:13 +08:00
Pig Fang
60c628dd11 tweak style of avatar (close #150) 2020-03-18 10:33:07 +08:00
Pig Fang
ff7f81939d fix #147 2020-03-18 09:51:33 +08:00
Pig Fang
9ff956a9f8 Bump version to 5.0.0-beta.4 2020-03-17 11:42:17 +08:00
Pig Fang
2907ad4bb4 refactor 2020-03-16 14:27:30 +08:00
Pig Fang
a879af3405 reduce build size 2020-03-14 17:00:35 +08:00
Pig Fang
76a504bb9c tweak webpack build 2020-03-14 16:13:56 +08:00
Pig Fang
b1801f0819 remove duplicate 2020-03-14 15:32:55 +08:00
Pig Fang
63cb6ad657 update changelog 2020-03-14 15:00:34 +08:00
Pig Fang
97705755c5 fix admin can't add private texture 2020-03-14 14:59:52 +08:00
Pig Fang
8a07597265 clean up 2020-03-12 11:27:41 +08:00
Pig Fang
f1f6a6fafb
New Crowdin translations (#148) 2020-03-12 11:25:37 +08:00
Pig Fang
24a5962576 fix build script 2020-03-12 11:24:20 +08:00
Pig Fang
b63149d30a fix test 2020-03-12 11:22:40 +08:00
Pig Fang
7d3325966b update ci config 2020-03-12 11:19:17 +08:00
Pig Fang
496f5a5b23 tweak typescript build 2020-03-12 11:06:23 +08:00
Pig Fang
8cfe2e1292 fix types error 2020-03-12 10:56:14 +08:00
Pig Fang
271c950ad9 add two new ways to install plugin 2020-03-12 10:41:41 +08:00
Pig Fang
ba757d98a8 refactor tests 2020-03-11 22:42:22 +08:00
Pig Fang
ccfcceed37 run php-cs-fixer 2020-03-11 22:31:45 +08:00
Pig Fang
4ce25a918c return an object when fetch failed 2020-03-11 22:24:20 +08:00
Pig Fang
59f8f33df7 extract component 2020-03-10 15:57:57 +08:00
Pig Fang
cd2f977bff tweak status page 2020-03-10 15:20:42 +08:00
Pig Fang
dcd48a086c fix notifying failed plugin 2020-03-10 15:12:03 +08:00
Pig Fang
b66a48181f add migration for lengthening ip field 2020-03-10 14:59:50 +08:00
Pig Fang
31c56e9121 remove predis 2020-03-10 10:05:46 +08:00
Pig Fang
5d426e8c92 refactor: use HTTP client wrapper of Laravel 2020-03-09 17:18:36 +08:00
Pig Fang
6463a33744 refactor 2020-03-09 15:26:28 +08:00
Pig Fang
db49cedb06 tweak about testing 2020-03-09 15:08:45 +08:00
Pig Fang
4d3f6a29ca accept upstream config files (close #144) 2020-03-09 15:08:30 +08:00
Pig Fang
0eb7d50d1c upgrade to Laravel 7 2020-03-09 12:29:00 +08:00
Pig Fang
48de60b43a update detect method of texture type 2020-03-07 09:54:06 +08:00
Pig Fang
f6d3b014ad update changelog 2020-03-07 09:05:05 +08:00
Pig Fang
a47973f4f2 add vscode extensions recommendation 2020-03-07 09:04:11 +08:00
Steven Qiu
eb0da1a0d4
update readme and changelog 2020-03-06 15:25:31 +08:00
Pig Fang
537d34c0bf increase PHP version requirement 2020-03-06 10:19:56 +08:00
Pig Fang
ed04dd1740 fix "score cost per closet item" isn't calculated
at "texture upload" page
2020-03-06 10:15:01 +08:00
Pig Fang
998c5f011a update dependencies 2020-03-05 18:24:23 +08:00
Pig Fang
f3e57756a5 fix test 2020-03-05 17:09:30 +08:00
Pig Fang
18a2817472 fix style of background 2020-03-05 16:39:14 +08:00
Pig Fang
27e6042b93 rewrite texture upload page 2020-03-05 16:16:08 +08:00
Pig Fang
d4c3264324 fix 2d preview 2020-03-05 09:58:10 +08:00
Pig Fang
bc0531c737 fix button style of skin viewer 2020-03-05 09:34:45 +08:00
Pig Fang
5052e9ab04 update changelog 2020-03-05 09:33:55 +08:00
Pig Fang
63eb7c3d74
New Crowdin translations (#142)
[skip ci]
2020-03-04 21:10:33 +08:00
Pig Fang
af24dcf9f9 add custom background for skin viewer 2020-03-04 19:37:17 +08:00
Pig Fang
a804bb8d7b update dependencies 2020-03-04 10:53:44 +08:00
Pig Fang
9d624fd299 add filters for retrieving ip 2020-03-02 15:02:39 +08:00
Pig Fang
c4ce144be2 make terminal window be draggable 2020-03-01 22:07:45 +08:00
Pig Fang
60373e6290 update GitHub Actions 2020-02-29 16:44:36 +08:00
Pig Fang
25394ddf50
New Crowdin translations (#139)
[skip ci]
2020-02-27 18:40:32 +08:00
Pig Fang
ed588a9569 disable MySQL strict mode 2020-02-27 18:07:02 +08:00
Pig Fang
5d977882bb update changelog [skip ci] 2020-02-27 17:48:05 +08:00
Steven Qiu
33c6f00da6
send less verification emails (#138) 2020-02-27 17:45:07 +08:00
Pig Fang
4dde7fc13c make "CSRF token mismatched" error friendly 2020-02-27 16:02:39 +08:00
Pig Fang
898e178d45
New Crowdin translations (#135)
[skip ci]
2020-02-27 15:33:45 +08:00
Pig Fang
3cb6f40be5 fix config files 2020-02-27 15:31:29 +08:00
Pig Fang
9ab8a5ca8b fix tests 2020-02-27 10:50:09 +08:00
Pig Fang
afd0858b24 merge upstream configs 2020-02-26 15:09:06 +08:00
Pig Fang
97cd8974f3 fix 2020-02-26 10:40:20 +08:00
Pig Fang
57beeb2c86 update config about mail 2020-02-26 10:36:25 +08:00
Pig Fang
efc71da574 refactor 2020-02-24 09:27:28 +08:00
Pig Fang
054b25da6d update changelog [skip ci] 2020-02-23 09:43:34 +08:00
Pig Fang
bec33650f0 fix missing alert when uploading duplicated texture
(fix #132)
2020-02-23 09:37:10 +08:00
Pig Fang
73d83bd191 update changelog 2020-02-23 09:28:17 +08:00
Pig Fang
56d5e20d3b
New Crowdin translations (#134) 2020-02-23 09:06:29 +08:00
Steven Qiu
1b0e1b154b
change judgement of duplicate textures (fix #132) (#133)
* change judgement of duplicate textures

* fix test
2020-02-23 08:38:36 +08:00
Pig Fang
f721ac269c add bsh 2020-02-17 18:27:56 +08:00
Pig Fang
39e135e644
New Crowdin translations (#131)
* New translations skinlib.yml (Japanese)
[skip ci]

* New translations skinlib.yml (Korean)
[skip ci]

* New translations skinlib.yml (Portuguese)
[skip ci]

* New translations skinlib.yml (Russian)
[skip ci]

* New translations skinlib.yml (Spanish)
[skip ci]

* New translations skinlib.yml (Italian)
[skip ci]

* New translations skinlib.yml (Chinese Simplified)
[skip ci]

* New translations skinlib.yml (Chinese Traditional)
[skip ci]

* New translations skinlib.yml (Dutch)
[skip ci]

* New translations skinlib.yml (French)
[skip ci]

* New translations skinlib.yml (German)
[skip ci]

* New translations skinlib.yml (Greek)
[skip ci]
2020-02-17 12:08:46 +08:00
Pig Fang
7e61f27106 update changelog 2020-02-17 12:06:18 +08:00
Pig Fang
e2c10c78ac fix i18n 2020-02-17 12:01:20 +08:00
Pig Fang
76bf342681 Merge branch 'react' into dev 2020-02-16 10:07:23 +08:00
Pig Fang
5ac9b59116 fix test 2020-02-16 10:03:47 +08:00
Pig Fang
d811f92dda add missing "mounted" event 2020-02-12 10:11:06 +08:00
Pig Fang
ec4e222c0e remove unnecessary "async" 2020-02-12 10:03:52 +08:00
Pig Fang
ca7db2585f rewrite "EmailVerification" UI widget 2020-02-12 10:02:15 +08:00
Pig Fang
19ad09920b build closet page with React 2020-02-11 16:40:26 +08:00
Pig Fang
9dca4c1585 hide pagination when total pages is invalid 2020-02-10 17:52:36 +08:00
Pig Fang
89055fe192 add pagination component 2020-02-10 15:59:56 +08:00
Pig Fang
576a4c442f fix type errors 2020-02-10 11:56:16 +08:00
Pig Fang
3dcd6bfac1 remove unused code 2020-02-10 11:47:27 +08:00
Pig Fang
34f4faaff1 disable lint on CI temporarily 2020-02-10 11:45:25 +08:00
Pig Fang
ec948ef1c2 build "bind players" page with React 2020-02-09 11:05:02 +08:00
Pig Fang
6a7d9d0fde clean up 2020-02-09 10:50:15 +08:00
Pig Fang
8e104c2422 build notifications list with React 2020-02-08 18:22:52 +08:00
Pig Fang
a6dc3bd068 clean up 2020-02-08 17:14:32 +08:00
Pig Fang
22f68cd9fc build players page with React 2020-02-08 17:09:43 +08:00
Pig Fang
d119b054be tweak OAuth mgmt page 2020-02-08 09:51:46 +08:00
Pig Fang
55f9ba1cff refactor 2020-02-07 15:21:43 +08:00
Pig Fang
2d57248654 add alias 2020-02-07 15:20:02 +08:00
Pig Fang
39ed588d83 make it immutable 2020-02-07 15:15:38 +08:00
Pig Fang
36328f1cb8 remove unused attribute 2020-02-07 10:34:01 +08:00
Pig Fang
aa1ce17351 tweak viewer component 2020-02-07 09:59:49 +08:00
Pig Fang
210244f5b4 add path alias 2020-02-07 09:59:10 +08:00
Pig Fang
a5085af86c turn custom fallback as function 2020-02-06 14:54:23 +08:00
Pig Fang
5b7055611d fix skin viewer 2020-02-06 09:56:09 +08:00
Pig Fang
d6834a2ead tweak plugins mgmt page 2020-02-06 09:49:33 +08:00
Pig Fang
6e559ef90e tweak tests 2020-02-06 09:27:27 +08:00
Pig Fang
dc62f87b74 allow to clear toasts 2020-02-06 09:22:10 +08:00
Pig Fang
de08ab6736 allow custom fallback 2020-02-06 09:01:21 +08:00
Pig Fang
82dade1ee1 tweak Modal 2020-02-06 08:53:37 +08:00
Pig Fang
b083ee8788 refactor Modal mechanism 2020-02-05 18:48:30 +08:00
Pig Fang
54c4891fd2 allow to pass element directly 2020-02-05 14:56:49 +08:00
Pig Fang
93f64b034f build OAuth mgmt page with React 2020-02-05 10:37:14 +08:00
Pig Fang
de64694002 clear timeout on unmount 2020-02-05 10:05:32 +08:00
Pig Fang
5917e62286 add role for toast 2020-02-05 09:21:29 +08:00
Pig Fang
09c5aae79a add more tests 2020-02-04 12:28:35 +08:00
Pig Fang
54b948d01e rework toast with React 2020-02-04 12:23:14 +08:00
Pig Fang
d9f55d610c refactor event emitter 2020-02-04 11:29:58 +08:00
Pig Fang
ef2da499e5 tweak Suspense fallback 2020-02-03 10:16:21 +08:00
Pig Fang
6430576761 simplify code 2020-02-02 15:48:14 +08:00
Pig Fang
f0599d5a88 build skin viewer with React 2020-02-02 10:18:05 +08:00
Pig Fang
e01af8e7d9 tweak tsconfig 2020-02-01 12:45:07 +08:00
Pig Fang
100e5960e7 rework error pages and setup pages 2020-02-01 12:44:39 +08:00
Pig Fang
25a31302ae fix test 2020-02-01 10:12:31 +08:00
Pig Fang
2bd1a8c073 fix tests 2020-01-31 15:58:48 +08:00
Pig Fang
1d87171808 rewrite user dashboard with React 2020-01-31 15:58:37 +08:00
Pig Fang
e6cb4072e5 quick fix 2020-01-30 18:50:51 +08:00
Pig Fang
36a516d584 add generics at fetch 2020-01-28 16:27:11 +08:00
Pig Fang
4953e15369 add new Modal option 2020-01-28 10:41:10 +08:00
Pig Fang
364608a0c6 fix webpack config 2020-01-28 10:38:46 +08:00
Pig Fang
6b714ad7b3 remove webpackbar 2020-01-27 15:56:09 +08:00
Pig Fang
d62db082e7 add scss 2020-01-27 15:49:09 +08:00
Pig Fang
60e883c5e7 remove cache-loader for .ts and .tsx 2020-01-27 15:47:24 +08:00
Pig Fang
225985834a fix tsconfig 2020-01-27 11:56:32 +08:00
Pig Fang
999167e11e fix hooks deps 2020-01-27 11:50:29 +08:00
Pig Fang
7c144b3e14 rewrite "Modal" component in React 2020-01-23 22:52:09 +08:00
Pig Fang
11e927cc61 add "jest-dom" 2020-01-23 09:51:50 +08:00
Steven Qiu
ad528520ca Support custom textures storage directory (#127)
* Support custom textures storage directory

* fix test

* update changelog

Co-authored-by: Pig Fang <g-plane@hotmail.com>
2020-01-22 11:06:02 +08:00
Pig Fang
be0f74ad64 remove unused code 2020-01-21 11:08:52 +08:00
Pig Fang
4c066ac38a make user report page be static 2020-01-21 11:07:20 +08:00
Pig Fang
cd3260af3e rewrite plugins mgmt page with react 2020-01-21 10:22:20 +08:00
Pig Fang
640a714d8e Bump version to 5.0.0-beta.3 2020-01-16 16:19:20 +08:00
Pig Fang
dff01981d7 update build step 2020-01-16 16:14:49 +08:00
Pig Fang
8bb6f2e53c tweak loading brand icons 2020-01-16 15:48:28 +08:00
Pig Fang
7ecea9e7e6 new plugins management page 2020-01-16 12:33:14 +08:00
Pig Fang
85f9f8378a use correct html element 2020-01-15 10:11:17 +08:00
Pig Fang
4c735aa8e4 refactor plugins marketplace 2020-01-14 11:37:21 +08:00
Pig Fang
078fcf47ec refactor downloader 2020-01-14 10:58:20 +08:00
Pig Fang
16916fd006 fix tests 2020-01-13 17:31:10 +08:00
Pig Fang
8c06286607 fix TypeScript errors 2020-01-13 17:19:34 +08:00
Pig Fang
cf6f1aa547 support searching players when applying textures 2020-01-13 12:01:13 +08:00
Pig Fang
9e792b9c3a upgrade deps 2020-01-13 10:59:32 +08:00
Pig Fang
52629f6cc4 remove unused code 2020-01-13 09:32:44 +08:00
Pig Fang
c87d19f258 tweak middlewares 2020-01-13 09:25:07 +08:00
Pig Fang
c1923cfaa1
New Crowdin translations (#124)
[skip ci]
2020-01-13 08:58:56 +08:00
Pig Fang
780b6800ba remove unused code 2020-01-13 08:57:51 +08:00
Pig Fang
6c64d191ab remove responding 204 for unexisted players 2020-01-13 08:41:35 +08:00
Pig Fang
092eedfdf4 refactor routes 2020-01-13 08:37:57 +08:00
Pig Fang
1807309449 remove unused code 2020-01-12 17:14:23 +08:00
Pig Fang
4a97edbd53 remove middlewares for profile API 2020-01-12 17:12:00 +08:00
Pig Fang
f46737c8e3 remove "CheckPlayerExists" event in some places 2020-01-12 12:09:58 +08:00
Pig Fang
1170a528d6 removed cache for existence of player 2020-01-12 11:58:34 +08:00
Pig Fang
b816eb1c06 simplify 2020-01-12 11:47:36 +08:00
Pig Fang
97ec85b289 remove cache for profile json 2020-01-12 10:28:43 +08:00
Pig Fang
d85c6d840b update changelog 2020-01-12 10:04:51 +08:00
Pig Fang
6b3446cf86 display 3D avatar when applying texture to player 2020-01-12 09:57:55 +08:00
Pig Fang
b1ccdb47f2 switch server-side texture renderer 2020-01-12 09:27:39 +08:00
Pig Fang
6c221c28d6 refactor updater 2020-01-06 22:47:29 +08:00
Pig Fang
04c3c7908c fix test 2020-01-05 18:21:24 +08:00
Pig Fang
d7a60a842d remove auto update check 2020-01-05 17:37:56 +08:00
Pig Fang
c3a0018219 remove unused code 2020-01-05 11:30:58 +08:00
Pig Fang
1eba808974 tweak test 2020-01-05 11:30:29 +08:00
Pig Fang
3c8f820780 remove unreachable code 2020-01-05 11:24:30 +08:00
Pig Fang
9608555345 hide block when no oauth providers 2020-01-05 11:07:25 +08:00
Pig Fang
516c5ef762 add more events about players 2020-01-05 11:05:22 +08:00
Pig Fang
70d8614d84 support utf8mb4 2020-01-04 10:30:05 +08:00
Asnxthaony
1c5cb7fdba
Change default update source [skip ci] 2020-01-03 19:03:22 +08:00
Pig Fang
18765a7133 Bump version to 5.0.0-beta.2 2020-01-03 10:27:00 +08:00
Asnxthaony
2abadd65b1
Update default plugins registry url 2020-01-02 18:13:39 +08:00
Asnxthaony
bcca87936a
Fix 2d preview in player management 2020-01-01 08:50:31 +08:00
Pig Fang
9988520f45 fixed avatar can't be resized
when requesting an non-existed user
2019-12-31 23:03:37 +08:00
Pig Fang
8703495f8f refactor 2019-12-31 22:39:33 +08:00
Pig Fang
1829f1dab5 App\Services\Rejection -> Blessing\Rejection 2019-12-31 18:41:16 +08:00
Pig Fang
02fecd46ae refactor 2019-12-31 18:34:52 +08:00
Pig Fang
5b2d2743a6 remove unused code 2019-12-31 11:27:51 +08:00
Pig Fang
d4202149e1 update .gitignore 2019-12-31 10:38:58 +08:00
Pig Fang
1f5c0af0aa fix lang attribute of HTML 2019-12-31 10:00:27 +08:00
Pig Fang
e97d2743fb Clean up 2019-12-30 23:51:12 +08:00
Pig Fang
611f6c8cee Remove Universal Skin API from core 2019-12-30 23:29:44 +08:00
Pig Fang
22128d360c Remove deprecated player_name attribute on player instance 2019-12-30 17:04:19 +08:00
Pig Fang
07566c4c16 Remove Legacy API from core 2019-12-30 11:09:01 +08:00
Pig Fang
f9e4436503 Update changelog 2019-12-30 10:12:13 +08:00
Pig Fang
b220b60ece Fix retrieving keyword from query string 2019-12-29 23:57:44 +08:00
Pig Fang
874bc8a73e Fix artisan 2019-12-29 19:00:52 +08:00
Pig Fang
9aac544d0c Refactor bootstrap 2019-12-29 17:39:34 +08:00
Pig Fang
cd2af03663
New Crowdin translations (#123) [skip ci] 2019-12-29 15:57:29 +08:00
Pig Fang
a18f068387 Remove enabling or disabling Redis via Web UI 2019-12-29 15:51:43 +08:00
Pig Fang
4689010466 Remove API preference 2019-12-29 15:43:40 +08:00
Pig Fang
1f899d1393 Refactor 2019-12-29 14:50:25 +08:00
Pig Fang
d40726a718 App\Services\Filter -> Blessing\Filter 2019-12-29 11:49:31 +08:00
Pig Fang
7f46e1510b Remove helper function "get_string_replaced" 2019-12-25 18:37:10 +08:00
Pig Fang
56e63b8c38
New Crowdin translations (#120)
[skip ci]
2019-12-25 17:41:07 +08:00
Pig Fang
71543da2f7 Remove "3rd-party comment" from core 2019-12-25 17:33:57 +08:00
Pig Fang
c868b05232 New password algorithm: Argon2i 2019-12-25 16:28:24 +08:00
Pig Fang
cf8358fdcd Don't check cipher when boostrapping 2019-12-25 16:16:09 +08:00
Pig Fang
10d0957d66 Tweak UI 2019-12-25 16:11:13 +08:00
Pig Fang
ad1201b226 Refactor 2019-12-25 15:59:20 +08:00
Pig Fang
facd92356c Simplify code 2019-12-25 15:50:34 +08:00
Pig Fang
9eae104402 Invoke Parsedown directly 2019-12-25 15:48:34 +08:00
Pig Fang
4efd787460
New Crowdin translations (#119)
[skip ci]
2019-12-25 15:25:17 +08:00
Pig Fang
87256a56e9 Fix tests 2019-12-25 15:08:07 +08:00
Pig Fang
cf497ad38c Change method of retrieving IP 2019-12-24 23:59:25 +08:00
Pig Fang
b0435351fa Use native fs functions for bootstrapping tests 2019-12-24 23:37:57 +08:00
Pig Fang
78ae974e7a Optimize invoking skinview3d 2019-12-24 19:33:35 +08:00
Pig Fang
2b827cf651 Add more events for authentication 2019-12-24 17:09:30 +08:00
Pig Fang
0195b0fbd0 Tweak path of options cache file 2019-12-23 23:28:46 +08:00
Pig Fang
da422ab1e8 Update gitignore policy 2019-12-23 23:14:31 +08:00
Pig Fang
cb9aaf35f1 Tweak test 2019-12-23 10:08:19 +08:00
Pig Fang
7314b19a85 Tiny tweaks 2019-12-23 10:03:08 +08:00
Pig Fang
166bd2e5ef Fix tests 2019-12-22 23:27:59 +08:00
Pig Fang
3ab0d12a71 Update GitHub Actions config 2019-12-22 23:05:49 +08:00
Pig Fang
ae4be6fbda Refactor static routes 2019-12-22 17:28:55 +08:00
Pig Fang
591b9969aa Add filters for avatar 2019-12-22 17:22:05 +08:00
Pig Fang
3e249a9902
New Crowdin translations (#117)
[skip ci]
2019-12-22 16:56:17 +08:00
Pig Fang
95d1ebe3ba Tweak user profile page 2019-12-22 16:38:42 +08:00
Pig Fang
8c8e7bbc23 Refactor 2019-12-22 16:18:59 +08:00
Pig Fang
35c07cdb63 Fix validating player name 2019-12-22 14:25:22 +08:00
Pig Fang
2d73124fed
New Crowdin translations (#116)
[skip ci]
2019-12-22 12:38:36 +08:00
Pig Fang
85d0104362 Allow char "§" for player name & Refactor 2019-12-22 11:50:39 +08:00
Pig Fang
fd61380758
New Crowdin translations (#115)
[skip ci]
2019-12-22 11:17:43 +08:00
Pig Fang
9cc83dad30 Remove restriction of texture name and nickname 2019-12-22 10:46:10 +08:00
Pig Fang
e21fb0fa31 Inline some helper functions 2019-12-21 15:50:29 +08:00
Pig Fang
ab24dfe5bf Add tests for Filters API 2019-12-21 10:41:38 +08:00
Pig Fang
4c3b9f0cb6 Tiny refactor 2019-12-20 22:58:04 +08:00
Pig Fang
fa2048c7bd
New Crowdin translations (#114)
[skip ci]
2019-12-19 11:00:45 +08:00
Pig Fang
1e21f4508c Add grid for upload page 2019-12-16 11:02:39 +08:00
Pig Fang
6bf003e7dc Add grid for texture detail page 2019-12-16 10:49:09 +08:00
Pig Fang
a14688264b Support disable portal 2019-12-16 10:29:10 +08:00
Pig Fang
52cd75ca54 Update changelog 2019-12-16 10:09:00 +08:00
Pig Fang
60ccc1174a
New Crowdin translations (#113)
[skip ci]
2019-12-15 23:47:23 +08:00
Pig Fang
d61eb8a098 Fix tests 2019-12-15 23:44:39 +08:00
Pig Fang
cb3527cd35 Apply php-cs-fixer fixes 2019-12-15 23:16:55 +08:00
Pig Fang
ef1a092ca3 Clean up unused i18n strings 2019-12-15 23:07:23 +08:00
Pig Fang
703a760b24 Add grid for players list 2019-12-15 22:52:49 +08:00
Pig Fang
6b6cec7f43 Add grid for admin dashboard 2019-12-15 21:04:20 +08:00
Pig Fang
79a96ec6d8 Add grid for status page 2019-12-15 19:04:30 +08:00
Pig Fang
25f9eb7f22 Mark verified for users from external services 2019-12-15 17:58:38 +08:00
Pig Fang
0b5596ce33
New Crowdin translations (#112)
[skip ci]
2019-12-15 11:33:08 +08:00
Pig Fang
91fbb42431 Add OAuth client 2019-12-15 11:19:10 +08:00
Pig Fang
25a7134d63 Tiny tweak 2019-12-14 23:17:44 +08:00
Pig Fang
ff1dd4bacd Refactor 2019-12-14 15:45:44 +08:00
Pig Fang
810c8ec878 Upgrade dependencies 2019-12-14 15:17:13 +08:00
Pig Fang
ee4d0f6fea Update changelog 2019-12-14 15:04:32 +08:00
Pig Fang
c2b81efb4b Add FAQ link at error page 2019-12-14 14:52:28 +08:00
Pig Fang
a3e74065f9 Add grid for closet page 2019-12-14 14:30:38 +08:00
Pig Fang
6ead313999 Apply php-cs-fixer 2019-12-14 11:10:37 +08:00
Pig Fang
c6959ebc81 Lengthened ip field to support IPv6 2019-12-14 10:03:11 +08:00
Pig Fang
759ea01146 Remove codecov from dependencies 2019-12-14 09:39:47 +08:00
Pig Fang
37f8355dd4 Apply new ES syntax: Optional Chaining 2019-12-14 00:08:21 +08:00
Pig Fang
7b3b528e6c Fix test 2019-12-13 21:23:16 +08:00
Pig Fang
0eaae1387e Fix tests 2019-12-13 19:45:18 +08:00
Pig Fang
96fd445415 Add grid for user dashboard 2019-12-13 19:29:57 +08:00
Pig Fang
7950132954 Add grid for user profile page 2019-12-13 18:53:47 +08:00
Pig Fang
d5ffea34d9 Add gap between badges 2019-12-13 17:42:55 +08:00
Pig Fang
d5aad4375f
New Crowdin translations (#111) [skip ci] 2019-12-13 16:03:06 +08:00
Pig Fang
56bd71c063 Refactor user profile page
to be static
2019-12-13 15:47:07 +08:00
Pig Fang
4af30bdbac Fix changing password 2019-12-13 10:56:16 +08:00
Pig Fang
a697a9a5d3 Apply linter fixes 2019-12-13 10:55:57 +08:00
Pig Fang
920d45a723 Add "STAFF" badge for admin & show badges at texture detail page 2019-12-11 23:29:20 +08:00
Pig Fang
65d82fba64 Refactor 2019-12-10 23:40:32 +08:00
Pig Fang
6aa28f88e7 Update documentation 2019-12-10 23:29:15 +08:00
Pig Fang
dec36d0771 Fix CI 2019-12-10 18:38:10 +08:00
Pig Fang
4a6ad15217 Remove unnecessary step at CI 2019-12-10 18:33:52 +08:00
Pig Fang
1480815123 Display modals at center 2019-12-10 14:20:14 +08:00
Pig Fang
243a164063
New Crowdin translations (#110)
[skip ci]
2019-12-10 11:25:07 +08:00
Pig Fang
0958ab99ea Tweak CI 2019-12-10 11:09:08 +08:00
Pig Fang
cc3e5a9609 Fix tests 2019-12-10 10:57:03 +08:00
Pig Fang
f9b32c8e69 Check dependencies and conflicts before installing plugin
fixes #109
2019-12-09 23:30:49 +08:00
Pig Fang
eb62e04c1c
New Crowdin translations (#107) 2019-12-09 16:38:06 +08:00
Pig Fang
66becb27d0 Detect Readme of plugin automatically 2019-12-08 23:58:44 +08:00
Pig Fang
8a66a70ced Optimize table of UI text customization 2019-12-08 19:32:53 +08:00
Pig Fang
0b09be3e9c Fix home page at mobile 2019-12-08 10:56:55 +08:00
Pig Fang
ce5b343617 Fix for too long texture name 2019-12-08 10:29:49 +08:00
Pig Fang
e3a34a4013 Fix badges 2019-12-08 09:59:34 +08:00
Pig Fang
13d372411e Allow to skip the GitHub Actions 2019-12-07 23:54:06 +08:00
Steven Qiu
18f3cb8571
Update README.md (skip ci) 2019-12-07 20:26:30 +08:00
Pig Fang
6fc099bb34 Fix "*.master" templates 2019-12-07 16:39:04 +08:00
Pig Fang
61eea2b980 Add Telegram notification 2019-12-07 15:59:00 +08:00
Pig Fang
7e8929d34f Fix release script 2019-12-07 00:02:09 +08:00
Pig Fang
a70260ca41 New method addAlert on OptionForm 2019-12-05 23:42:51 +08:00
Pig Fang
ba93788fc9 Fix coverage 2019-12-05 22:35:19 +08:00
Pig Fang
551b1334fc Fix test 2019-12-05 19:42:48 +08:00
Pig Fang
776e8652a0 Support specifying enchants.config in plugin 2019-12-05 19:28:12 +08:00
Pig Fang
4cc7b4441f Tweak CI 2019-12-05 19:01:03 +08:00
Pig Fang
060578ca95 Fix AJAX error alert 2019-12-05 18:54:50 +08:00
Pig Fang
5f202c3cee Fix about Jest 2019-12-05 11:42:34 +08:00
Pig Fang
ed9d856c43 Add new color settings 2019-12-04 16:45:09 +08:00
Pig Fang
8aec8e5028 Add more tests 2019-12-03 17:47:06 +08:00
Pig Fang
322ef7cdeb Blade -> Twig (for forms) 2019-12-03 17:03:30 +08:00
Pig Fang
a9e11f7785 Update .gitignore 2019-12-03 16:54:06 +08:00
Pig Fang
e7be95d3e2 Refactor 2019-12-03 15:41:54 +08:00
Pig Fang
7e3b61be7a Simplify TypeScript configuration 2019-12-03 15:41:31 +08:00
Pig Fang
f306b4af9f Update badges 2019-12-03 12:57:28 +08:00
Pig Fang
c91919b6d9 Update changelog 2019-12-03 12:54:07 +08:00
Pig Fang
c5829ded76 CircleCI -> GitHub Actions 2019-12-03 11:40:06 +08:00
Pig Fang
f41b912e53 Fix type definitions 2019-12-01 19:05:02 +08:00
Pig Fang
ec42b4b4eb Remove Element UI 2019-12-01 18:08:21 +08:00
Pig Fang
264369699a Replace Element "Message" with Bootstrap "Alert" 2019-12-01 17:52:30 +08:00
Pig Fang
beec114717 Remove modal after closed 2019-12-01 14:45:33 +08:00
Pig Fang
6cd5e9a1e7 Tweak test 2019-12-01 00:00:44 +08:00
Pig Fang
1e4454cdc0 Rename test 2019-11-30 23:19:03 +08:00
Pig Fang
c858bbf5be Refactor 2019-11-30 23:11:12 +08:00
Pig Fang
cece411eae Dependencies tweak 2019-11-30 17:57:30 +08:00
Pig Fang
99461cabd0 Tweak ESLint config 2019-11-30 16:16:05 +08:00
Pig Fang
f414849051 Fix skin library page skeleton 2019-11-30 13:02:06 +08:00
Pig Fang
2da0a3576b Replace Element msgbox with Bootstrap modal 2019-11-30 12:01:17 +08:00
Pig Fang
b1ae902091 Update contributing guide [skip ci] 2019-11-29 22:38:11 +08:00
Pig Fang
92282daa9e Tweak code 2019-11-29 09:27:07 +08:00
Pig Fang
aada1148fb Reuse <Modal> component 2019-11-28 21:35:27 +08:00
Pig Fang
991475041b Fix <Modal> component 2019-11-28 17:04:37 +08:00
Pig Fang
a0a950089e Allow to specify id for modal 2019-11-28 16:31:39 +08:00
Pig Fang
e5b8a130a0 Rewrite showModal 2019-11-28 16:24:12 +08:00
Pig Fang
84afc32d84 Revert "Specify base URL at <base> element"
This reverts commit f8844cb549.
2019-11-27 23:57:28 +08:00
Pig Fang
c75f4429ac Use native controls 2019-11-27 17:21:48 +08:00
Pig Fang
2b538685ff Fix release script 2019-11-27 15:24:36 +08:00
Pig Fang
6aa458c95b New default home page background 2019-11-27 15:06:09 +08:00
Pig Fang
66c3c016f7 Fix button of clearing cache 2019-11-27 14:43:06 +08:00
Pig Fang
6321cea0da Add @types/bootstrap 2019-11-27 14:34:03 +08:00
Pig Fang
f8844cb549 Specify base URL at <base> element 2019-11-26 17:59:14 +08:00
Pig Fang
ff6277a0ca Read commit ID by executing Git at status page 2019-11-26 17:31:37 +08:00
Pig Fang
c665adf1c8 Fix detecting unknown locale 2019-11-26 16:53:19 +08:00
Pig Fang
0fbf16acad Tweak webpack config 2019-11-26 13:01:15 +08:00
Pig Fang
a724543dac Add some type annotations 2019-11-26 11:49:10 +08:00
Pig Fang
383e20acbd Tweak Jest setup file 2019-11-26 11:44:44 +08:00
Pig Fang
a43e8036c5 Use static Babel config file 2019-11-26 11:10:05 +08:00
Pig Fang
9871e2e484 Use Node.js 12 at CI 2019-11-26 11:03:55 +08:00
dependabot[bot]
6cb0747270 Bump js-yaml from 3.12.0 to 3.13.1 (#106) 2019-11-25 23:33:08 +08:00
Pig Fang
7235375581 Upgrade ESLint-related 2019-11-25 23:30:51 +08:00
Pig Fang
3d578963ea Allow simple build 2019-11-25 18:39:18 +08:00
Pig Fang
d2b8835c94 Rewrite scripts with PowerShell 2019-11-24 15:57:46 +08:00
Pig Fang
7aa044324c Update changelog 2019-11-24 14:42:15 +08:00
Pig Fang
b085698b01 Don't add commit at blessing global 2019-11-24 14:39:53 +08:00
Pig Fang
52dae783e8 Upgrade to AdminLTE v3 2019-11-24 14:32:58 +08:00
Pig Fang
5df36ae8ea Replace $nextTick with flushPromises 2019-11-21 09:33:28 +08:00
Pig Fang
96c22e20af Fix TypeScript errors 2019-11-21 09:23:50 +08:00
Pig Fang
eb6a012c72 Upgrade dependencies (Composer) 2019-11-20 18:54:52 +08:00
Pig Fang
a9372265d9 Upgrade dependencies (Yarn) 2019-11-20 17:48:24 +08:00
Pig Fang
e394e7491a Fix template of home page 2019-11-20 17:09:11 +08:00
Pig Fang
bf4623c6ef Add hooks for ReportController 2019-11-20 15:01:09 +08:00
Pig Fang
ee872104b0 Update Crowdin link [skip ci] 2019-11-13 15:02:20 +08:00
Pig Fang
1fc607a00b Add "Spanish" option 2019-11-13 14:51:10 +08:00
Pig Fang
200a5b2352 Fix translation service at setup 2019-11-13 14:27:22 +08:00
Pig Fang
8958cf489b Update contributing guide 2019-11-12 22:47:59 +08:00
Pig Fang
3cb6d09046
New Crowdin translations (#105) 2019-11-11 18:14:46 +08:00
Pig Fang
195c4e26aa
New Crowdin translations (#103) 2019-11-11 18:14:17 +08:00
Pig Fang
b21e1e5566
New Crowdin translations (#102) [skip ci] 2019-11-02 22:22:56 +08:00
Pig Fang
76a9ce6aab Remove unused l10n texts 2019-11-02 19:03:43 +08:00
Pig Fang
e9007c10a9
Update Crowdin config [skip ci] 2019-11-02 13:16:09 +08:00
Pig Fang
6d4d2ea62c Update Crowdin configuration file 2019-11-02 13:09:04 +08:00
Pig Fang
facc043df7 Upgrade dependencies 2019-10-07 22:40:48 +08:00
Pig Fang
c424465321 Fix locale detection 2019-10-07 19:37:38 +08:00
Pig Fang
55b9b5ad9e Replace node-sass with dart-sass 2019-09-21 19:43:49 +08:00
Pig Fang
4be0e0e4e1 Add notice about hot reload 2019-09-20 23:52:16 +08:00
Pig Fang
5b8e344ce9 Upgrade front-end building related dependencies 2019-09-20 20:12:59 +08:00
Pig Fang
c0d6256efd Fix webpack-dev-server 2019-09-20 19:43:51 +08:00
Pig Fang
74452a70de Fix loading style when development 2019-09-20 18:50:08 +08:00
Pig Fang
2a2491ac93 Do not extract Switch component 2019-09-19 23:19:17 +08:00
Pig Fang
bb898ea2e4 Use message to report plugin errors
Instead of `notification`
2019-09-19 23:09:53 +08:00
Pig Fang
d232bb4672 Remove unused code 2019-09-19 22:21:44 +08:00
Pig Fang
82140b6893 Blade -> Twig (almost finished) 2019-09-19 22:13:25 +08:00
Pig Fang
84f760d930 Remove unused code 2019-09-18 23:17:12 +08:00
Pig Fang
3b1866ffba Blade -> Twig 2019-09-18 23:06:48 +08:00
Pig Fang
146c12f26e Restructure tests 2019-09-17 23:57:29 +08:00
Pig Fang
c2f4d3a008 Fix PHP check 2019-09-17 23:17:56 +08:00
Pig Fang
9403ae356d Blade -> Twig (wip) 2019-09-17 23:10:44 +08:00
Pig Fang
19efd013f6 Tweak mocks 2019-09-16 12:49:33 +08:00
Pig Fang
f51e2d7b9d Tweak CI 2019-09-15 14:46:21 +08:00
Pig Fang
4a9af2d5df Refactor retrieving assets 2019-09-15 10:18:49 +08:00
Pig Fang
792062451a Remove priority due to changes from Laravel 5.4 2019-09-15 09:32:07 +08:00
Pig Fang
93a7bae30d Fix catching cipher exception 2019-09-14 12:28:22 +08:00
Pig Fang
acde755e43 Update release script 2019-09-13 09:52:34 +08:00
Pig Fang
5fc2b2f612 Fix release script 2019-09-13 09:36:11 +08:00
Pig Fang
2f774d9111 Bump version to 5.0.0-beta.1 2019-09-13 09:21:11 +08:00
Pig Fang
f2afe728e7 Update release script 2019-09-12 22:54:51 +08:00
Pig Fang
cbad417f03 Remove "pray for kyoani" text 2019-09-12 19:33:48 +08:00
Pig Fang
050fa45993 Preprocess PHP version 2019-09-12 19:31:48 +08:00
Pig Fang
d5205ede35 Put an HTML at root for guiding. 2019-09-12 19:17:54 +08:00
Pig Fang
a87320fe09 Clean up .env files 2019-09-12 19:06:18 +08:00
Pig Fang
8cb65dd846 Upgrade dependencies 2019-09-12 18:55:44 +08:00
Pig Fang
79307561c9 Use another JSON file for publishing preview 2019-09-12 18:55:18 +08:00
Pig Fang
62221c05a7 Do not generate random salt via CLI installation 2019-09-12 12:27:13 +08:00
Pig Fang
899a495f80 Fix YAML indentation 2019-09-11 23:34:42 +08:00
Pig Fang
e91185461a
Add GitHub Actions (#97)
* Add GitHub Actions

* Update branches trigger

* Fix .env file

* Fix default database connection

* Add test step

* Normalize PHP version

* Update main.yml

* Add more jobs

* Fix YAML syntax error

* Fix YAML syntax error

* Attempt to fix Windows job

* Update main.yml

* Update main.yml

* Update main.yml

* Attempt to use MySQL

* Update main.yml

* Fix possible error
2019-09-11 23:32:56 +08:00
Pig Fang
deab8be4a8 Upgrade to Laravel 6 2019-09-10 21:29:14 +08:00
Pig Fang
21c28c8b1c Update policy of checking environment 2019-09-10 21:10:27 +08:00
Pig Fang
e38d74455c Remove unused code 2019-09-10 20:01:15 +08:00
Pig Fang
06a43b5f72 Remove response macros 2019-09-10 19:52:17 +08:00
Pig Fang
65111d3609 Fix event of plugin.versionChanged 2019-09-09 23:08:03 +08:00
Pig Fang
a75e116510 Tweak env files header 2019-09-08 20:44:19 +08:00
Pig Fang
0d5864106d Tweak test 2019-09-08 19:39:32 +08:00
Pig Fang
7dd7bb0adc Tweak l10n 2019-09-08 19:39:26 +08:00
Pig Fang
54d3b76c13 Add support of customizing UI text 2019-09-08 18:57:19 +08:00
Pig Fang
a72d46d2f2 Add more methods on blessing.fetch 2019-09-08 15:20:49 +08:00
Pig Fang
b7d845ee51 Prevent warning 2019-09-08 11:43:03 +08:00
Pig Fang
bc0e830758 Simplify code 2019-09-08 09:44:00 +08:00
Pig Fang
99649ff9ea Tweak menu order 2019-09-08 09:22:51 +08:00
Pig Fang
21d416671a Tweak cache policy of parsing YAML 2019-09-08 09:19:32 +08:00
Pig Fang
5718567bea Load front end i18n of plugin automatically 2019-09-07 23:20:16 +08:00
Pig Fang
2b0eb3101c Remove redundant YAML parsing 2019-09-07 21:23:38 +08:00
Pig Fang
efd6f44aea Fix i18n file 2019-09-07 21:08:08 +08:00
Pig Fang
9ff8ea0893 Load front-end i18n text at back-end 2019-09-07 17:18:58 +08:00
Pig Fang
7c0bf46c3c Tweak config 2019-09-07 13:01:44 +08:00
Pig Fang
f9f2796529 Remove unused code 2019-09-07 11:15:23 +08:00
Pig Fang
98522a5cce
Apply fixes from StyleCI (#96)
[ci skip] [skip ci]
2019-09-07 11:00:35 +08:00
Pig Fang
9aaaa20d52 Add update script 2019-09-07 10:37:30 +08:00
Pig Fang
803ea2899d Rename changelogs 2019-09-07 10:34:57 +08:00
Pig Fang
5b5740b74b Remove unused code 2019-09-07 10:32:26 +08:00
Pig Fang
b99246234b Tweak tests and containers 2019-09-07 10:18:24 +08:00
Pig Fang
cac1c7eb31 Remove old update scripts 2019-09-07 08:44:58 +08:00
Pig Fang
13a2cd9b18 Refactor setup 2019-09-06 23:53:47 +08:00
Pig Fang
5d1dce347f Switch to another translations loader 2019-09-06 18:52:34 +08:00
Pig Fang
c567b12adc Remove unused service providers 2019-09-05 12:55:03 +08:00
Pig Fang
1d0ae52c7b Switch to another captcha library 2019-09-05 12:23:46 +08:00
Pig Fang
402eec0b3c Simplify syntax 2019-09-04 23:16:49 +08:00
Pig Fang
e4685ad649 Update changelogs 2019-09-04 23:00:07 +08:00
Pig Fang
e3483375e0 Remove package swiggles/memcache 2019-09-04 22:59:06 +08:00
Pig Fang
e48bd1f9c6 Tweak TestCase 2019-09-04 21:28:21 +08:00
Pig Fang
9402f5f83e Fix priority of Filters API 2019-09-04 19:33:39 +08:00
Pig Fang
3fc176e07a Add more events and filters 2019-09-04 19:31:44 +08:00
Pig Fang
9ccb620fe4 Add ignition 2019-09-03 23:45:02 +08:00
Pig Fang
1e625f75bf Tweak Filters API 2019-09-03 23:07:10 +08:00
Pig Fang
3264e376cb Simplify importing Auth 2019-09-03 18:44:21 +08:00
Pig Fang
be86f161a2 Reinvent wheel: Filters API 2019-09-03 18:41:19 +08:00
Pig Fang
df3c1687ad Add filter can_rename_player 2019-09-02 23:33:51 +08:00
Pig Fang
cdb7456ab2 Add IDE helper 2019-09-02 23:06:10 +08:00
Pig Fang
ed80b2373b Fix dispatching event 2019-09-02 20:42:26 +08:00
Pig Fang
3f7a4212d1 Update ignore 2019-09-02 20:30:18 +08:00
Pig Fang
8f350b206f Add new events for renaming player 2019-08-31 12:14:39 +08:00
Pig Fang
347399c944 Add commit SHA at status page 2019-08-31 09:42:29 +08:00
Pig Fang
cfa552157f Tweak listeners 2019-08-31 09:20:11 +08:00
Pig Fang
70280d0acc Fix lint 2019-08-31 09:15:20 +08:00
Pig Fang
c44ff192ba Catch plugin's bootstrapper exceptions 2019-08-31 09:12:51 +08:00
Pig Fang
016e11b40b Fix tests 2019-08-29 18:56:44 +08:00
Pig Fang
3d3e488443 Show error stack from plugins 2019-08-28 17:45:25 +08:00
Pig Fang
15c3c0423a Decrease PHP version requirement to 7.2.0 2019-08-28 17:36:20 +08:00
Pig Fang
c9cdc6640c Add more info at status page 2019-08-28 16:04:26 +08:00
Pig Fang
fb3f58856c Fix saving plugins option 2019-08-28 15:32:49 +08:00
Pig Fang
49bf12675d Add more info at status page 2019-08-28 14:52:51 +08:00
Pig Fang
8bb617623e Add environment status page 2019-08-28 11:39:00 +08:00
Pig Fang
048441071e Remove Laradock [skip ci] 2019-08-28 09:07:27 +08:00
Pig Fang
eb0818dc27 Fix cleaning options cache 2019-08-26 11:01:49 +08:00
Pig Fang
5465399eda Fix lint 2019-08-25 17:32:39 +08:00
Pig Fang
deb8c44e45 Improve text of plugins management 2019-08-25 15:54:29 +08:00
Pig Fang
c976a5c5f8 Load translations of plugins even disabled 2019-08-25 14:51:56 +08:00
Pig Fang
0c6fe77492 Update links [skip ci] 2019-08-24 12:08:58 +08:00
Pig Fang
63ac1c11dd Revert 2019-08-24 10:22:26 +08:00
Pig Fang
47ae815ce0 Update dependencies 2019-08-23 20:50:48 +08:00
Pig Fang
e68f54f655 Add tests 2019-08-23 17:21:49 +08:00
Pig Fang
ca4d1b5d04 Inject current plugin at bootstrapper 2019-08-23 14:20:04 +08:00
Pig Fang
602fde7227 Add tests 2019-08-23 10:59:44 +08:00
Pig Fang
567999909f Add tests 2019-08-22 22:48:51 +08:00
Pig Fang
c607990991 Add tests 2019-08-22 17:59:49 +08:00
Pig Fang
44fe418eee Clean up 2019-08-22 16:15:59 +08:00
Pig Fang
5d8814e900 Add test to cover 2019-08-22 11:44:51 +08:00
Pig Fang
7021ef49b4 Clean up 2019-08-22 11:29:30 +08:00
Pig Fang
17c267ea55 Tweak service container 2019-08-22 11:17:05 +08:00
Pig Fang
625cc08b81 Tweak service container 2019-08-22 10:49:05 +08:00
Pig Fang
28a4144ed1 Fix tests 2019-08-22 10:06:13 +08:00
Pig Fang
de49318bc6 Read options from cache if exists 2019-08-22 09:19:58 +08:00
Pig Fang
29eb0afa2c Tweak tests 2019-08-22 09:11:04 +08:00
Pig Fang
197c3d8333 Tweak options:cache command 2019-08-22 08:50:59 +08:00
Pig Fang
e01f034ffd Support caching options 2019-08-21 23:46:38 +08:00
Pig Fang
061c9d7f56 Disable plugins which have conflicts 2019-08-21 17:31:51 +08:00
Pig Fang
f7f0d9e3ec Add "test" script in composer.json 2019-08-21 17:31:32 +08:00
Pig Fang
937186e34b Plugin system: allow to define conflicts 2019-08-21 11:48:42 +08:00
Pig Fang
3481dc75fc Allow to pass single user to send notifications at hook 2019-08-21 11:11:44 +08:00
Pig Fang
cd9fa0b3d3 Update changelog [skip ci] 2019-08-20 21:58:11 +08:00
Pig Fang
70726a1c5a Tweak test 2019-08-20 11:50:07 +08:00
Pig Fang
3ee84f766d Revert "Tweak PluginServiceProvider"
This reverts commit f4be149bf3.
2019-08-20 11:26:21 +08:00
Pig Fang
f4be149bf3 Tweak PluginServiceProvider 2019-08-20 10:12:35 +08:00
Pig Fang
3b457ce329 Add a test to cover 2019-08-20 09:40:44 +08:00
Pig Fang
4fcdfc2b7e Support multiple plugins directories 2019-08-19 23:06:17 +08:00
Pig Fang
5fa956dfb6 Tweak booting plugins 2019-08-19 16:52:10 +08:00
Pig Fang
d51374fe99 Revert 2019-08-18 16:01:20 +08:00
Pig Fang
42f0135704 Check plugin dependencies at PluginManager 2019-08-17 10:57:38 +08:00
Pig Fang
eeec2e0435 Improve UX of plugin-related Artisan commands 2019-08-16 17:35:13 +08:00
Pig Fang
bf778e9405 Tweak 2019-08-16 17:09:40 +08:00
Pig Fang
eedcfdf957 Refactor booting plugin 2019-08-16 15:51:20 +08:00
Pig Fang
72aa2c39ac Register service providers of plugins 2019-08-16 14:56:47 +08:00
Pig Fang
43ede5b274 Ignore unreachable code 2019-08-16 14:48:38 +08:00
Pig Fang
857827bcdc Fix for historical reason 2019-08-16 14:46:55 +08:00
Pig Fang
372c7768d0
Apply fixes from StyleCI (#93)
[ci skip] [skip ci]
2019-08-15 23:27:29 +08:00
Pig Fang
e67df90978 Tiny tweaks 2019-08-15 17:21:55 +08:00
Pig Fang
f117a4f3c7 Add test 2019-08-15 17:08:25 +08:00
Pig Fang
560ed2c2fd Refactor plugin system (part 11) 2019-08-15 16:54:12 +08:00
Pig Fang
d871af1906 Tweak test 2019-08-15 15:03:53 +08:00
Pig Fang
eb836357b8 Refactor plugin system (part 10) 2019-08-15 11:57:55 +08:00
Pig Fang
f182f799f6 Refactor plugin system (part 9) 2019-08-13 23:06:28 +08:00
Pig Fang
3594b7abf8 Refactor plugin system (part 8) 2019-08-13 22:44:32 +08:00
Pig Fang
85a67a5332 Refactor plugin system (part 7) 2019-08-13 18:42:17 +08:00
Pig Fang
15f988f04d Fix test 2019-08-12 17:48:40 +08:00
Pig Fang
3071ece7ba Refactor plugin system (part 6) 2019-08-12 17:37:52 +08:00
Pig Fang
fb0dcd4ad3 Refactor plugin system (part 5) 2019-08-12 15:59:01 +08:00
Pig Fang
d15fd0b36d Refactor plugin system (part 4) 2019-08-12 15:21:50 +08:00
Pig Fang
18019d85e6 Refactor plugin system (part 3) 2019-08-12 14:45:07 +08:00
Pig Fang
d92e1738dc Refactor plugin system (part 2) 2019-08-12 10:52:40 +08:00
Pig Fang
93183debda Fix test 2019-08-12 10:03:39 +08:00
Pig Fang
197b61b9d6 Fix test 2019-08-12 09:56:51 +08:00
Pig Fang
b7ee522d86 Attempt to fix test 2019-08-11 19:10:27 +08:00
Pig Fang
8b7e63d237 Fix test 2019-08-11 18:59:32 +08:00
Pig Fang
5932f8984b Skip test 2019-08-11 18:56:29 +08:00
Pig Fang
2709d09823 Refactor booting plugins (part 1) 2019-08-11 18:00:00 +08:00
Pig Fang
a14ff87d0d Add helper functions for Filter API 2019-08-10 12:16:24 +08:00
Pig Fang
b0dbba1475 Update readme [skip ci] 2019-08-10 10:36:35 +08:00
Pig Fang
eeb75ed8e9 Remove Laradock from repository 2019-08-10 10:36:15 +08:00
Pig Fang
283ab51259 Drop support of IIS [skip ci] 2019-08-10 10:27:43 +08:00
Pig Fang
457594797c Increase PHP version requirement 2019-08-09 22:56:54 +08:00
Pig Fang
0651fdac67 Upgrade PHPUnit and other dependencies 2019-08-09 22:49:17 +08:00
Pig Fang
6003292d60 Update changelog [skip ci] 2019-08-09 17:22:23 +08:00
Pig Fang
c125696712 Tweak CI trigger 2019-08-09 16:29:00 +08:00
Pig Fang
562c3690a8 Add tests for artisan commands 2019-08-09 15:36:13 +08:00
Pig Fang
29ce9d3df1 Use built-in key:generate command 2019-08-09 11:20:36 +08:00
Pig Fang
eed205b7f9 Remove v4 migration commands 2019-08-09 10:54:42 +08:00
Pig Fang
fab3da8f7f Refactor 2019-08-09 10:13:55 +08:00
Pig Fang
3f42d9dfc9 Remove unused code 2019-08-09 08:53:29 +08:00
Pig Fang
bcc4adfae2 Add dependency Eventy 2019-08-08 23:04:16 +08:00
Pig Fang
c281a444f0 Allow to enable or disable a plugin via CLI 2019-08-08 23:03:48 +08:00
Pig Fang
aa635c16af Fix importing Illuminate\Support\Str 2019-08-08 22:27:16 +08:00
Pig Fang
2952d86c5e Tweak aliases 2019-08-08 18:00:11 +08:00
Pig Fang
28f80a2ef0 Tiny tweaks on codebase 2019-08-08 17:21:15 +08:00
Pig Fang
eae0c07ff6 Simplify code 2019-08-08 15:37:38 +08:00
Pig Fang
dcf7300499 Perform type cast before returning value 2019-08-08 15:23:37 +08:00
Pig Fang
b771134688 Fix test 2019-08-08 15:02:21 +08:00
Pig Fang
9209febd96 Don't convert remember_token field 2019-08-08 14:31:03 +08:00
Pig Fang
06b4ec0dbe Fix test 2019-08-08 13:55:41 +08:00
Pig Fang
55346ac4c0 Update changelogs 2019-08-08 11:55:38 +08:00
Pig Fang
d9262c055c Convert SQL query of user model
Automatically, for data integration.
2019-08-08 11:55:22 +08:00
Pig Fang
4de51a464a Fix that model was reset after resetting skin previewing 2019-08-08 11:29:42 +08:00
Pig Fang
bbdd75ad44 Remove deprecated assertArraySubset 2019-08-07 15:46:34 +08:00
Pig Fang
7443766f4c Tweak policy of retrieve CA cert for GuzzleHttp 2019-08-04 18:19:53 +08:00
Pig Fang
4c51924940 Resolve User class from service container 2019-08-04 10:56:15 +08:00
Pig Fang
abaa88444f Update notice of front end CDN 2019-08-03 22:49:12 +08:00
Pig Fang
7929de7891 Use lower case for hashing 2019-08-01 14:52:43 +08:00
Pig Fang
5fab376248 Update release script 2019-08-01 14:47:48 +08:00
Pig Fang
d8eb04dc18 Update release script 2019-08-01 14:40:27 +08:00
Pig Fang
c5da87b681 Update release script 2019-08-01 14:38:26 +08:00
Pig Fang
07d08c7ad8 Use Azure Pipelines 2019-08-01 11:44:59 +08:00
Pig Fang
744964424e Remove docker script 2019-07-31 16:47:07 +08:00
Pig Fang
2731225f4e Fix comment 2019-07-30 15:17:18 +08:00
Pig Fang
3f4837bb35 Refactor user model 2019-07-30 15:12:31 +08:00
Pig Fang
73beea6af4 Tweak 2019-07-30 14:37:31 +08:00
Pig Fang
67bcfc65a5 Refactor user model 2019-07-30 14:29:02 +08:00
Pig Fang
a0daad44d9 Update readme 2019-07-30 10:29:38 +08:00
dependabot[bot]
61d5ebe172 Bump lodash from 4.17.10 to 4.17.11 (#86)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.10 to 4.17.11.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.10...4.17.11)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-30 10:21:43 +08:00
Pig Fang
160dc3e877 Update deps 2019-07-30 09:45:13 +08:00
Pig Fang
80cc47279f config.blade.php as default config view file name. 2019-07-26 16:26:50 +08:00
Pig Fang
d41bbe201c Don't log when testing 2019-07-26 15:58:13 +08:00
Pig Fang
9cd46fdbaf Add missing l10n text (fix #83) 2019-07-26 15:49:41 +08:00
Pig Fang
53781536e7 Some fields at admin panel shouldn't be sortable 2019-07-26 15:41:50 +08:00
Pig Fang
2d30deb279 Update sponsor 2019-07-25 14:40:35 +08:00
Pig Fang
88a8968490 Add dump server for development 2019-07-24 08:45:01 +08:00
Pig Fang
8552d2f7b5 Add a new env item for webpack 2019-07-23 17:34:04 +08:00
Pig Fang
777fc23151 Bump version to 4.4.0 2019-07-18 22:03:15 +08:00
Pig Fang
1ccddf5e74 Pray for Kyoto Animation 2019-07-18 22:02:55 +08:00
Pig Fang
0cf26f4ce9 Update backers [skip ci] 2019-07-17 23:01:46 +08:00
Pig Fang
fe55b0be9d Fix linting errors 2019-07-12 22:41:44 +08:00
Pig Fang
718c7a61a5 Fix redirecting without URL query string after logged in 2019-07-12 15:53:49 +08:00
Pig Fang
bb719bd089 Tiny fix [skip ci] 2019-07-11 11:35:11 +08:00
Pig Fang
e62ad371f1 Fix loading front-end i18n texts of plugins 2019-07-11 11:31:30 +08:00
Pig Fang
c387794e17 Add option for fixed background 2019-07-10 10:53:19 +08:00
Pig Fang
a082bec096 Add option for hiding introduction of home page 2019-07-10 10:18:10 +08:00
Pig Fang
788a2d5c6e Fix Font Awesome of bottom of home page 2019-07-10 09:35:09 +08:00
Pig Fang
a9e4d17cbb Update laradock 2019-07-10 09:18:23 +08:00
Pig Fang
9bc839e8a5 Remove unused i18n text 2019-07-08 16:21:54 +08:00
Pig Fang
82ddeb63c4 Optimize form validation 2019-07-08 16:13:49 +08:00
Pig Fang
588b4db2c6 Remove unused i18n text 2019-07-08 13:17:01 +08:00
Pig Fang
a4d4dcfa9c Optimize form validation 2019-07-08 13:10:34 +08:00
Pig Fang
0d005707bd Disable no-extra-parens on TypeScript files 2019-07-08 12:41:03 +08:00
Pig Fang
4196a952e0 Optimize exception stack of Ajax error 2019-07-08 12:01:26 +08:00
Pig Fang
83330c0dfd Add Docker support with Laradock 2019-07-07 15:12:51 +08:00
Pig Fang
8ee6c6725f Update changelog [skip ci] 2019-07-07 09:43:35 +08:00
Asnxthaony
68343b0a31 Fix rename in closet (#80) 2019-07-07 09:40:30 +08:00
Pig Fang
0105c6b016 Use sync as default queue driver 2019-07-05 23:25:15 +08:00
Pig Fang
4529d1e219 Push notifications to queue (fix #78) 2019-07-05 22:48:23 +08:00
Pig Fang
2eb4f4e2d4 Bump version to 4.3.6 2019-07-05 19:45:38 +08:00
Pig Fang
dffe7fc060 Nothing here 2019-07-05 19:45:30 +08:00
Pig Fang
cd493b946f Revert "Remove travis and old release script"
This reverts commit 1580d72590.
2019-07-05 19:40:36 +08:00
Pig Fang
94ef51ea0d Bump version to 4.3.5 2019-07-05 19:30:27 +08:00
Pig Fang
4df5d867a9 Fix again 2019-07-05 19:30:05 +08:00
Asnxthaony
21d4636877 Remove unused translation (#76) 2019-07-05 19:28:47 +08:00
Pig Fang
8eb4c8688d Bump version to 4.3.4 2019-07-05 18:53:10 +08:00
Pig Fang
a4fe2243af Fix release-related issue 2019-07-05 18:53:00 +08:00
Pig Fang
58b132167c Bump version to 4.3.3 2019-07-05 18:16:01 +08:00
Pig Fang
1c2220ef94 Fix release-related issue 2019-07-05 18:15:46 +08:00
Pig Fang
caa6ca69cf Bump version to 4.3.2 2019-07-05 18:05:01 +08:00
Pig Fang
b28c8a8bf1 Fix release-related issue 2019-07-05 18:04:30 +08:00
Pig Fang
53069d53e3 Bump version to 4.3.1 2019-07-05 17:48:10 +08:00
Pig Fang
db5640dc62 Fix for release issue 2019-07-05 17:47:47 +08:00
Pig Fang
f9f12e2ff6 Bump version to 4.3.0 2019-07-05 17:14:23 +08:00
Pig Fang
1580d72590 Remove travis and old release script 2019-07-05 17:04:00 +08:00
Pig Fang
63216304ee Set up CI with Azure Pipelines
[skip ci]
2019-07-05 16:52:13 +08:00
Pig Fang
a36c31e5bd Check PHP version before updating 2019-07-05 14:48:12 +08:00
Pig Fang
4c2c74dafb Only super admin can visit update pages 2019-07-05 12:40:14 +08:00
Pig Fang
2f08a7db37 New plugin API: pushMiddleware 2019-07-03 19:33:08 +08:00
Pig Fang
a94b526179 Fix test 2019-07-03 19:30:09 +08:00
Pig Fang
7a7cc2ddd9 Notifications 2019-07-03 16:19:13 +08:00
Pig Fang
3d88d56a9d Split tests 2019-07-03 13:19:57 +08:00
Pig Fang
eb3124e3a0 Upgrade Laravel to v5.8.27 2019-07-03 10:03:39 +08:00
Pig Fang
ab7b3841b5 Tweak the order of "report" table 2019-07-03 09:30:42 +08:00
Pig Fang
e8108959e3 New plugin API: addUserBadge 2019-07-02 23:34:27 +08:00
Pig Fang
be9f6011bb Enable strict types partially 2019-07-02 22:22:05 +08:00
Pig Fang
f93e0d1755 Fix occasion of mounted event of plugins system 2019-07-02 17:39:41 +08:00
Pig Fang
8fa8c6173e Ignore unreachable code 2019-07-02 11:36:43 +08:00
Pig Fang
0bbeaa7246 Make front end assets URL flexible 2019-07-02 11:35:29 +08:00
Pig Fang
7ae8a6325d Add link for editing announcement 2019-07-02 11:20:43 +08:00
Pig Fang
f1232724df Fix occasion of mounted event of plugins system 2019-07-02 10:59:21 +08:00
Pig Fang
83247087cb Only check update for super admin 2019-07-02 09:08:31 +08:00
Pig Fang
f064b9271c Tweak some links at closet page 2019-07-01 23:16:46 +08:00
Pig Fang
00d7d5481e Allow to use relative path at PLUGINS_DIR 2019-07-01 21:25:25 +08:00
Pig Fang
e811d1afc3 Revert "Remove regular version Font Awesome"
This reverts commit 1edb4ac824.
2019-07-01 10:24:33 +08:00
Pig Fang
a69bafd915 Fix that OAuth tables not created at installation (fix #72) 2019-06-30 23:25:48 +08:00
Pig Fang
1edb4ac824 Remove regular version Font Awesome 2019-06-30 18:51:09 +08:00
Asnxthaony
d2c75cd35a Standardize translation (#71)
* Standardize translation

* Update front-end.yml
2019-06-30 17:46:14 +08:00
Pig Fang
5229340412 Allow open in new tab for side bar links 2019-06-29 00:07:40 +08:00
Pig Fang
cd84f1f8a6 add configurable "Explore" menu 2019-06-28 23:47:30 +08:00
Pig Fang
7cb3e246a8 Fix possible duplicated signings (fix #68) 2019-06-25 22:59:05 +08:00
Pig Fang
0a1f9ea3d6 Fix type errors 2019-06-18 13:12:47 +08:00
Pig Fang
27afc73571 Upgrade deps 2019-06-18 13:03:55 +08:00
Pig Fang
66182eaabc Optimize panel of changing color 2019-06-15 17:55:18 +08:00
Pig Fang
07c52dd463 Revert 2019-06-04 23:26:04 +08:00
Pig Fang
bf1e813d7d Attempt to fix CI 2019-06-04 23:23:24 +08:00
Pig Fang
696cadb5f5 Remove API tests 2019-06-04 23:13:02 +08:00
Pig Fang
42d212dc95 Allow to customize HTTP code
For rejecting accessing private texture
2019-06-04 22:45:57 +08:00
Pig Fang
672e80991a Simplify code 2019-06-04 22:22:49 +08:00
Pig Fang
7c4e567cb5 Fix test 2019-06-04 22:16:05 +08:00
Pig Fang
abe9562fdb Remove API tests in CI 2019-06-04 16:26:39 +08:00
Pig Fang
f14faf16e3 Create funding info [skip ci] 2019-06-04 16:23:01 +08:00
Pig Fang
a6d300f592 Update sponsor [skip ci] 2019-06-04 14:30:11 +08:00
Pig Fang
345317d105 Update changelog [skip ci] 2019-06-02 23:40:19 +08:00
Pig Fang
e9c326e61e Support Chrome's theme-color 2019-06-02 23:30:10 +08:00
Pig Fang
ad7f885235 Tweak chart 2019-06-02 23:06:50 +08:00
dependabot[bot]
eb55313ef3 Bump fstream from 1.0.11 to 1.0.12 (#67) 2019-05-31 19:35:28 +08:00
Pig Fang
fab432f415 Merge branch 'dev' of github.com:bs-community/blessing-skin-server into dev 2019-05-30 21:47:24 +08:00
Pig Fang
f7a998b54c Bump version to 4.2.1 2019-05-30 21:46:21 +08:00
Asnxthaony
6fd990c06c Change the short link in ISSUE_TEMPLATE.md (#65) 2019-05-28 15:15:36 +08:00
Pig Fang
95c2866b01 Fix cloning response object 2019-05-23 11:26:34 +08:00
Pig Fang
50dbd4ee52 Better UX for backend errors (fix #64) 2019-05-22 23:55:37 +08:00
Pig Fang
ef50c635c3 Fix adding middleware to routes for OAuth 2019-05-22 23:12:11 +08:00
Pig Fang
503e0d486a Remove barryvdh/laravel-ide-helper 2019-05-22 10:25:26 +08:00
Pig Fang
23f8ee408e Require verified email for OAuth routes (fix #59) 2019-05-22 10:13:01 +08:00
Asnxthaony
3bbb4d656f Change the short link in .env.example 2019-05-20 22:40:27 +08:00
yushijinhun
ee979cfb2a
Update changelog 2019-05-19 18:15:20 +08:00
yushijinhun
00d238d945
Fix test
baef165dbc (diff-26172a0152bcc5300c2e3286ff0d0947L117)
2019-05-19 17:10:49 +08:00
yushijinhun
a9affdced9
Fix #57 2019-05-19 17:04:17 +08:00
yushijinhun
baef165dbc
Split tests 2019-05-19 16:16:16 +08:00
yushijinhun
b9b99d822e
Fix test
e182bb2c84 (diff-26172a0152bcc5300c2e3286ff0d0947R253)
2019-05-19 15:09:21 +08:00
Pig Fang
74f56916ad
Fix test 2019-05-19 14:49:49 +08:00
Pig Fang
e182bb2c84
Tweak test 2019-05-19 14:44:17 +08:00
yushijinhun
6eee0233c3
Merge branch 'fix-58' into dev
Fixes #58
2019-05-19 14:24:00 +08:00
yushijinhun
2ed8001d27
Fix #58 2019-05-19 14:22:01 +08:00
yushijinhun
b1353554eb
Test for #58 2019-05-19 14:02:44 +08:00
Haowei Wen
937db919ac
Merge pull request #62 from bs-community/analysis-8PKwm9
Apply fixes from StyleCI
2019-05-19 13:51:03 +08:00
Haowei Wen
d0609af143 Apply fixes from StyleCI 2019-05-19 05:49:44 +00:00
yushijinhun
4741fa987d
Merge branch 'fix-61' into dev
Fixes #61
2019-05-19 13:12:54 +08:00
Pig Fang
9d2ec9a955 Tweak 2019-05-19 10:32:28 +08:00
Pig Fang
979290c71c Fix test 2019-05-19 10:30:00 +08:00
yushijinhun
4012cfc46f
Fix #61 2019-05-18 21:04:21 +08:00
yushijinhun
b4ab63907c
Test cases for #61 2019-05-18 21:04:19 +08:00
Pig Fang
1269fdaa82
Update package.json 2019-05-12 18:55:41 +08:00
Pig Fang
9bb6c4b84c
Update CONTRIBUTING.md 2019-05-12 18:44:57 +08:00
yushijinhun
00d715d0bf
chmod -x ca-bundle.crt [skip ci] 2019-05-11 23:10:45 +08:00
yushijinhun
705be701fe
Update changelog [skip ci] 2019-05-11 23:09:53 +08:00
yushijinhun
5fbe935af8
Fix changelog is not uploaded automatically [skip ci] 2019-05-11 23:01:23 +08:00
yushijinhun
8ef45c37e3
Fix default steve skin may be displayed in slim model 2019-05-11 22:55:14 +08:00
yushijinhun
f4cbda6168
Fix style 2019-05-11 22:39:31 +08:00
yushijinhun
6b6fb8d33d
Fix previewing model is not set in closet & players page 2019-05-11 22:34:11 +08:00
yushijinhun
f53ce777b3
Fix previewing doesn't use specified model
Related: 2eab303457
2019-05-11 22:16:39 +08:00
Pig Fang
f249ea80e3 Bump version to 4.2.0 2019-05-08 23:30:20 +08:00
Pig Fang
7127970f23 Fix that state of skin library page can't be saved 2019-05-08 23:29:57 +08:00
Pig Fang
9c0c72c166 Allow to process report more than once 2019-05-08 12:51:48 +08:00
Pig Fang
aec1c1312e Refactor 2019-05-08 11:41:49 +08:00
Pig Fang
929cc14761 Fix model can't walk after resetting model (fix #53) 2019-05-08 10:52:18 +08:00
Pig Fang
f88e60e07f Refactor importing ElementUI 2019-05-07 23:56:25 +08:00
Pig Fang
5e1ea64c66 Expose some Element UI components 2019-05-07 18:52:22 +08:00
Pig Fang
090c3b661b Tweak console commands 2019-05-07 18:47:40 +08:00
Pig Fang
72780a6217 Preview player automatically if user has only one player (fix #46) 2019-05-07 17:49:07 +08:00
Pig Fang
7dc59cf444 Make some scripts cross-platform 2019-05-07 17:04:45 +08:00
Pig Fang
776d1eee1e Tweak changelog [skip ci] 2019-05-07 15:21:10 +08:00
Pig Fang
a4c9736dfa Refactor deleting texture 2019-05-07 15:16:53 +08:00
Pig Fang
09eed5da43 Update changelog 2019-05-07 14:08:04 +08:00
Pig Fang
a35e265e66 Show today's data in adminstration panel 2019-05-07 14:06:26 +08:00
Pig Fang
f590763993 Update changelog [skip ci] 2019-05-06 17:47:24 +08:00
Pig Fang
c6ff0f62e0 Update sponsor [skip ci] 2019-05-06 11:24:39 +08:00
时光
7e3145d230 Make dashboard circles middle (#51) 2019-05-06 10:32:40 +08:00
Pig Fang
9eb7b037ab Fix resetting options of "Customize" page 2019-05-05 20:04:36 +08:00
Pig Fang
1925115d57 Bump version to 4.1.4 2019-05-05 11:21:48 +08:00
Pig Fang
b119a8de6d Regress likes field of textures table 2019-05-05 11:21:37 +08:00
Pig Fang
26a2b58048 Fix sorting skin library 2019-05-04 23:26:16 +08:00
Pig Fang
7d37bc6cb1 Append commit information at build time 2019-05-04 22:01:08 +08:00
Pig Fang
4e5276ca87 Update changelog [skip ci] 2019-05-04 21:36:03 +08:00
Asnxthaony
5ef0aebe62 Remove unnecessary spaces [ci skip] (#49) 2019-05-04 21:16:56 +08:00
Pig Fang
7b8b318402 Detect type automatically when uploading texture 2019-05-04 17:09:44 +08:00
Pig Fang
85eefad0b1 Fix sorting textures in skin library 2019-05-04 16:02:46 +08:00
Pig Fang
2eab303457 Fix previewing alex textures 2019-05-04 13:31:46 +08:00
Pig Fang
d418083495 Fix dropdown menu of skin library 2019-05-04 11:51:24 +08:00
Asnxthaony
059c948b1c Update options.yml (#47) 2019-05-04 07:34:13 +08:00
Pig Fang
b43055cf83 Fix deploy script [skip ci] 2019-05-03 23:50:31 +08:00
Pig Fang
beb252ecab Bump version to 4.1.3 2019-05-03 23:44:16 +08:00
Pig Fang
90836c6d1e Fix an error when updating 2019-05-03 23:44:04 +08:00
Pig Fang
86c9def60f Fix deploy script [skip ci] 2019-05-03 23:35:13 +08:00
Pig Fang
e91d6f2cb5 Bump version to 4.1.2 2019-05-03 23:22:37 +08:00
Pig Fang
cee336547d Update version script 2019-05-03 23:21:45 +08:00
Pig Fang
04269b57e9 Fix closet pagination 2019-05-03 23:17:17 +08:00
Pig Fang
d8aca0b8d5 Automatically add release notes 2019-05-03 16:06:16 +08:00
Pig Fang
51c9bac405 Fix pagination of closet 2019-05-03 15:23:56 +08:00
Pig Fang
c2906ecc4f Fix style of language menu 2019-05-03 15:15:10 +08:00
Pig Fang
9197b8b095 Fix possible error on update page 2019-05-03 15:04:02 +08:00
Pig Fang
69de61aedd Update backers [skip ci] 2019-05-03 11:58:50 +08:00
Pig Fang
a576be78c3 Bump version to 4.1.1 2019-05-03 11:56:05 +08:00
Pig Fang
7982ae2661 Fix update script 2019-05-03 11:55:23 +08:00
Pig Fang
47d1f50cb2 Bump version to 4.1.0 2019-05-03 10:58:36 +08:00
Pig Fang
33c345b6e6 Upgrade dependencies 2019-05-03 10:34:50 +08:00
Pig Fang
5ea5d76b70 Upgrade dependencies 2019-05-03 09:49:48 +08:00
Pig Fang
0880e1e51e Add release note page 2019-05-03 09:08:39 +08:00
Pig Fang
8a240d0533 Optimize update tips 2019-05-03 08:50:02 +08:00
Pig Fang
8599e36cc0 Fix routes of setup 2019-05-03 08:47:58 +08:00
Pig Fang
a9844142aa Simplify update steps 2019-05-03 08:46:15 +08:00
Pig Fang
49d41750b7 Disable APP_DEBUG on testing 2019-05-03 08:42:13 +08:00
Pig Fang
b4e23ce79f Add message for 4.1.0 update script 2019-05-03 08:32:09 +08:00
Pig Fang
6032297baa Simplify routes of setup 2019-05-03 07:50:56 +08:00
Pig Fang
403089157a FIx chart [skip ci] 2019-05-02 23:30:58 +08:00
Pig Fang
d519a4824a Register command at setup 2019-05-02 22:52:37 +08:00
Pig Fang
f297788806 Fix missing CSRF field 2019-05-02 20:51:34 +08:00
Pig Fang
60ad06cfbb Fix style of avatar 2019-05-02 18:52:37 +08:00
Pig Fang
9d2bf8ad40 Split two axises 2019-05-02 16:57:34 +08:00
Pig Fang
13b18c2489 Append version for requesting plugin assets 2019-05-02 15:38:00 +08:00
dz_paji
c5f0b0eb58 Update index.yml (#45)
make it sounds better
2019-05-02 14:43:29 +08:00
Pig Fang
c7d56637f4 Fix width of chart at admin panel 2019-05-02 09:54:50 +08:00
Pig Fang
f7c8dc87ce Truncate too long texture name (fix #44) 2019-05-02 09:25:28 +08:00
Little_Qiu
d40b267eb1 Update index.yml (#43) 2019-05-02 07:27:18 +08:00
Pig Fang
2ffc2244ec Tweak style of score notice at upload page 2019-05-01 20:37:51 +08:00
Pig Fang
fb10962ff9 Expand content policy alert 2019-05-01 20:15:41 +08:00
Pig Fang
9d2990389d Extract some texts as i18n at home page 2019-05-01 20:08:06 +08:00
Pig Fang
9f93aca8a1 Tweak text 2019-05-01 19:49:57 +08:00
Pig Fang
0c858cb6c3 Add an event hook after i18n loaded 2019-05-01 19:42:13 +08:00
Pig Fang
b5ee28e60a Display site name on error page 2019-05-01 19:04:14 +08:00
Pig Fang
22d49f972d Fix loading commands of laravel/passport 2019-05-01 17:08:55 +08:00
Pig Fang
2b575d7a8f Fix update page 2019-05-01 16:40:18 +08:00
Pig Fang
4348cd7020 Use formal event assertion 2019-05-01 10:38:50 +08:00
Pig Fang
777e786873 Add API root information 2019-05-01 10:14:14 +08:00
Pig Fang
1e1f138902 Fix typo 2019-04-29 10:08:58 +08:00
Pig Fang
9578836c87 Add notice text for API tests [skip ci] 2019-04-29 10:06:49 +08:00
Pig Fang
112b6d27ba Update sponsors [skip ci] 2019-04-28 18:52:34 +08:00
Pig Fang
a769d91464 Extract common code as component 2019-04-28 15:32:18 +08:00
Pig Fang
fc0a9ccf6b Clean up CSS 2019-04-28 15:16:16 +08:00
Pig Fang
2a5ba76b07 Remove API of signing 2019-04-28 15:01:10 +08:00
Pig Fang
a7ac10bc8c Clean up 2019-04-28 14:58:14 +08:00
Pig Fang
be9449a794 Cache Cargo in CI 2019-04-28 11:48:14 +08:00
Pig Fang
d8bec1d1fb Add APIs for closet 2019-04-28 11:38:38 +08:00
Pig Fang
b365b1c4bf Add test for "sign again" 2019-04-28 10:50:03 +08:00
Pig Fang
34933d9159 Simplify blades 2019-04-28 09:32:04 +08:00
Pig Fang
86bed61a0e Simplify blades 2019-04-28 09:28:53 +08:00
Pig Fang
7224b32c8f Add more tests 2019-04-27 23:20:42 +08:00
Pig Fang
fd70a7182f Add API for fetch current user 2019-04-27 23:10:21 +08:00
Pig Fang
8a2aaccabe Refactor entry file 2019-04-27 22:06:09 +08:00
Pig Fang
f731c672bc Tweak scripts [skip ci] 2019-04-27 20:16:49 +08:00
Pig Fang
fe5b7c7380 Add more API tests 2019-04-27 20:08:41 +08:00
Pig Fang
b5122c6044 Add OpenSSL library for API tests 2019-04-27 14:25:01 +08:00
Pig Fang
15f22dd10c Tweak lintings 2019-04-27 14:12:02 +08:00
Pig Fang
25256b0814 Add API integration tests 2019-04-27 13:09:10 +08:00
Pig Fang
51e4efba7b Make sure tid_cape set 2019-04-26 21:38:26 +08:00
Pig Fang
1a98e7937d Return empty string when JWT auth failed 2019-04-26 18:58:12 +08:00
Pig Fang
748c275969 Add missing artisan calls in CLI installation 2019-04-26 12:33:43 +08:00
Pig Fang
262d48e1f7 Fix switching i18n 2019-04-26 00:01:32 +08:00
Pig Fang
6918a46ae8 Remove unused JavaScript global variables 2019-04-25 23:42:06 +08:00
Pig Fang
e2c125648f Support OAuth2 2019-04-25 23:24:24 +08:00
Pig Fang
6f2345efe4 Add missing env item 2019-04-25 14:13:21 +08:00
Pig Fang
a9d858a4ea Rename APIs 2019-04-25 13:31:45 +08:00
Pig Fang
1ae0329083 Rename auth guard 2019-04-25 13:29:43 +08:00
Pig Fang
d2ad6107d1 Refactor middlewares 2019-04-25 13:01:39 +08:00
Pig Fang
122477c5c3 Add RESTful APIs about players 2019-04-24 13:10:03 +08:00
Pig Fang
f82ebb9a8b Add test 2019-04-23 23:48:51 +08:00
Pig Fang
f224a1be96 Rename 2019-04-23 23:45:19 +08:00
Pig Fang
64f25ef95f Reset invalid texture when player retrieved 2019-04-23 23:34:04 +08:00
Pig Fang
1c205f6842 New API: add new player 2019-04-23 23:03:12 +08:00
Pig Fang
3a4bd6b24b Update API 2019-04-23 22:32:35 +08:00
Pig Fang
9d31faa533 Fix language dropdown for mobile (fix #39) 2019-04-23 19:52:00 +08:00
Pig Fang
168413b710 Fix transparent navigation bar 2019-04-23 19:17:53 +08:00
Pig Fang
6d03e47526 Nomalize JSON response structure 2019-04-23 19:14:41 +08:00
Pig Fang
fd541e7365 Clean up 2019-04-23 14:13:58 +08:00
Pig Fang
d8f08176a2 Check owner before operating player 2019-04-23 13:09:06 +08:00
Pig Fang
b70004ec0f Add JWT refreshing 2019-04-23 12:45:06 +08:00
Pig Fang
0486ddc5a1 Normalize JSON response structure 2019-04-23 11:47:45 +08:00
Pig Fang
6507f2699f Support JWT authentication 2019-04-23 10:05:58 +08:00
Pig Fang
7f58d92590 Set new version automatically 2019-04-22 22:56:24 +08:00
Pig Fang
f8bba6b7b7 Add ForbiddenIE middleware 2019-04-22 21:09:36 +08:00
Pig Fang
e6fc975796 Update readme [skip ci] 2019-04-22 19:29:54 +08:00
Pig Fang
573cca5c5d Allow multiple plugins market registry 2019-04-22 19:26:17 +08:00
Pig Fang
bae2a5d3a8 Fix #38 2019-04-22 09:52:45 +08:00
Pig Fang
3c6a75c9bc Bump version to 4.0.4 2019-04-20 16:05:12 +08:00
Pig Fang
e2594c2ab7 Add script for bumping version 2019-04-20 16:02:05 +08:00
Pig Fang
d01ca18431 Fix zip file name when downloading plugin 2019-04-20 15:17:42 +08:00
Pig Fang
79e5909bdd Fix requiring verification in closet page 2019-04-20 15:14:25 +08:00
Pig Fang
b626832475 🚀 2019-04-20 07:38:20 +08:00
Pig Fang
35a0a4850c Bump version to v4..0.3 2019-04-20 07:33:32 +08:00
Pig Fang
836e9938a0 Bundle crt file 2019-04-20 07:32:53 +08:00
Pig Fang
bebffa28a6 Bump version to v4.0.2 2019-04-19 23:25:43 +08:00
Pig Fang
bb3fecf57c Fix syntax 2019-04-19 23:21:14 +08:00
Pig Fang
d8d80f2729 Fix syntax 2019-04-19 23:17:58 +08:00
Pig Fang
ade8b0e5a6 Bundle certificate (fix #36) 2019-04-19 23:15:05 +08:00
Pig Fang
ff4fa1eefa Check table before creating 2019-04-19 23:05:58 +08:00
Pig Fang
228c2df73e Bump version to v4.0.1 2019-04-19 19:58:17 +08:00
Pig Fang
8eb174a6dc
Apply fixes from StyleCI (#35) 2019-04-19 19:36:36 +08:00
Pig Fang
8bab3699ba Add option about transparent navigation bar 2019-04-19 19:32:15 +08:00
Pig Fang
2baad6e9f4 Update readme [skip ci] 2019-04-19 19:02:10 +08:00
Pig Fang
b36aa1c9f9 Fix 2D preivew (fix #33) 2019-04-10 13:09:40 +08:00
Pig Fang
3526f72425 Update issue template 2019-04-10 12:58:39 +08:00
Pig Fang
017261e019 Update readme [skip ci] 2019-04-10 12:48:37 +08:00
Pig Fang
5206f28c4e Bump version to 4.0.0-rc.1 2019-04-09 19:59:42 +08:00
Pig Fang
d86e4c1805 Do not publish .env file 2019-04-09 13:21:31 +08:00
Pig Fang
7f2d410a0a Change default update source [skip ci] 2019-04-08 22:03:01 +08:00
Pig Fang
5e42368d69 New hash algorithm: Bcrypt 2019-04-08 21:53:00 +08:00
Pig Fang
1c72171a5e Extract copyright as view 2019-04-08 16:07:42 +08:00
Pig Fang
d55387a0d3 Add missing URL [skip ci] 2019-04-08 15:22:39 +08:00
Pig Fang
7e70281fb2 Add publish script 2019-04-08 15:18:26 +08:00
Pig Fang
c9f75f70d1 Defer checking updates 2019-04-08 14:42:40 +08:00
Pig Fang
53b305393c Remove unused model scope 2019-04-07 23:03:00 +08:00
Pig Fang
2cd3e47606 Ignore some runtime-specified code 2019-04-07 22:42:51 +08:00
Pig Fang
fee7ad7b53 Try fixing CI 2019-04-07 10:23:53 +08:00
Pig Fang
6da5094cb4 Remove get_base_url function 2019-04-07 08:54:54 +08:00
Pig Fang
09b9959bc8 Remove AfterSessionBooted middleware 2019-04-06 23:22:36 +08:00
Pig Fang
23a9f018ca Remove redundant middleware 2019-04-06 23:16:37 +08:00
Pig Fang
298b6edf66 Tweak tests 2019-04-06 23:16:14 +08:00
Pig Fang
8fa1477d7d Clean console output 2019-04-06 23:01:33 +08:00
Pig Fang
4c4023bbc2 Refactor UpdateController 2019-04-06 22:52:43 +08:00
Pig Fang
e32983a1a1 Simplify update page 2019-04-05 22:53:07 +08:00
Pig Fang
a24e34cf5e Add version check for market registry 2019-04-05 17:48:36 +08:00
Pig Fang
d7b78324f8 Simplify downloading packages 2019-04-05 17:23:27 +08:00
Pig Fang
45aaa819b8 Add a missing assertion 2019-04-05 09:34:14 +08:00
Pig Fang
293668960a Add test for addRoute hook 2019-04-05 09:31:36 +08:00
Pig Fang
b9c2cdff6b Tweak tests 2019-04-05 09:19:08 +08:00
Pig Fang
c5d2082308 Tweak console 2019-04-05 09:09:40 +08:00
Pig Fang
108bd260a4 Tweak webpack 2019-04-05 09:00:43 +08:00
Pig Fang
4305b722ca Switch to Laravel's validation expcetion handler 2019-04-05 08:58:00 +08:00
Pig Fang
eda7e1ce30 Update backers 2019-04-05 08:41:48 +08:00
Pig Fang
cd8d6c8e2a Add whoops as development dependencies 2019-04-04 23:21:59 +08:00
Pig Fang
eca20dec50 Bump version to 4.0.0-beta.2 2019-04-04 22:14:45 +08:00
Pig Fang
772f7d9dce Remove whoops temporarily 2019-04-04 22:14:04 +08:00
Pig Fang
666344936e Simplify 2019-04-04 19:50:52 +08:00
Pig Fang
d309f8fbbf Simplify exception handler 2019-04-04 19:44:17 +08:00
Pig Fang
29b0c1e5a3 Extract some helper functions to view 2019-04-04 11:40:18 +08:00
Pig Fang
634f0b726a Inline one-time used helper function 2019-04-04 11:16:04 +08:00
Pig Fang
aa30d5a41e Add tests for captcha 2019-04-04 11:04:13 +08:00
Pig Fang
e2c6028196 Show chars captcha even "invisible" is on 2019-04-04 10:19:32 +08:00
Pig Fang
c5eefbd061 Refactor tests 2019-04-04 09:50:48 +08:00
Pig Fang
3fc7dc6a21 Simplify tests 2019-04-04 09:48:04 +08:00
Pig Fang
d6abaccdf9 Use Storage::fake in tests 2019-04-03 23:16:23 +08:00
Pig Fang
13559e229d Fix front end test 2019-04-03 23:16:05 +08:00
Pig Fang
b23538c47e Return plugin name as-is if plugin is unavailable (fix #32) 2019-04-03 22:43:14 +08:00
Pig Fang
ac4fb12e42 Remove type limitation on login page 2019-04-03 10:24:33 +08:00
Pig Fang
3b55adc445 Rename variables 2019-04-03 10:12:51 +08:00
Pig Fang
bf479ad6a6 Fix alerting 2019-04-03 09:46:59 +08:00
Pig Fang
1f2d7a98ce Better UX about players 2019-04-01 21:45:59 +08:00
Pig Fang
58437a1b97 Add new plugins registry (fix #31) 2019-04-01 16:12:11 +08:00
Pig Fang
a5d0b3f137 Update URLs 2019-04-01 10:33:16 +08:00
Pig Fang
bd86b7936a Layout tiny tweaks 2019-04-01 09:56:04 +08:00
Pig Fang
b8b8a8493c Add getter for compat 2019-03-31 23:55:07 +08:00
Pig Fang
6d5ab8ed2e Hide cape if cape is empty 2019-03-31 16:31:42 +08:00
Pig Fang
4897656425 Fix passing extra view info 2019-03-31 16:07:36 +08:00
Pig Fang
3022f9f337 Fix downloading texture 2019-03-31 15:12:49 +08:00
Pig Fang
444dee3f14 Fix loading CSS on update page 2019-03-31 14:47:48 +08:00
Pig Fang
50e855bb71 Fix loading resources from CDN 2019-03-31 14:38:17 +08:00
Pig Fang
92dbca70d4 Fix dev build 2019-03-31 13:29:23 +08:00
Pig Fang
d16e7a3dfa Generate manifest for cache issues 2019-03-31 13:12:56 +08:00
Pig Fang
e87c52d30f Fill database info automatically in setup
Ref: #30
2019-03-31 11:07:42 +08:00
Pig Fang
7e4d439da9 Refactor 2019-03-31 11:00:07 +08:00
Pig Fang
3a8504c1bf Fix modifying dotenv file (fix #30) 2019-03-31 10:33:03 +08:00
Pig Fang
d9efa1d5ff Declare sharable user instance in master view 2019-03-31 09:08:31 +08:00
Pig Fang
c57a8c8316 Update backers [skip ci] 2019-03-31 08:47:16 +08:00
Pig Fang
d867b0921b Remove deprecated validation rules 2019-03-31 08:41:55 +08:00
Pig Fang
7eaf166063 Bump version to 4.0.0-beta.1 2019-03-30 20:37:49 +08:00
Pig Fang
8521217d4a Tweak style of user dashboard 2019-03-30 19:06:32 +08:00
Pig Fang
7589ec8f2b Use buttons from Element UI 2019-03-30 18:36:01 +08:00
Pig Fang
1e3816d1d4 Upgrade dependencies 2019-03-30 16:22:08 +08:00
Pig Fang
fd01a352a4 Load i18n from element-ui 2019-03-30 15:48:34 +08:00
Pig Fang
005f801c0d Upgrade dependencies 2019-03-30 15:21:14 +08:00
Pig Fang
e7f8503578 Allow fallback i18n 2019-03-30 15:04:55 +08:00
Pig Fang
867ef34628 Hide content policy link if it is empty 2019-03-30 14:46:12 +08:00
Pig Fang
44edb23ba2 Fix English text 2019-03-30 14:45:54 +08:00
Pig Fang
e49c40cc08 Switch to new slot syntax 2019-03-30 14:39:55 +08:00
Pig Fang
9989291941 Relicense to MIT
Close #14

[skip ci]
2019-03-30 13:20:46 +08:00
Pig Fang
e2b4153dab Simplify property name
Ref: #14
2019-03-30 13:08:13 +08:00
Pig Fang
cb72ca5571 Fix test 2019-03-30 12:53:40 +08:00
Pig Fang
cbfce9ab2e Revert "change variable name from rawPasswd to rawPassword (#128)"
This reverts commit cfbfe60f89.

Ref: #14
2019-03-30 11:54:24 +08:00
Pig Fang
9a095732fa Build plugin "report-textures" into core 2019-03-30 11:38:30 +08:00
Pig Fang
d8d9923224 Update sponsors and backers [skip ci] 2019-03-29 16:58:50 +08:00
Pig Fang
9feed83fcc UI tweak 2019-03-29 09:58:58 +08:00
Pig Fang
f16c416176 Hide comment area by default 2019-03-29 09:04:57 +08:00
Pig Fang
19a51f8df7 Restructure files 2019-03-28 16:37:01 +08:00
Pig Fang
afc5854615 Tweak build 2019-03-28 10:24:09 +08:00
Pig Fang
be41f1a6b8 Simplify imports 2019-03-28 09:15:11 +08:00
Little_Qiu
f6845ab22c Improve text prompts when reCAPTCHA is enabled 2019-03-27 13:33:29 +08:00
Pig Fang
37cc838137 Tweak imports 2019-03-27 13:06:03 +08:00
Pig Fang
a311e814d1 UI tweak 2019-03-27 11:50:39 +08:00
Pig Fang
77e69f23e3 Extract common code 2019-03-27 11:29:08 +08:00
Pig Fang
c01e362ae0 Fix validating captcha 2019-03-27 11:11:09 +08:00
Pig Fang
a5d2659d98 Refactor 2019-03-27 11:09:11 +08:00
Pig Fang
64658fd9f2 Enable reCAPTCHA on "forgot" page 2019-03-27 11:07:04 +08:00
Pig Fang
3e7836b9ff Simplify build 2019-03-27 10:50:17 +08:00
Pig Fang
e25a3623a5 Fix i18n key 2019-03-27 10:42:39 +08:00
Pig Fang
ddc65ddd23 Tweak 2019-03-27 10:38:42 +08:00
Pig Fang
164195e0dc Remove iCheck 2019-03-26 23:41:13 +08:00
Pig Fang
3622ed7548 Remove iCheck partially 2019-03-26 23:31:15 +08:00
Pig Fang
716423bd88 Beautify texture upload page 2019-03-26 22:04:27 +08:00
Pig Fang
a1e38eec1f Rework skin library filter 2019-03-26 17:42:27 +08:00
Pig Fang
0876d41421 Update readme 2019-03-26 15:55:59 +08:00
Pig Fang
c60e36b1a0 Make responsive in user dashboard 2019-03-26 11:43:31 +08:00
Pig Fang
b6cf6d21a1 Rework admin panel 2019-03-26 10:42:25 +08:00
Pig Fang
9e14a3cffb Fix chart-related issues 2019-03-26 10:21:44 +08:00
Pig Fang
f7c03a3fac Beautify user dashboard 2019-03-26 09:44:04 +08:00
Pig Fang
c168970723 Remove "toastr" and "sweetalert2" 2019-03-25 22:01:57 +08:00
Pig Fang
51713c5b16 Tiny fixes 2019-03-24 15:49:42 +08:00
Pig Fang
04b8f73ac4 Support invisible reCAPTCHA 2019-03-24 15:45:50 +08:00
Pig Fang
d5903f6412 Should reset reCAPTCHA (fix #28) 2019-03-24 11:43:19 +08:00
Pig Fang
a3f3e11927 Fix what I forgot 2019-03-24 10:17:02 +08:00
Pig Fang
2397ebc565 Remove recaptcha_mirror option 2019-03-24 10:14:27 +08:00
Pig Fang
1fa155c213 Support reCAPTCHA 2019-03-24 09:58:37 +08:00
Pig Fang
f6040707e1 Generate extra data in controllers 2019-03-23 19:52:14 +08:00
Pig Fang
84b2a5f0a4 Check tables before installation in CLI 2019-03-23 18:57:56 +08:00
Pig Fang
cd1efcdcfc Hide vital fields 2019-03-23 17:40:02 +08:00
Pig Fang
7c9735b7b1 Remove unused command 2019-03-23 16:57:41 +08:00
Pig Fang
8a5002d1a5 Simplify 2019-03-23 16:39:37 +08:00
Pig Fang
623ebfc3e2 Support installing BS via CLI 2019-03-23 16:36:54 +08:00
Pig Fang
e71e74cd5b Rework Option 2019-03-23 15:44:16 +08:00
Pig Fang
2267a2cadb Remove UserRepository 2019-03-23 11:06:36 +08:00
Pig Fang
311e9b61d7 Add ext-* requirements 2019-03-23 00:20:48 +08:00
Pig Fang
b4ef665848 Refactor 2019-03-23 00:20:28 +08:00
Pig Fang
aec3fe4a87 Support limiting single player 2019-03-22 21:40:12 +08:00
Pig Fang
6793ccea30 Remove unused code 2019-03-22 11:13:21 +08:00
Pig Fang
21707dbe5d Set sortField automatically 2019-03-22 10:40:45 +08:00
Pig Fang
8845958ec4 Fix unintented escaping in profile page 2019-03-21 23:04:25 +08:00
Pig Fang
f9c659036d Prevent conflict with PhpRedis extension 2019-03-21 22:51:30 +08:00
Pig Fang
0f20e99ac1 Fix plugin-related issues 2019-03-21 19:45:52 +08:00
Pig Fang
3a4844a5dd Build plugin "bs-super-cache" into core 2019-03-21 12:44:15 +08:00
Pig Fang
6c31b3465f Fix generating avatar with specific size 2019-03-21 09:36:59 +08:00
Pig Fang
4b553c3c92 Build "get-score-by-sharing" into core 2019-03-20 23:28:04 +08:00
Pig Fang
9bed8d022d Prevent convert empty strings in option page 2019-03-20 11:49:17 +08:00
Pig Fang
40ea4c0911 Check option before connecting to Redis 2019-03-20 11:05:41 +08:00
Pig Fang
d27dc54377 Build "redis" plugin into core 2019-03-20 11:00:14 +08:00
Pig Fang
3366237828 Split "resource" as a dedicated page 2019-03-20 10:01:42 +08:00
Pig Fang
accdffa88a Reuse code 2019-03-20 09:38:16 +08:00
Pig Fang
61b687275f UI tweak 2019-03-20 08:52:24 +08:00
Pig Fang
9c2e3e52ad Deduplicate code 2019-03-19 23:48:45 +08:00
Pig Fang
2cb334b091 Optimize dashboard query 2019-03-19 23:35:13 +08:00
Pig Fang
8a6aeb0657 Hoist router 2019-03-19 19:29:44 +08:00
Pig Fang
c770cd017e Allow load multiple modules 2019-03-19 19:18:24 +08:00
Pig Fang
a4c49d6634 Replace Chart.js with ECharts 2019-03-19 19:16:03 +08:00
Pig Fang
33d431606d Allow loading pure script 2019-03-19 15:36:47 +08:00
Pig Fang
d8295dff33 Optimize test 2019-03-19 15:30:52 +08:00
Pig Fang
749339f331 Process likes in a special method 2019-03-19 15:19:33 +08:00
Pig Fang
9828f66f5d Remove redundant check 2019-03-19 10:13:57 +08:00
Pig Fang
b426bc36a7 Clean up 2019-03-18 22:22:20 +08:00
Pig Fang
e0a8d4cb3e Fix 2019-03-18 17:57:20 +08:00
Pig Fang
d06e17dfdc Strip FIRST_RUN if database ok 2019-03-18 16:44:38 +08:00
Pig Fang
bf364c5f5f Reorg views 2019-03-18 15:00:18 +08:00
Pig Fang
b6668a8eeb Fix ESLint rules 2019-03-18 14:36:43 +08:00
Pig Fang
30e07a9c3b Fix regression [skip ci] 2019-03-18 13:34:32 +08:00
Pig Fang
f64e6494c6 One operation to change permission 2019-03-18 13:24:03 +08:00
yushijinhun
0e58460d21
chmod +x ./scripts/release.sh 2019-03-18 10:34:26 +08:00
Pig Fang
ae38c4d391 Add release script [skip ci] 2019-03-18 10:02:35 +08:00
Pig Fang
d1d4c54818 Migrate to TypeScript 2019-03-18 09:55:24 +08:00
Pig Fang
cfe419d41c Migrate to TypeScript 2019-03-17 23:39:48 +08:00
Pig Fang
83c1806d2b Tweak webpack config 2019-03-17 23:10:40 +08:00
Pig Fang
5d80b8e06a Migrate to TypeScript partially 2019-03-17 21:09:46 +08:00
Pig Fang
3b033be048 Refactor front-end 2019-03-17 15:59:52 +08:00
Pig Fang
9633625e3d Reuse common code 2019-03-17 15:26:12 +08:00
Pig Fang
70f5d059f0 Tweak CI 2019-03-17 13:47:42 +08:00
Little_Qiu
1891cf1b6c Update readme (#26) 2019-03-17 12:49:15 +08:00
Pig Fang
34441f587e Skip database page if config ok (fixes #25) 2019-03-17 12:05:31 +08:00
Pig Fang
36f2e86a42 Reformat Stylus 2019-03-17 11:19:07 +08:00
Pig Fang
d54a9e4602 Use Minecraft font in skinlib 2019-03-17 11:00:15 +08:00
Pig Fang
9872221dc3 Fix linting errors 2019-03-17 10:21:18 +08:00
Pig Fang
a1cfbe7f5b Allow to reset avatar 2019-03-17 09:46:02 +08:00
Pig Fang
0dfdf593ca Allow set avatar from skinlib 2019-03-17 00:12:56 +08:00
Pig Fang
70c9226bf8 Hide setAsAvatar if texture is cape 2019-03-16 23:47:56 +08:00
Pig Fang
afb65615b0 Build "seo-meta-tags" into core 2019-03-16 21:52:09 +08:00
Pig Fang
3bf9b18d64 Build "static-file-cdn" into core 2019-03-16 19:56:50 +08:00
Pig Fang
e2d63da311 Optimize test 2019-03-16 19:04:14 +08:00
Pig Fang
b4f1bb2402
Apply fixes from StyleCI (#24) [skip ci]
This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).

---

For more information, click [here](https://github.styleci.io/analyses/qyNGM5).
2019-03-16 18:53:19 +08:00
Pig Fang
dac2c32ff4 Return avatar without cache 2019-03-16 18:49:51 +08:00
Pig Fang
eec2832116
Apply fixes from StyleCI (#23) [skip ci]
This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).

---

For more information, click [here](https://github.styleci.io/analyses/q2jwJR).
2019-03-16 18:35:57 +08:00
Pig Fang
1c5f732c3c
Apply fixes from StyleCI (#22) 2019-03-16 17:45:41 +08:00
Pig Fang
62f545531d Fix 2019-03-16 17:45:18 +08:00
Pig Fang
ec78b7452a Fix 2019-03-16 17:43:57 +08:00
Pig Fang
e5f998af5d Build "avatar-api" plugin into core 2019-03-16 17:40:04 +08:00
Pig Fang
5235ac23b0 Fix uploading texture 2019-03-16 16:32:49 +08:00
Pig Fang
19001b16dc Add debugbar for development 2019-03-16 10:17:50 +08:00
Pig Fang
b770e52fe8 Fix risky test 2019-03-16 09:56:31 +08:00
Pig Fang
fade13cdab Drop support of .tpl 2019-03-16 09:51:01 +08:00
Pig Fang
0bca03284c Enable Laravel auto-discovery 2019-03-16 09:48:15 +08:00
Pig Fang
d1c81de9b9 Tweak CI [skip ci] 2019-03-15 22:39:51 +08:00
Pig Fang
0210f1857c Bump version 2019-03-15 22:34:34 +08:00
Pig Fang
61e20cd615 Fix CI 2019-03-15 22:33:54 +08:00
Pig Fang
3aefa7697b Fix installing Yarn 2019-03-15 22:28:53 +08:00
Pig Fang
684d84bad5 Fix using Node.js 2019-03-15 22:25:23 +08:00
Pig Fang
1ac8419be5 Fix CI 2019-03-15 22:19:56 +08:00
Pig Fang
bed07054ee Use Travis CI to release 2019-03-15 22:18:20 +08:00
Pig Fang
8bb84da1ad Bump version: 4.0.0-alpha.5 2019-03-15 20:04:37 +08:00
Pig Fang
f14b1a8297 Fix the fucking CircleCI 2019-03-15 19:55:48 +08:00
Pig Fang
9f8ba49c0d Bump version of 4.0.0-alpha.4 2019-03-15 19:14:31 +08:00
Pig Fang
1e7071ebe3 Fix compatibility of sweetalert2 with bootstrap 3 2019-03-15 19:13:38 +08:00
Pig Fang
2e8885d238 Bump version again (4.0.0-alpha.3) 2019-03-15 18:56:58 +08:00
Pig Fang
95472adfbd Tweak CI config 2019-03-15 18:06:40 +08:00
Pig Fang
9ec677dacd Fix test 2019-03-15 18:05:37 +08:00
Pig Fang
f6a7f26a45 Fix CI 2019-03-15 17:51:10 +08:00
Pig Fang
4d90e5e785 Bump version again due to some errors 2019-03-15 17:48:59 +08:00
Pig Fang
31866f12a5 Bump version for 4.0.0-alpha.1 2019-03-15 17:41:07 +08:00
Pig Fang
8a9ea940a4 Upgrade dependencies 2019-03-15 17:39:24 +08:00
Pig Fang
6778fc6d08 Fix linting errors 2019-03-15 16:50:16 +08:00
Pig Fang
1a16ca2096
Apply fixes from StyleCI (#20) [skip ci]
This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).

---

For more information, click [here](https://github.styleci.io/analyses/zDjgLJ).
2019-03-15 13:30:33 +08:00
Pig Fang
c4b3cc89b0 Fix redirecting in setup 2019-03-15 13:21:47 +08:00
Pig Fang
13fade2773 Fix missing likes field 2019-03-15 13:14:59 +08:00
Pig Fang
3a147c8ec4 Update readme [skip ci] 2019-03-15 11:48:59 +08:00
Pig Fang
5f2f3a0d45 New eslint config 2019-03-15 11:42:41 +08:00
Pig Fang
1a45ca9340 Tweak config 2019-03-15 10:47:34 +08:00
Pig Fang
f3bdc551cd
Apply fixes from StyleCI (#19) 2019-03-15 00:09:39 +08:00
Pig Fang
d93a5410d9 Fix test 2019-03-15 00:06:52 +08:00
Pig Fang
1afa36e8e9
Apply fixes from StyleCI (#18) [skip ci]
This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).

---

For more information, click [here](https://github.styleci.io/analyses/zYNYDd).
2019-03-15 00:03:54 +08:00
Pig Fang
5915b3ec17 Reimplementing closet 2019-03-14 23:55:49 +08:00
Pig Fang
fb89859dd2 Fix CI 2019-03-14 16:25:46 +08:00
Pig Fang
1d7d058933 Fix CI config 2019-03-14 15:59:03 +08:00
Pig Fang
a8bccaca44 Enable auto releasing 2019-03-14 15:44:41 +08:00
Pig Fang
fc44b09df1 Remove auto update script 2019-03-14 15:22:36 +08:00
Pig Fang
4e52bf41e1 Fix entry for IIS 2019-03-14 12:30:57 +08:00
Pig Fang
c10197461f Remove build-related from core repo 2019-03-14 10:34:36 +08:00
Pig Fang
c4d26a4c10 Simplify tests 2019-03-14 00:30:53 +08:00
Pig Fang
acacd09253 Fix cleaning up 2019-03-14 00:13:32 +08:00
Pig Fang
d45d287d93 Optimize testing 2019-03-14 00:02:00 +08:00
Pig Fang
c036e72642 Enable tinker 2019-03-13 22:25:08 +08:00
Pig Fang
ceac906771 Rename column player_name to name 2019-03-13 13:16:51 +08:00
Pig Fang
891676c7ef
Apply fixes from StyleCI (#17) 2019-03-13 11:25:20 +08:00
Pig Fang
cd2711942e Enforce to use tid_skin 2019-03-13 11:24:04 +08:00
Pig Fang
a75b358751 Add "download" button 2019-03-12 23:56:48 +08:00
Pig Fang
69b6d3685d Remove feedback 2019-03-12 20:51:46 +08:00
Pig Fang
9d890648e4
Apply fixes from StyleCI (#16) 2019-03-12 17:21:29 +08:00
Pig Fang
28828f3356 Update .gitignore 2019-03-12 17:15:51 +08:00
Pig Fang
d9aabe206d Add simple server for development 2019-03-12 16:48:26 +08:00
Pig Fang
63b352d670
Apply fixes from StyleCI (#12) 2019-03-03 00:38:44 +08:00
Pig Fang
995c653fec Remove redundant setPrivacy function 2019-03-02 23:58:35 +08:00
Pig Fang
5332589b65 Use Laravel's built-in updater 2019-03-02 23:47:51 +08:00
Pig Fang
3cf19d8656
Apply fixes from StyleCI (#11)
This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).

---

For more information, click [here](https://github.styleci.io/analyses/8wKwbZ).
2019-03-02 22:58:37 +08:00
Pig Fang
71e17a26ae Fix CI 2019-03-02 22:30:39 +08:00
Pig Fang
6dadf537f3 Rename CI job 2019-03-02 22:30:16 +08:00
Pig Fang
4d78150453 Remove unused file [skip ci] 2019-03-02 22:28:13 +08:00
Haowei Wen
23deb5c46f
Polish TextureControllerTest
See https://github.com/bs-community/blessing-skin-server/pull/8#discussion_r261825089
2019-03-02 21:54:31 +08:00
Pig Fang
1ff8e631fe
Remove settings of preference (#8)
Resolve #6
2019-03-02 21:13:17 +08:00
Pig Fang
b5f35f6379 Add laravel/tinker 2019-02-28 23:42:01 +08:00
Pig Fang
e4861bf0c6 ignore coverage of artisan commands 2019-02-28 19:14:11 +08:00
Pig Fang
5c8f4028ea Use files instead of hard-coded base64 2019-02-28 16:34:16 +08:00
Pig Fang
9ddf5ec311 removed unused blade views 2019-02-28 15:30:36 +08:00
Pig Fang
577dd0ed83 update readme [skip ci] 2019-02-28 14:22:18 +08:00
Pig Fang
6b793d4527 fix dep security issue 2019-02-28 14:15:51 +08:00
Pig Fang
c160065c28 fix dep security issue 2019-02-28 13:33:36 +08:00
Pig Fang
cca0b67988 remove jest-junit 2019-02-28 13:15:34 +08:00
Pig Fang
2aa3e6732e
Circle CI (#7)
* circleci

* use custom docker images

* remove azure pipelines

* update badge [skip ci]
2019-02-28 13:06:31 +08:00
Pig Fang
e8bdf93e92 update version 2019-02-28 09:32:40 +08:00
Pig Fang
e7e579ffa5 increase php version 2019-02-27 23:50:57 +08:00
Pig Fang
e380d82962 resolve conflict 2019-02-27 23:50:37 +08:00
Pig Fang
893fda4abe fix package name 2019-02-27 23:50:02 +08:00
Pig Fang
e528547b89
Laravel 5.8 (#5) 2019-02-27 23:44:50 +08:00
Pig Fang
f26f3ccbde update eslint-plugin-vue 2019-02-19 18:17:40 +08:00
Pig Fang
5309106b1d update webpack-related 2019-02-19 17:26:38 +08:00
Pig Fang
e44b3b5d22 fix tests 2019-02-19 16:37:29 +08:00
Pig Fang
709ecf6f9b upgrade deps 2019-02-19 11:55:54 +08:00
Pig Fang
aa46c08c00 update version in env files 2019-02-18 17:16:13 +08:00
Pig Fang
6d93a78d22 fix: check tables if it's existed when db is connected 2019-02-18 17:15:14 +08:00
Pig Fang
f7b5046a38 skip db connection check before setup
close printempw/blessing-skin-server#133
2019-02-18 16:35:39 +08:00
Pig Fang
31df74b318 fix ci 2019-02-18 14:54:23 +08:00
Pig Fang
e62744dc21 remove parallel 2019-02-18 11:59:25 +08:00
Pig Fang
083a0a2895 enhance ci 2019-02-18 11:53:27 +08:00
Pig Fang
0a21090dca fix caching deps 2019-02-18 09:49:26 +08:00
Pig Fang
f28b8236fb some tweaks 2019-02-18 09:37:44 +08:00
Pig Fang
7826cb1914 fix caching deps 2019-02-18 09:13:54 +08:00
Pig Fang
0ba95365cf allow fails when download cached deps 2019-02-17 22:49:02 +08:00
Pig Fang
674ff77fc4 cache deps 2019-02-17 22:45:07 +08:00
Pig Fang
0d0d0453cc fix generating artifacts 2019-02-17 22:26:17 +08:00
Pig Fang
4da5c874f6 fix generating artifacts 2019-02-17 22:14:22 +08:00
Pig Fang
ec5744b968 fix ci config 2019-02-17 21:41:12 +08:00
Pig Fang
5f0955c58f add build artifacts 2019-02-17 21:39:06 +08:00
Pig Fang
9386992fde
fix test finally (#4)
* comment out a test

* set an option
2019-02-17 21:23:07 +08:00
Pig Fang
0d4f34770e fix tests 2019-02-17 20:12:42 +08:00
Pig Fang
9e05b7c843 fix test 2019-02-17 10:23:25 +08:00
Pig Fang
1fe1aab59c update test 2019-02-17 09:51:33 +08:00
Pig Fang
7ae8626d98 tweak ci 2019-02-17 09:47:47 +08:00
Pig Fang
acca012245 tweak ci 2019-02-17 09:20:48 +08:00
Pig Fang
058d616d6a tweak ci 2019-02-17 09:14:41 +08:00
Pig Fang
46e7ef256d simplify 2019-02-17 09:11:57 +08:00
Pig Fang
92d3934649 update .gitignore 2019-02-17 08:44:47 +08:00
Pig Fang
d70503cda7 fix 2019-02-16 21:24:28 +08:00
Pig Fang
4bd1367d9e update php deps 2019-02-16 21:12:06 +08:00
Pig Fang
54dbd91975 fix ci config 2019-02-16 18:26:39 +08:00
Pig Fang
14f80ab573 attempt to fix again 2019-02-16 18:16:57 +08:00
Pig Fang
fe821c3e8b add coverage report 2019-02-16 18:08:41 +08:00
Pig Fang
91763122c7 update junit output 2019-02-16 17:47:33 +08:00
Pig Fang
2e81094d15 output test result in ci 2019-02-16 17:31:21 +08:00
Pig Fang
3ddb560e33 attempt to fix again 2019-02-16 17:02:28 +08:00
Pig Fang
8255765ce4 check plugin instance before retrieving version 2019-02-16 16:56:53 +08:00
Pig Fang
3d2a4b3df9 update ci config 2019-02-16 16:50:46 +08:00
Pig Fang
752bb80885 attempt to fix risky ops 2019-02-16 16:45:58 +08:00
Pig Fang
b6a4353d38 remove circleci 2019-02-16 16:43:47 +08:00
azure-pipelines[bot]
be4cddd450 Set up CI with Azure Pipelines (#3) 2019-02-16 16:42:23 +08:00
Pig Fang
fa7ba87eea Attempt to fix CI 2018-11-25 21:05:39 +08:00
Pig Fang
8a0992220a Update links 2018-11-25 15:12:53 +08:00
Pig Fang
c0cac28e72 Fix CI 2018-11-25 14:59:35 +08:00
Pig Fang
bbebc3c459 Clean up 2018-11-25 14:54:46 +08:00
Pig Fang
86397a6641 Fix risky tests 2018-11-25 14:32:14 +08:00
Pig Fang
f810232331 Use CircleCI 2018-11-25 14:31:14 +08:00
Pig Fang
657ea8cffa
Merge pull request #129 from printempw/move-entry 2018-11-25 07:35:54 +08:00
Pig Fang
b64e769f5a Copy plugin assets if version changed 2018-11-21 23:32:32 +08:00
Pig Fang
889e461bd6 Update the structure of plugins_enabled field 2018-11-21 22:53:27 +08:00
Pig Fang
091abbdf69 Move .htaccess 2018-10-20 10:41:40 +00:00
Pig Fang
02b7c6158d Process assets of plugins 2018-10-19 22:47:01 +08:00
Pig Fang
82ab3289db Fix favicon 2018-10-19 22:23:47 +08:00
Pig Fang
1e120d3ec7 Fix reading .env file 2018-10-19 21:43:25 +08:00
Pig Fang
12539d5f9d Modify path of front-end resources 2018-10-19 21:42:14 +08:00
Pig Fang
ca7c7087ff Move entrypoint to "public" dir 2018-10-19 21:32:15 +08:00
Pig Fang
61f657a197 lockfile maintenace 2018-10-19 19:45:43 +08:00
Pig Fang
19fe7460c9 fix babel transformation and remove webpack-cli 2018-10-15 21:27:39 +08:00
Pig Fang
14368e851c Upgrade deps 2018-10-15 20:36:03 +08:00
Pig Fang
01da6cb89f temporary fix vue-good-table 2018-10-09 20:57:39 +08:00
Pig Fang
adff1f9c97 lockfile maintenance 2018-10-09 20:57:20 +08:00
timgiroux
cfbfe60f89 change variable name from rawPasswd to rawPassword (#128) 2018-10-09 19:00:26 +08:00
Pig Fang
607c207e2c Update outdated .eslintignore 2018-09-29 20:59:42 +08:00
Pig Fang
54d12c5bf3 Replace with TerserPlugin without hacking 2018-09-25 21:38:56 +08:00
Pig Fang
ae7639c1d4 Update Babel config 2018-09-24 10:36:08 +08:00
Pig Fang
8ed5ea6fc5 Upgrade deps 2018-09-24 09:31:26 +08:00
Pig Fang
60478a3658 Update readme [skip ci] 2018-09-24 08:38:47 +08:00
Pig Fang
362a84d038 Update markdown files [skip ci] 2018-09-23 23:54:54 +08:00
Pig Fang
9def3808e3 Support frontend custom l10n text 2018-09-15 17:14:20 +08:00
Pig Fang
eedb7e8449 Refactor 2018-09-14 15:46:44 +08:00
Pig Fang
764c4ae94d Fix previewing high-res texture on upload page 2018-09-13 23:46:23 +08:00
Pig Fang
972c639730 Simplify code 2018-09-13 18:53:04 +08:00
Pig Fang
43051bad90 Finish button of BS update 2018-09-13 18:10:23 +08:00
Pig Fang
6bfe30b394 Always throw an Error instance 2018-09-11 23:29:02 +08:00
Pig Fang
205a8f54f0 Simplify fetch calls on high level 2018-09-11 18:56:01 +08:00
Pig Fang
ab34d7aa4f Add two events for closet 2018-09-10 21:32:42 +08:00
Pig Fang
8ee01b7adb Emit an event after previewer mounted 2018-09-10 18:37:43 +08:00
Pig Fang
0d6cc52d23 Regress for logging 2018-09-10 17:29:05 +08:00
Pig Fang
bfd71feac0 Update logging service 2018-09-09 13:00:10 +08:00
Pig Fang
9f0e08b84f Expose walkFetch method for plugins 2018-09-09 12:59:56 +08:00
Pig Fang
130d16a2f0 Reduce global variables pollution 2018-09-09 09:28:05 +08:00
Pig Fang
4cd1d91f39 Fix text update after state changed 2018-09-08 23:45:25 +08:00
Pig Fang
87100e9ae7 Expose internal function to global for plugins 2018-09-08 23:34:12 +08:00
Pig Fang
e355c8df68 Delay emitting mounted event 2018-09-08 21:26:25 +08:00
Pig Fang
d01daa4137 Regress to add parsedown to service container 2018-09-08 20:09:56 +08:00
Pig Fang
a09648c79d Rename service provider 2018-09-08 20:03:55 +08:00
Pig Fang
016367a0a8 Postpone the emitting 2018-09-08 15:39:14 +08:00
Pig Fang
4c40900910 Move emitting to each fetcher 2018-09-08 15:31:04 +08:00
Pig Fang
f0d4e5bfdb Add type definitions for event emitter 2018-09-08 15:27:41 +08:00
Pig Fang
4db7872c02 Emit an event after mounted 2018-09-08 14:40:53 +08:00
Pig Fang
cd43fb6f0e Fix retrieving csrf token 2018-09-08 14:31:08 +08:00
Pig Fang
23b360e8d7 Upgrade dependencies 2018-09-08 13:25:14 +08:00
Pig Fang
d32d72ee4d Upgrade dependencies 2018-09-08 11:56:00 +08:00
Pig Fang
955041cc41 Update badges 2018-09-08 10:36:00 +08:00
Pig Fang
8359967b16 Reduce text on player_name_length option 2018-09-08 10:30:24 +08:00
Pig Fang
6e4a1dfc6f Add more tests 2018-09-08 10:11:44 +08:00
Pig Fang
47207476ff Add more tests 2018-09-07 23:58:00 +08:00
Pig Fang
544b30c830 Fix for dropdown menu in admin panel 2018-09-07 22:26:34 +08:00
Pig Fang
f20e2bcfe3 Add tests for i18n 2018-09-07 10:44:57 +08:00
Pig Fang
f55412035d Add event emitter 2018-09-07 10:14:31 +08:00
Pig Fang
a864adbfb8 Fix sidebar menu for plugins 2018-09-06 23:14:54 +08:00
Pig Fang
5be159eede Prevent from replacing i18n data directly 2018-09-06 22:18:07 +08:00
Pig Fang
e69b8758e3 Fix tests 2018-09-06 19:31:35 +08:00
Pig Fang
f319bcd85a Bump version without release 2018-09-06 19:22:58 +08:00
Pig Fang
1a079c90c4 Upgrade to Laravel 5.7 2018-09-06 16:26:03 +08:00
Pig Fang
9b11f2cf9b Fix for test 2018-09-05 23:48:30 +08:00
Pig Fang
35488ecca1 Tweak 2018-09-05 23:34:53 +08:00
Pig Fang
825e376777 Drop support for IE 2018-09-05 23:27:02 +08:00
Pig Fang
f9db70676c Upgrade to Babel 7 2018-08-28 10:00:58 +08:00
Pig Fang
bc8319e20e Hoist module "toastr" 2018-08-24 09:08:34 +08:00
Pig Fang
af9cf005ff Fix toggling verification state 2018-08-23 11:13:54 +08:00
Pig Fang
932f9e9bb2 Update release script 2018-08-22 15:37:06 +08:00
Pig Fang
839bb88359 Fix loading fallback front-end l10n files 2018-08-22 10:27:30 +08:00
Pig Fang
36f9fee280 Fix loading css of admin page 2018-08-22 10:26:05 +08:00
Pig Fang
a790d21ee8 Fix update script 2018-08-22 10:21:05 +08:00
Pig Fang
4a23b8d858 Update release script 2018-08-22 10:19:53 +08:00
Pig Fang
808906a7b3 Remove debugbar from dependencies 2018-08-22 09:48:50 +08:00
Pig Fang
93bf63eda5 Add release scripts 2018-08-21 16:52:31 +08:00
Pig Fang
c09544d942 Fix for Font Awesome 5 2018-08-21 14:50:47 +08:00
Pig Fang
5fcb33bf16 Simplify code 2018-08-21 14:49:49 +08:00
Pig Fang
3dd5943e17 Use text field instead of html field in SweetAlert2 2018-08-21 14:49:16 +08:00
Pig Fang
0c82cd3950 Set model preference to slim when applying slim skin to new players 2018-08-21 14:47:37 +08:00
Pig Fang
7ec7eb2467 Fix big offset for Hook::addMenuItem 2018-08-21 14:43:46 +08:00
printempw
f1378367d7 Update email template 2018-08-21 14:36:42 +08:00
printempw
1f58f2f524 Fix logging out at homepage 2018-08-21 14:35:09 +08:00
printempw
0f869cac3e Update notice of unavailable plugins registry 2018-08-21 14:34:27 +08:00
printempw
ba6564a282 Update default plugins registry url 2018-08-21 14:34:06 +08:00
Pig Fang
83c675d2fc Fix OptionForm rendering on mobile 2018-08-21 12:04:04 +08:00
Pig Fang
e66a112713 Fix test 2018-08-21 11:14:22 +08:00
Pig Fang
9b3eff0f3a Change SweetAlert2 type in plugin update alert 2018-08-21 11:06:41 +08:00
Pig Fang
5a2c010f3b Fix verification status for first user 2018-08-21 11:03:57 +08:00
Pig Fang
313bc50103 Fix migration 2018-08-21 10:58:10 +08:00
Pig Fang
f3fab514a5 Add missing updates checking 2018-08-21 10:49:02 +08:00
Pig Fang
94652f4257 Fix URL processing 2018-08-21 10:40:37 +08:00
Pig Fang
43b8ca3b3f Upgrade deps 2018-08-21 10:18:20 +08:00
Pig Fang
7b8b9dc379 Add missing feedback function 2018-08-21 10:14:47 +08:00
Pig Fang
7103d52a6e Clean up 2018-08-21 09:13:43 +08:00
printempw
ce11b56444 Add update script for v3.5.0 2018-08-21 09:09:00 +08:00
printempw
fbafb8daa7 Allow HTML in tips of update scripts 2018-08-21 09:08:46 +08:00
printempw
abb3ced69c Update default APP_KEY 2018-08-21 09:07:22 +08:00
printempw
7e050ed632 Update initializing copyright_text option 2018-08-21 09:06:09 +08:00
Pig Fang
6eac8cf2c7 Restrict PluginController access to super admin only 2018-08-21 09:05:29 +08:00
Pig Fang
30c05ea9b8 Fix loading CSS on error page 2018-08-21 09:03:30 +08:00
Pig Fang
f058b92ca9 Make notice box on player page always expanded 2018-08-21 08:45:39 +08:00
Pig Fang
0a2f952056 Fix test 2018-08-20 23:33:31 +08:00
Pig Fang
1c2e3a19ca Add likes count to items on skinlib page 2018-08-20 23:30:05 +08:00
Pig Fang
d30f049111 Fix CSRF on upload page 2018-08-20 23:24:21 +08:00
Pig Fang
a8fa68a611 Fix CSRF verification for OptionForm 2018-08-20 23:14:05 +08:00
printempw
23b2abdfaf Fix form validation rules 2018-08-20 23:12:02 +08:00
Pig Fang
aff8e9f058 Fix CSRF verification 2018-08-20 23:09:26 +08:00
Pig Fang
1275ca92e3 Show FAQ link on fatal error modal 2018-08-20 22:45:06 +08:00
printempw
e6d35dd400 Update translations 2018-08-20 22:39:14 +08:00
printempw
ef3f9fccaa Allow customizing homepage by overriding translation strings 2018-08-20 22:23:41 +08:00
Pig Fang
dd2f2030da Optimize deleting element from array 2018-08-20 22:19:05 +08:00
Pig Fang
da8ac77ace Add webpack alias 2018-08-20 21:39:27 +08:00
Pig Fang
98d228da4c Fix front-end resources 2018-08-19 19:02:22 +08:00
Pig Fang
4e10159781 Fix cleaning up 2018-08-19 18:38:05 +08:00
Pig Fang
cf03da0a2e Update tests 2018-08-19 18:28:38 +08:00
Pig Fang
e6e989281c Fix tests 2018-08-19 17:54:00 +08:00
Pig Fang
47a0a24a5e Remove datatables package 2018-08-19 17:53:54 +08:00
Pig Fang
f6d022c377 Add plugins management page 2018-08-19 17:39:33 +08:00
Pig Fang
32104da31f Change view extension from .tpl to .blade.php 2018-08-19 11:53:24 +08:00
Pig Fang
6b4812b251 Add plugin marketplace 2018-08-19 11:39:14 +08:00
printempw
f25fdad9dc Fix test of getting plugin data 2018-08-18 09:58:03 +08:00
printempw
7797d16b04 Support more mail drivers 2018-08-18 09:49:09 +08:00
Pig Fang
37bdaceeb9 Fix tests 2018-08-18 09:48:39 +08:00
Pig Fang
fc16a98987 Enable session encryption 2018-08-18 09:48:33 +08:00
printempw
5b3b2da64c Specify update source by environment variable 2018-08-17 23:29:14 +08:00
printempw
e1d686d1a7 Use Guzzle to request update source 2018-08-17 23:24:30 +08:00
Pig Fang
ad32b718eb Use guzzle to download update packages 2018-08-17 23:24:08 +08:00
Pig Fang
0cedd45cd7 Add new package guzzlehttp/guzzle 2018-08-17 23:02:47 +08:00
printempw
b7018e1f59 Add certificate and user agent config for http requests 2018-08-17 22:55:59 +08:00
printempw
6d505d275b Fix Hook::registerPluginTransScripts method 2018-08-17 22:54:54 +08:00
Pig Fang
2305a80102 Remove Utils class 2018-08-17 22:54:26 +08:00
printempw
8139bb7b0f Tweak code style of App\Services\Hook 2018-08-17 22:24:18 +08:00
printempw
6775728c50 Remove "Expires" header from png responses 2018-08-17 22:22:58 +08:00
printempw
16dbc6cff0 Fix timezone of Last-Modified header 2018-08-17 22:02:05 +08:00
Pig Fang
3ac4a98ecb Add helper function format_http_date 2018-08-17 21:41:11 +08:00
Pig Fang
57bf10dbc5 Remove DetectLanguagePrefer middleware from static routes 2018-08-17 21:40:28 +08:00
Pig Fang
b7f0a5b23e Add "quick apply" button at skinlib.show page 2018-08-17 21:38:44 +08:00
Pig Fang
799ccf83ec Add notice for applying textures from closet 2018-08-17 17:52:08 +08:00
Pig Fang
4a72442fdb Add a option for requiring player name when register 2018-08-17 17:03:38 +08:00
Pig Fang
939d71923b Enhance rate limit for sending password reset email 2018-08-17 16:07:24 +08:00
Pig Fang
0ef92a5565 Update tests and composer autoload 2018-08-17 15:25:08 +08:00
Pig Fang
9000bd6916 Retrieve external data in data 2018-08-17 14:49:11 +08:00
Pig Fang
3bf29b529d Update tests 2018-08-17 14:44:22 +08:00
Pig Fang
b7b3e32f22 Remove unused code 2018-08-17 14:33:35 +08:00
Pig Fang
b5468cc143 Support email verification 2018-08-17 12:32:44 +08:00
Pig Fang
706ca1938b Update mail template of password reset 2018-08-16 18:10:09 +08:00
Pig Fang
daaedeed7e Update URI processing of web servers 2018-08-16 18:01:16 +08:00
Pig Fang
40deffb3b9 Limit login attempts by IP address 2018-08-16 17:57:24 +08:00
Pig Fang
bf8ec12645 Support changing texture model from skinlib 2018-08-16 17:42:54 +08:00
Pig Fang
f83d5850a1 Remove unused deps 2018-08-16 16:52:38 +08:00
Pig Fang
d657e88dd8 Fix risky test 2018-08-16 16:46:46 +08:00
Pig Fang
767436610c Clean up 2018-08-16 16:38:21 +08:00
Pig Fang
71cd20052b Remove unused files 2018-08-16 16:36:19 +08:00
Pig Fang
deda5cf11c Add skin library "show" page 2018-08-16 16:34:27 +08:00
Pig Fang
d39f95d634 Fix polyfill 2018-08-16 15:22:58 +08:00
Pig Fang
2f9ded7646 Fix render escaped l10n 2018-08-16 15:12:48 +08:00
Pig Fang
298dfc1064 Enable more ESLint rules 2018-08-16 14:50:11 +08:00
Pig Fang
c3f8044743 Add ESLint rule "indent" 2018-08-16 14:21:35 +08:00
Pig Fang
733e694ba0 Add "upload" page 2018-08-15 16:44:21 +08:00
Pig Fang
a573f0efe3 Retrieve initial data from query string 2018-08-14 23:45:32 +08:00
Pig Fang
f17cc18995 Prevent possible XSS 2018-08-14 23:43:56 +08:00
Pig Fang
190e54578a Add index page of skin library 2018-08-14 23:27:36 +08:00
Pig Fang
7e4ae5381b Use server side table 2018-08-13 11:08:14 +08:00
Pig Fang
f71a9b3dd8 Remove old JavaScript files 2018-08-12 17:56:00 +08:00
Pig Fang
d32eb379ba Add "reset" page 2018-08-12 17:50:04 +08:00
Pig Fang
96af04433c Support retrieving route params 2018-08-12 17:33:30 +08:00
Pig Fang
85d9677a64 Tweak imports 2018-08-12 17:17:54 +08:00
Pig Fang
131540e3f1 Add "forgot" page 2018-08-12 16:09:20 +08:00
Pig Fang
b3876468b2 Fix validating captcha 2018-08-12 16:00:21 +08:00
Pig Fang
b343707978 Add register page 2018-08-12 11:16:57 +08:00
Pig Fang
59e4bf628e Fix serializing data from Blade to JavaScript 2018-08-12 10:46:18 +08:00
Pig Fang
c0ac92604f Revert: fix button state 2018-08-12 10:34:09 +08:00
Pig Fang
a9e4827e32 Fix test 2018-08-12 10:01:13 +08:00
Pig Fang
4470b7ba9c Add missing logout 2018-08-12 09:31:50 +08:00
Pig Fang
0889276494 Fix button state 2018-08-12 09:31:35 +08:00
Pig Fang
b29caca472 Extract style 2018-08-12 09:18:45 +08:00
Pig Fang
718ec2f7b4 Add login page 2018-08-12 08:56:42 +08:00
Pig Fang
7cfb961e2b Use Jest's fake timers 2018-08-12 08:55:42 +08:00
Pig Fang
fea37bc512 Fix HTTP headers 2018-08-12 08:48:42 +08:00
Pig Fang
5778605417 Remove a babel plugin 2018-08-11 15:10:19 +08:00
Pig Fang
f7d156ac79 Remove old JavaScript files 2018-08-11 15:09:17 +08:00
Pig Fang
be798afe5c Remove old css file 2018-08-11 11:59:59 +08:00
Pig Fang
ca1f5fdb69 Add players page 2018-08-11 11:59:11 +08:00
Pig Fang
519782e0f3 Use content hash for better cache 2018-08-11 09:16:53 +08:00
Pig Fang
9b846a4733 Update css of skin previewer 2018-08-10 15:15:40 +08:00
Pig Fang
c9e92bbbbb Add missing css 2018-08-10 14:59:34 +08:00
Pig Fang
d566c3bc31 Fix test 2018-08-09 17:36:19 +08:00
Pig Fang
7fdb6da915 Case 2018-08-09 17:08:07 +08:00
Pig Fang
516a7b4798 Add "change color" box 2018-08-09 17:07:20 +08:00
Pig Fang
cb95c40055 Update config of webpack-serve 2018-08-09 16:20:05 +08:00
Pig Fang
9699a4434a Remove unused content 2018-08-09 15:37:51 +08:00
Pig Fang
6d4db993e4 Fix risky test 2018-08-09 15:34:36 +08:00
Pig Fang
887fcbdc90 Add players management page 2018-08-09 15:34:21 +08:00
Pig Fang
365f38c781 Use webpack-serve 2018-08-09 09:31:34 +08:00
Pig Fang
9e92684593 Fix <small> font size 2018-08-08 18:33:12 +08:00
Pig Fang
ceadadbe95 Change font awesome icon 2018-08-08 18:19:21 +08:00
Pig Fang
e3b5cbc36f Hot reload for development 2018-08-08 18:17:11 +08:00
Pig Fang
ca9a025fad Update style of admin panel 2018-08-08 15:39:05 +08:00
Pig Fang
05c6ce13bc Fix linting warning 2018-08-08 15:33:06 +08:00
Pig Fang
023968ef9d Copy Chart.js as-is 2018-08-08 15:30:26 +08:00
Pig Fang
b0bdc3e7b2 Upgrade to Font Awesome 5 2018-08-08 12:30:50 +08:00
Pig Fang
f0e177d62d Add user dashboard page 2018-08-08 09:50:35 +08:00
Pig Fang
061f7ff6f8 Fix HTTP method of user signing 2018-08-07 09:54:56 +08:00
Pig Fang
4e9c0b9d45 Fix style of home page 2018-08-07 09:25:20 +08:00
Pig Fang
0198cf84f5 Use Minecraft font for logo 2018-08-06 18:44:01 +08:00
Pig Fang
8fd5350ee3 Fix sweetalert2 style 2018-08-06 18:37:00 +08:00
Pig Fang
c333720fa3 Fix querying single user 2018-08-06 18:26:42 +08:00
Pig Fang
472477efa0 Fix form style 2018-08-06 16:51:04 +08:00
Pig Fang
6c6c01fb16 Use fetch and remove axios 2018-08-06 13:16:10 +08:00
Pig Fang
6a14339c56 Add "Users Management" page 2018-08-06 12:14:20 +08:00
Pig Fang
79eb2a3be0 Ignore test utils 2018-08-06 09:48:27 +08:00
Pig Fang
8a83a176ce Add flushPromises for tests 2018-08-06 09:30:54 +08:00
Pig Fang
5e4bc4b564 Use Fetch API 2018-08-05 15:33:08 +08:00
Pig Fang
a2e6315198 Simplify input validator 2018-08-05 14:36:44 +08:00
Pig Fang
33de864504 Add more ESLint rules and format 2018-08-05 09:47:29 +08:00
Pig Fang
3c2aa37967 Optimize webpack build 2018-08-04 10:22:16 +08:00
Pig Fang
9765122df4 Extract license comments 2018-08-04 09:12:04 +08:00
Pig Fang
270d2a335b Add webpack-bundle-analyzer 2018-08-04 09:02:45 +08:00
Pig Fang
b0097eacbd Remove pre-script section 2018-08-03 16:30:34 +08:00
Pig Fang
43afaa3e8d Optimize loading fonts 2018-08-03 10:35:06 +08:00
Pig Fang
2927090bb7 Optimize webpack build 2018-08-02 23:02:13 +08:00
Pig Fang
3dfa5c6e4e Add profile page 2018-08-02 17:29:43 +08:00
Pig Fang
d946810c46 Fix css of toastr 2018-08-02 15:01:07 +08:00
Pig Fang
5788fb93c1 Disallow to delete administrator 2018-08-02 10:21:25 +08:00
Pig Fang
7e72e3c01b Update global style 2018-08-02 09:52:20 +08:00
Pig Fang
b7f0ddd7f0 Add closet page 2018-08-02 09:45:33 +08:00
Pig Fang
5bccfd3d26 Mock assets files 2018-08-01 22:36:12 +08:00
Pig Fang
ba25161515 Remove some packages 2018-08-01 15:02:57 +08:00
Pig Fang
379ddd5251 Update test infrastructure 2018-07-31 22:58:35 +08:00
Pig Fang
72946e2474 Add more TypeScript declarations 2018-07-31 22:20:42 +08:00
Pig Fang
f97504d164 Update mock 2018-07-31 17:05:24 +08:00
Pig Fang
7ab91a568d Change module mapping 2018-07-31 10:42:14 +08:00
Pig Fang
21dfb21c41 Use swal.mixin 2018-07-31 10:37:34 +08:00
Pig Fang
7206f5952b Upgrade sweetalert2 to v7 2018-07-31 10:19:51 +08:00
Pig Fang
8d23a14c79 Disable console output in unit test 2018-07-31 10:18:14 +08:00
Pig Fang
0423bef836 Fix running jQuery plugins 2018-07-31 09:16:56 +08:00
Pig Fang
b1faa99a90 Update Babel config 2018-07-30 17:44:18 +08:00
Pig Fang
7985321022 Add default skin 2018-07-30 15:45:29 +08:00
Pig Fang
7b000bcab0 Add method for retrieving all players 2018-07-30 15:45:08 +08:00
Pig Fang
6102d27530 Support retrieving avatar by tid 2018-07-30 15:18:33 +08:00
Pig Fang
6c6cecc5bd Add missing l10n 2018-07-30 11:43:31 +08:00
Pig Fang
5b72834c62 Add missing style 2018-07-30 11:42:10 +08:00
Pig Fang
821357cf35 Add fonts 2018-07-30 11:24:36 +08:00
Pig Fang
2eb6e294cf Fix test 2018-07-30 09:52:39 +08:00
Pig Fang
1a475b5bc8 Update webpack config 2018-07-30 09:45:37 +08:00
Pig Fang
7072481f90 Update Babel config 2018-07-30 09:45:15 +08:00
Pig Fang
f88096a15f Use PostCSS 2018-07-30 09:45:01 +08:00
Pig Fang
b666f59554 Fix Promise polyfill 2018-07-30 09:05:15 +08:00
Pig Fang
9e3d663a7d Disable ESLint on old files 2018-07-30 09:04:58 +08:00
Pig Fang
48704bd3ce Support front-end i18n 2018-07-29 18:56:07 +08:00
Pig Fang
0c1e225364 Remove ESLint globals 2018-07-29 15:32:10 +08:00
Pig Fang
e69e7be1d9 Use webpack instead of parcel 2018-07-29 15:31:54 +08:00
Pig Fang
d3abbcdf82 Update test 2018-07-29 08:50:25 +08:00
Pig Fang
f43ce12a87 Add polyfill for IE 2018-07-28 11:12:25 +08:00
Pig Fang
3946314ae0 Update test 2018-07-27 18:54:39 +08:00
Pig Fang
862468f51f Update badges [skip ci] 2018-07-27 18:11:57 +08:00
Pig Fang
4f0827f834 Update ESLint config 2018-07-27 17:48:12 +08:00
Pig Fang
ee7ee72530 Upgrade dependencies 2018-07-27 17:15:37 +08:00
Pig Fang
18274d4d22 Add missing files 2018-07-27 16:54:36 +08:00
Pig Fang
e7c2ceeeb4 Simplify npm scripts 2018-07-27 16:50:19 +08:00
Pig Fang
69e9641bf4 Add test for component "ClosetItem" 2018-07-27 16:17:22 +08:00
Pig Fang
83c40cfd40 Update Jest config 2018-07-27 16:16:36 +08:00
Pig Fang
9eeaf5989e Remove unused line 2018-07-27 11:56:07 +08:00
Pig Fang
c120c58dda Add Vue component for skinview3d 2018-07-27 09:54:23 +08:00
Pig Fang
608f3fbe4b Get ready for test 2018-07-27 09:53:14 +08:00
Pig Fang
f6dec9d447 Get ready for using Vue.js 2018-07-25 15:32:08 +08:00
Pig Fang
148b6f6cc5 Apply two new middlewares 2018-07-24 09:58:10 +08:00
Pig Fang
c3934702e0 Update test 2018-07-23 10:11:04 +08:00
Pig Fang
35832a6993 Add Mailable test 2018-07-23 09:33:55 +08:00
Pig Fang
93b3a165ab Tweak service providers for code readability 2018-07-23 09:20:21 +08:00
Pig Fang
3cf5c646c6 Refactor 2018-07-22 18:54:37 +08:00
Pig Fang
11afeea08d Add L10n support for program copyright style 2018-07-22 16:46:37 +08:00
Pig Fang
5e3e2bf688 Return 204 instead of 200 for CDN cache 2018-07-22 16:42:58 +08:00
Pig Fang
e30e538d5f Support connecting to Redis with unix socket 2018-07-22 16:37:59 +08:00
Pig Fang
26e81eba6e Refactor 2018-07-22 16:37:39 +08:00
Pig Fang
e60d73b410 Remove bs_announcement function and parsedown 2018-07-22 16:32:34 +08:00
Pig Fang
d05cd4aab2 Throw PrettyPageException when cipher is invalid 2018-07-22 16:23:49 +08:00
Pig Fang
d16483bacb Add custom HTTP-500 error page 2018-07-22 16:16:29 +08:00
Pig Fang
e2703aad84 Use helper function report 2018-07-22 11:36:00 +08:00
Pig Fang
5a9c9a6d3a Ignore cipher-related files 2018-07-22 11:33:09 +08:00
Pig Fang
aa149f4f3e Allow overriding translations 2018-07-22 11:06:16 +08:00
Pig Fang
02ba6ed3df Allow overriding views 2018-07-22 10:58:29 +08:00
Pig Fang
60996020f4 Fix test 2018-07-22 10:50:01 +08:00
Pig Fang
9700bf11e3 Fix test 2018-07-22 10:34:24 +08:00
Pig Fang
11b6078c57 Add error control for retrieving textures 2018-07-22 10:00:30 +08:00
Pig Fang
1dc145cc9a Generate random salt and app key by default 2018-07-22 09:39:27 +08:00
Pig Fang
10a0cd09db Add option for denying directly downloading textures 2018-07-22 09:38:42 +08:00
Pig Fang
6031562851 Simplify environment check when booting 2018-07-21 18:43:33 +08:00
Pig Fang
0da5c0ce41 Fix handling validation errors 2018-07-21 17:56:04 +08:00
Pig Fang
b2a514d3fe Remove unused code 2018-07-21 17:55:44 +08:00
Pig Fang
ad99714882 Fix handling validation errors 2018-07-21 17:50:48 +08:00
Pig Fang
0233e44ccd Add a setup step to fill database info 2018-07-21 16:55:36 +08:00
Pig Fang
07e5d8b3ec Update route for captcha 2018-07-21 08:21:42 +08:00
Pig Fang
8bd60624a0 Fix validating captcha 2018-07-21 08:17:16 +08:00
Pig Fang
201fe21e6d Update PHP requirement 2018-07-20 17:32:27 +08:00
Pig Fang
0ded695295 Nickname is required in setup 2018-07-20 17:23:54 +08:00
Pig Fang
712b754c09 Fix i18n 2018-07-20 16:51:45 +08:00
Pig Fang
5b1667d798 Add regexp rule support for texture name 2018-07-20 15:41:15 +08:00
Pig Fang
4fd3a07224 Update .env files 2018-07-20 15:14:10 +08:00
Pig Fang
a646d76bf3 Remove cipher CrazyCrypt1 2018-07-20 15:07:48 +08:00
Pig Fang
fdf618b2be Use Laravel's auth system and use another captcha generator 2018-07-20 14:42:43 +08:00
Pig Fang
c783285a16 Disable collecting auth in debugbar 2018-07-19 11:46:26 +08:00
Pig Fang
24b2107c48 Fix processing cookies after deleting user 2018-07-19 10:46:01 +08:00
Pig Fang
389de2aa84 Refactor 2018-07-19 10:33:28 +08:00
Pig Fang
fa1c780786 Rename method on User model 2018-07-19 10:31:44 +08:00
Pig Fang
3c24a166e8 Use signed URL to simplify resetting password 2018-07-18 11:04:34 +08:00
Pig Fang
fa7bc18364 add IDE helper 2018-07-18 10:36:55 +08:00
Pig Fang
9c4cd920d7 fix route 2018-07-17 17:25:54 +08:00
Pig Fang
7820616b77 use Route::view and Route::redirect 2018-07-17 17:17:31 +08:00
Pig Fang
e6fb9d5e4c update editorconfig 2018-07-17 11:09:13 +08:00
Pig Fang
c6d8108c8c use @lang directive 2018-07-17 11:06:55 +08:00
Pig Fang
a8a3ba4ec9 add types shims 2018-07-17 09:39:14 +08:00
Pig Fang
3df2f2dda9 use Blade::if to check if a user is admin 2018-07-17 09:29:10 +08:00
Pig Fang
556f8268f3 optimize for loop in test 2018-07-16 16:01:58 +08:00
Pig Fang
29c004da9c fix test 2018-07-16 11:54:42 +08:00
Pig Fang
9cd6e0945d booleanify public property 2018-07-16 11:10:01 +08:00
Pig Fang
0f7d44a2c9 refactor tests 2018-07-16 10:22:19 +08:00
Pig Fang
9f2cf446b1 remove out-dated config file 2018-07-15 22:58:48 +08:00
Pig Fang
c374a25f5a remove out-dated code 2018-07-15 22:54:19 +08:00
Pig Fang
0ba04749f7 add one more directory permission check 2018-07-15 22:07:40 +08:00
Pig Fang
a53743862f fix risky test 2018-07-15 18:34:38 +08:00
Pig Fang
4fce311046 use localized site name in mail 2018-07-15 18:19:23 +08:00
Pig Fang
590f62d035 use mail.driver to determine whether password reset is disabled 2018-07-15 18:18:56 +08:00
Pig Fang
5a0908517e log the exceptions thrown by email service in detail 2018-07-15 18:15:55 +08:00
Pig Fang
306650fcdd add debugbar config 2018-07-15 18:14:44 +08:00
Pig Fang
d9c0c2140c update composer.lock 2018-07-15 18:14:34 +08:00
Pig Fang
209d74ab7a use mailable 2018-07-15 17:42:03 +08:00
Pig Fang
ca684d14d8 update phpunit config 2018-07-15 16:41:38 +08:00
Pig Fang
aa00c65a7a hack for test 2018-07-14 15:44:52 +08:00
Pig Fang
c7f6b6ba8d update ci config 2018-07-14 15:14:29 +08:00
Pig Fang
65f1596eae fix test of SkinlibController 2018-07-14 15:03:05 +08:00
Pig Fang
f3ef8d30f1 update php version requirement 2018-07-14 14:53:41 +08:00
Pig Fang
437bec5b63 add new configs for laravel 5.6 2018-07-14 14:48:20 +08:00
Pig Fang
7c20f1ab49 upgrade laravel to 5.6 2018-07-14 14:48:01 +08:00
Pig Fang
67b8c698b0 update php version requirement 2018-07-14 09:08:37 +08:00
Pig Fang
1c44b7e416 update travis ci config 2018-07-14 09:07:18 +08:00
Pig Fang
ec5eaeff81 remove unused code 2018-07-14 09:05:20 +08:00
Pig Fang
28cef74dd1 remove patches 2018-07-14 08:59:45 +08:00
Pig Fang
b520a464cb remove hack for test 2018-07-14 08:41:25 +08:00
Pig Fang
b6cda88ae4 fix test 2018-07-14 08:27:15 +08:00
Pig Fang
3f78b3755a fix catching ValidationException 2018-07-13 23:22:20 +08:00
Pig Fang
709baae712 fix and revert 2018-07-13 23:19:59 +08:00
Pig Fang
5b485b7b10 laravel api renaming 2018-07-13 22:57:01 +08:00
Pig Fang
c82d9e55a4 fix l10n on option form 2018-07-13 22:56:48 +08:00
Pig Fang
97d2d9cac2 upgrade laravel to 5.5 and other deps 2018-07-13 22:56:22 +08:00
Pig Fang
29576fd08e method renaming 2018-07-13 21:23:07 +08:00
Pig Fang
7524041a76 use Mail::fake() 2018-07-13 19:23:20 +08:00
Pig Fang
3f77c98783 fix tests of SkinlibController 2018-07-13 19:02:16 +08:00
Pig Fang
b74cc0dd59 fix tests of AdminController 2018-07-13 16:48:15 +08:00
Pig Fang
f8052b9c9b update tests of UpdateController 2018-07-13 16:42:05 +08:00
Pig Fang
d3486f3a40 add laravel/browser-kit-testing 2018-07-13 16:41:50 +08:00
Pig Fang
68d3fb1eb4 fix tests of UserController 2018-07-13 16:24:19 +08:00
Pig Fang
d1442902b2 fix tests of PlayerController 2018-07-13 16:14:49 +08:00
Pig Fang
4c44fa47cd fix tests of plugin hook 2018-07-13 16:10:23 +08:00
Pig Fang
4e6478c8f9 fix tests of middlewares 2018-07-13 16:05:20 +08:00
Pig Fang
f9774e9275 fix tests of HomeController 2018-07-13 15:52:42 +08:00
Pig Fang
d65d6e298e fix tests of ClosetController 2018-07-13 15:51:17 +08:00
Pig Fang
d859d9ce49 fix tests of PluginController 2018-07-13 15:38:22 +08:00
Pig Fang
b1974ffafd fix tests of SetupController 2018-07-13 15:26:19 +08:00
Pig Fang
3143cf0838 fix tests of TextureController 2018-07-13 15:21:13 +08:00
Pig Fang
aa68641eba fix tests of AuthController 2018-07-13 15:13:35 +08:00
Pig Fang
e28f01abf3 upgrade laravel to 5.4 2018-07-13 10:19:29 +08:00
Pig Fang
8e2b2c78fc fix for tests 2018-07-12 17:18:19 +08:00
Pig Fang
2cea484f50 fix for test 2018-07-12 10:52:58 +08:00
Pig Fang
023a48aa8a upgrade phpunit to v5 2018-07-12 10:35:52 +08:00
Pig Fang
3748c8ecd5 upgrade deps 2018-07-12 09:23:32 +08:00
Pig Fang
7bd7deca37 refactor: retrieve closet in skin library 2018-07-12 08:56:44 +08:00
Pig Fang
0c7878f494 use pluck, lists was removed in 5.3 2018-07-11 16:45:38 +08:00
Pig Fang
85baa91a4a fix reading closet 2018-07-11 16:45:07 +08:00
Pig Fang
79746f9e81 use isEmpty on database query result 2018-07-11 16:11:52 +08:00
Pig Fang
16c2ba8b64 save closet after operations 2018-07-11 16:10:45 +08:00
Pig Fang
ef77bd7018 remove arguments in service providers 2018-07-11 16:09:54 +08:00
Pig Fang
e1b2f1806b add inline middleware to retrieve session 2018-07-11 16:09:22 +08:00
Pig Fang
5f3155baa4 fix closure arguments in Arr::where 2018-07-11 16:07:29 +08:00
Pig Fang
3db7799b65 fix handling exceptions 2018-07-11 16:06:10 +08:00
Pig Fang
15ff81d6bb update laravel to 5.3 2018-07-11 16:05:07 +08:00
Pig Fang
e1df46b7cd use stylus instead of sass 2018-07-10 14:19:58 +08:00
printempw
da34062a9c Add L10n support for site name and description 2018-07-06 14:49:39 +08:00
printempw
def8cc39b6 Add support for localized options 2018-07-06 14:46:25 +08:00
printempw
12b32fce3d Update introduction text about scores 2018-07-06 14:09:17 +08:00
printempw
f2477f437b Use composer/semver to compare versions
Remove Utils::versionCompare method.
2018-06-30 16:31:39 +08:00
printempw
40485253ec Refine hashing uploaded file
Remove Utils::upload method.
Add bs_hash_file helper function.
Add HashingFile event.
2018-06-30 16:05:00 +08:00
printempw
3d9478a75c Move Player::getBinaryTexture method to TextureController 2018-06-29 22:45:00 +08:00
printempw
815fef7f3d Enhance rendering notice for unsatisfied plugin dependencies 2018-06-29 20:54:40 +08:00
printempw
b4e8b7e8c9 Update tests of plugins 2018-06-29 18:26:48 +08:00
printempw
4da044146f Update the parameter of PluginManager::getUnsatisfiedRequirements method 2018-06-29 18:14:55 +08:00
printempw
967e1642d3 Update plugins management page for resolving dependencies 2018-06-29 16:45:43 +08:00
printempw
cae51b3a7a Add dependency definition for plugins 2018-06-29 15:55:56 +08:00
printempw
86a5631431 Add composer support for plugins 2018-06-28 23:32:27 +08:00
printempw
0a307e9221 Refine texture preview generation
The methods in App\Services\Minecraft now accept binary image data as their first parameter.
The parameters of Minecraft::generatePreviewFromSkin is reordered.
Fix skin preview for Alex model textures.
Add more parameters to Minecraft::generatePreviewFromCape for specifying image size.
2018-06-28 21:55:33 +08:00
printempw
334eb7c3c5 Clear unnecessary filesystems 2018-06-28 18:25:31 +08:00
printempw
657cfdfe36 Add an empty "plugins" directory 2018-06-28 13:31:43 +08:00
printempw
a2be506272 Remove git submodule "plugins" 2018-06-28 13:30:26 +08:00
printempw
c45b478de2 Add .env variables for customizing the path to load plugins from 2018-06-28 12:32:58 +08:00
printempw
89ae8480da Remove dependency on php extension fileinfo 2018-06-19 21:04:15 +08:00
printempw
f24aeb5a7a Add l10n support for announcement and copyright text, close #115 2018-06-19 19:57:33 +08:00
printempw
e7f95fe956 Add short description for setting model preference 2018-06-19 17:45:43 +08:00
printempw
c9f9a8ddb2 Fix placeholder of OptionFormText 2018-06-19 12:35:01 +08:00
printempw
abde385776 Add more validation rules for player name 2018-06-19 11:51:34 +08:00
printempw
6926ae21ff Use swal to show error message when adding players 2018-06-19 11:47:50 +08:00
printempw
b7a2d368f7 Fix maximum password length 2018-06-19 00:23:20 +08:00
printempw
53fd30f093 Add placeholder method to OptionFormText 2018-06-18 21:50:10 +08:00
printempw
64b904107a Update the text on console 2018-06-17 14:42:55 +08:00
printempw
36064873e3 Revert "Add a option for adding a player after registered"
This feature will be implemented as a plugin. This reverts commit ad255252b57b135ddecf89aa1331c40c97324be9.
2018-06-15 22:44:30 +08:00
Pig Fang
a2ad367651 feat: better DataTables AJAX error 2018-03-18 10:49:49 +08:00
Pig Fang
924fedc116 chore: update .gitignore 2018-03-18 09:48:30 +08:00
Pig Fang
ef2e44c5e9 test: fix coverage 2018-03-11 12:36:23 +08:00
Pig Fang
520a9c3b97 test: fix coverage 2018-03-11 12:01:14 +08:00
Pig Fang
3d99e9a88e chore: update .gitignore 2018-03-11 12:00:43 +08:00
Pig Fang
f3220ee526 test: disconnect database after each test 2018-03-11 11:20:21 +08:00
printempw
18c0755aa2 Update plugins to support BS v3.4.0+ 2018-02-25 12:24:39 +08:00
printempw
2da122f5cf Add custom user-agent support for Utils::download 2018-02-25 12:24:31 +08:00
printempw
6cb26bf2d8 Update tests for PluginController 2018-02-25 11:23:07 +08:00
printempw
c0ae401600 Update default site name 2018-02-25 09:19:48 +08:00
printempw
9c5a48f2a8 Remove invalid Database facade 2018-02-25 09:19:18 +08:00
printempw
8c7970f17c Update .gitignore 2018-02-24 21:56:06 +08:00
printempw
073748e50b Bump version to v3.4.0 2018-02-24 21:52:45 +08:00
printempw
f0c598c11c Add PHP 7.2 test in Travis CI 2018-02-24 21:29:23 +08:00
printempw
f94886ce2f Update gulpfile.js 2018-02-24 20:08:57 +08:00
printempw
7cf044b2ce Fix adding private textures to closet for admins 2018-02-24 19:48:44 +08:00
printempw
6448b3bbab Set UTF-8 encoding for error messages 2018-02-24 19:21:04 +08:00
printempw
62af291091 Add button to clear selected textures in closet 2018-02-24 18:14:15 +08:00
printempw
4c54a391be Remove package fx3costa/laravelchartjs 2018-02-24 17:08:32 +08:00
printempw
da48fd84dc Adjust allowed maximum password length to 32 2018-02-24 16:32:19 +08:00
printempw
efe5c6229c Update initialization of datatables 2018-02-24 15:59:56 +08:00
printempw
a13d5a947a Fix tooltips on data tables 2018-02-24 13:51:32 +08:00
printempw
31391be8c3 Use laravelchartjs package to generate overview chart 2018-02-24 13:33:24 +08:00
printempw
4d8856e0f4 Adjust canvas style of skinview3d 2018-02-24 13:31:37 +08:00
printempw
459439f132 Fix tests for skinview3d 2018-02-24 00:08:24 +08:00
printempw
249c9f290d Avoid operating skinViewer instance directly outside the module 2018-02-24 00:08:09 +08:00
printempw
0373c0ada6 Remove tests for texture-preview module 2018-02-24 00:01:44 +08:00
printempw
d54709c23d Add default texture for alex model 2018-02-23 23:17:29 +08:00
printempw
0a0b25b5af Update initialization of skinview3d 2018-02-23 22:32:08 +08:00
printempw
76b607dfd2 Fix DOM selector of changing player name 2018-02-23 22:18:18 +08:00
printempw
d2d8eef15f Migrate to skinview3d completely 2018-02-23 22:16:51 +08:00
printempw
9505efb797 Update vendor i18n files 2018-02-23 18:51:29 +08:00
printempw
6d579f8b1e Add plugin configs to sidebar menu 2018-02-23 18:12:12 +08:00
printempw
ada46e567c Flatten multi-level sidebar menu of plugins 2018-02-23 17:21:21 +08:00
printempw
9bf7dccb64 Fix generating sidebar 2018-02-23 16:51:50 +08:00
printempw
98e27151ff Fix bootstrap tooltips 2018-02-23 16:26:53 +08:00
printempw
b876b99459 Switch to skinview3d on skinlib pages 2018-02-23 16:22:08 +08:00
printempw
0bb3ef55b3 Replace three.msp.js with skinview3d 2018-02-23 16:16:52 +08:00
printempw
2d43a05a54 Fix codebase due to dependencies update 2018-02-23 12:08:27 +08:00
printempw
9ec6477ef5 Update dependencies 2018-02-23 11:28:08 +08:00
printempw
5e00131db4 Fix tests for SQLite database 2018-02-23 10:22:11 +08:00
printempw
35c5b469a0 Add check for escapeshellarg function 2018-02-22 23:07:23 +08:00
printempw
3725ec26f7 Check existing tables before running database migrations 2018-02-22 22:29:25 +08:00
printempw
6a977b6de4 Add support for SQLite database 2018-02-22 21:38:23 +08:00
printempw
5889df5b63 Remove class App\Services\Database 2018-02-22 20:41:09 +08:00
printempw
8ceec96224 Optimize SQL queries on view admin.index 2018-02-22 19:17:40 +08:00
printempw
c2855e2e1d Add language alias for zh_HANS_CN 2018-02-22 18:32:53 +08:00
printempw
90af85d00f Fix using JavaScript protocol in a.href 2018-02-16 20:15:26 +08:00
printempw
3ebc206e7d Remove lib docCookies 2018-02-16 19:54:07 +08:00
printempw
a1cbac0afb Specify the user agent of requests by env variable 2018-02-16 18:32:54 +08:00
printempw
d01c18b379 Update tests for PluginController 2018-02-16 17:53:10 +08:00
printempw
dd3f645e80 Adjust code style due to my OCD 2018-02-16 17:31:10 +08:00
printempw
e05d2064b8 Update php DocBlocks for events 2018-02-16 16:29:37 +08:00
printempw
0bc68090a8 Fix file indentation due to .editorconfig 2018-02-16 15:44:36 +08:00
printempw
42e06e8954 Add .editorconfig 2018-02-16 15:39:55 +08:00
printempw
77f828c817 Use App::runningInConsole method 2018-02-14 13:51:45 +08:00
printempw
f73758ea25 Move issue template to root directory 2018-02-14 12:29:12 +08:00
printempw
7e6cc96e5e Return 403 instead when accessing private textures, close #111 2018-02-10 13:06:19 +08:00
printempw
dcc132700c Update copyright year to 2018 in README 2018-02-10 10:51:37 +08:00
printempw
30c98b734d Update ISSUE_TEMPLATE 2018-02-09 19:13:19 +08:00
printempw
40c8e69614 Update link of Chinese tutorial 2018-02-09 17:55:22 +08:00
printempw
59c18ea6c3 Update English README 2018-02-09 16:29:51 +08:00
printempw
a05b75b30b Update README
Also separate many README sections to individual wiki articles.
2018-02-09 16:24:33 +08:00
printempw
d580264d8c Update vendor packages to support PHP 7.2 2018-02-09 03:01:11 +08:00
printempw
288ad14b6d Update git submodule config 2018-02-09 02:57:12 +08:00
Pig Fang
14517b1638 fix(closet): fix closet json result 2018-01-14 19:57:06 +08:00
Pig Fang
74f17494a4 fix(i18n): clarify wrong password 2018-01-04 22:07:16 +08:00
Pig Fang
6f516cc2eb fix(preview): fix 2d skin preview for alex model 2018-01-04 13:10:41 +08:00
Pig Fang
acadfd73bb fix(i18n): fix wrong i18n key for "player" page 2018-01-01 23:02:18 +08:00
Pig Fang
49deeb3f99 perf(closet): update score after removing textures 2018-01-01 15:53:56 +08:00
Pig Fang
846f29ef6d style(js): stricter eslint rules (#108)
* style(js): stricter eslint rules

* build: ignore .eslintignore
2017-12-29 23:28:11 +08:00
Pig Fang
55a137f014 test(services): add tests for repositories 2017-12-28 12:52:29 +08:00
Pig Fang
776a0a67ae test(model): add tests for "User" model 2017-12-27 18:40:16 +08:00
Pig Fang
b1fa8c098b refactor(common): refactor polyfill of String.prototype.includes 2017-12-27 17:47:13 +08:00
Pig Fang
f4c21a0cb2 test(model): add tests for "player" model 2017-12-26 20:07:26 +08:00
Pig Fang
a5615eb090 test(model): add tests for "Closet" model 2017-12-26 19:32:17 +08:00
Pig Fang
325d150908 test: output tests result verbosely 2017-12-24 15:47:13 +08:00
Pig Fang
04a88a2e30 build: remove commonjs exports 2017-12-24 11:40:15 +08:00
Pig Fang
88502a3db1 test(all): remove console output when testing 2017-12-24 10:54:00 +08:00
Pig Fang
11852b81f1 chore(deps): Upgrade lib "regenerator" 2017-12-23 22:34:42 +08:00
Pig Fang
46c246b5ff Add empty "plugins" dir when packaging 2017-12-18 23:41:57 +08:00
Pig Fang
e33ac27d6c Do compilation before entering watching mode 2017-12-17 19:22:09 +08:00
Pig Fang
38b6307776 Remove unused code 2017-12-16 21:03:57 +08:00
Pig Fang
e4ee22ad75 Fix missing parameter 2017-12-16 11:15:18 +08:00
Pig Fang
bec9bdf3f3 Fix iterating items for closet and skin library
`for...of` is a feature of ES6,
however Babel will transpile this syntax to `Symbol.iterator()`,
which does not supported on IE11.
We won't add `Symbol` polyfill,
because it will increase JS file size.
`Array.prototype.reduce` is of ES5 and supported on IE11.
2017-12-16 11:03:37 +08:00
Pig Fang
76b6d68bc2 Update JSDoc 2017-12-09 15:32:25 +08:00
Pig Fang
26742e3ae3 Add tests for Services/Hook 2017-12-04 17:04:04 +08:00
Pig Fang
97874039c6 Add tests for Services/Minecraft 2017-12-04 15:11:23 +08:00
Pig Fang
a97128da1e Move "setTexture" function to "closet" 2017-12-04 14:41:53 +08:00
gplane
3e5e2cc0ec Update tests for middleware 2017-11-30 10:02:29 +08:00
gplane
946e0c12e3 Remove unused code 2017-11-29 17:02:11 +08:00
gplane
b834264c3e Update JavaScript tests 2017-11-29 13:52:32 +08:00
Pig Fang
4ebd54707e Update JavaScript tests 2017-11-26 23:57:52 +08:00
Pig Fang
14b7cc670c Update tests for PlayerController 2017-11-24 23:05:49 +08:00
Pig Fang
09ccae26c4 Use event listener instead of inline href
Using inline `href` to execute JavaScript in Firefox doesn't work.
2017-11-24 22:27:33 +08:00
Pig Fang
88f7fe6850 Fix wrong i18n detection on Edge & IE 2017-11-24 20:05:48 +08:00
Pig Fang
577c5ab8df Use fallback locale for JavaScript in I18N 2017-11-24 20:03:44 +08:00
Pig Fang
157c9e8b22 Update tests for SkinlibController 2017-11-24 18:54:30 +08:00
Pig Fang
55c2fb38ac Update tests for SetupController 2017-11-20 19:56:24 +08:00
Pig Fang
163396c6d9 Update tests for HomeController 2017-11-20 00:04:28 +08:00
Pig Fang
2e5c1f7890 Use VFS for testing 2017-11-19 12:49:24 +08:00
Pig Fang
79038d3c63 Add PHP 5.5 in Travis CI 2017-11-18 23:41:37 +08:00
Pig Fang
1ab25e80e6 Add tests for UpdateController 2017-11-18 20:36:31 +08:00
Pig Fang
99aee71cc8 Add tests for UserController 2017-11-18 13:25:08 +08:00
Pig Fang
7d48c6a609 Use "memory" driver for testing 2017-11-17 17:46:06 +08:00
Pig Fang
6cd5fce271 Download plugins in setUp function 2017-11-17 07:56:43 +08:00
Pig Fang
a413927980 Add tests for TextureController 2017-11-17 07:40:29 +08:00
Pig Fang
b19565bf8b Add tests for PluginController 2017-11-16 14:09:08 +08:00
Pig Fang
faa73bebc9 Do some checks before updating player profile 2017-11-15 14:00:11 +08:00
Pig Fang
aaf612f2d9 Add tests for PlayerController 2017-11-14 23:25:04 +08:00
printempw
6b2393e9e9 Bump version to v3.3.2 2017-11-09 21:20:42 +08:00
printempw
81b76d12ce Fix regenerator-runtime 2017-11-09 20:51:28 +08:00
printempw
2612bf1cfe Update gulp script 2017-11-09 20:50:56 +08:00
printempw
9f19897528 Tweak i18n text 2017-11-09 20:49:15 +08:00
printempw
f8e033db15 Fix CI configuration 2017-11-09 18:24:23 +08:00
printempw
dd75c20464 Update composer dependencies 2017-11-09 16:54:50 +08:00
printempw
08afd5df89 Fix checking specific environment file 2017-11-09 16:32:18 +08:00
printempw
e5db3a720c Update configuration of Travis CI 2017-11-09 16:22:23 +08:00
printempw
488691afa4 Merge branch 'master' of github.com:printempw/blessing-skin-server 2017-11-09 16:20:14 +08:00
printempw
ef7f75b184 Add dotenv file for testing 2017-11-09 12:09:41 +08:00
printempw
fc83b1ba0a Update composer autoload-dev and gulp script 2017-11-09 12:08:30 +08:00
Pig Fang
42a5426881 Add sourcemap for development 2017-11-08 23:18:47 +08:00
Pig Fang
544a6ae56a Update README 2017-11-08 19:11:44 +08:00
Pig Fang
622885d9c0 Update tests of AdminController 2017-11-08 17:57:12 +08:00
Pig Fang
42a42ef8c7 Use async/await and update tests 2017-11-08 13:33:03 +08:00
printempw
0f065ef202 Try to avoid using site url which ends with index.php #101 2017-11-07 21:40:53 +08:00
printempw
788a30a26e Update .htaccess 2017-11-07 21:31:16 +08:00
printempw
85b44fd31d Add license exceptions for plugins #98 2017-11-07 21:20:32 +08:00
printempw
6c7b494f16 Fix #104 2017-11-07 20:45:29 +08:00
printempw
64d8b44a13 Adjust the position of auto-add-player checkbox 2017-11-07 20:08:03 +08:00
printempw
72bf7d084b Adopt shorter URL in .env.example 2017-11-07 19:52:27 +08:00
Pig Fang
c1c01d5b03 Use babel-preset-env and regenerator 2017-11-06 16:48:53 +08:00
Pig Fang
6a5a198b1d Fix missing texture type after renaming item in closet 2017-11-06 16:19:59 +08:00
Pig Fang
9eb21ada8b Update gulpfile.js 2017-11-06 11:24:01 +08:00
Pig Fang
594954dbe2 Make responsive for closet
fix #89
2017-11-06 11:07:24 +08:00
Pig Fang
4d21fb5b02 Add event assertion for AuthController 2017-11-06 07:46:43 +08:00
printempw
c345b4dab3 Merge pull request #103 from g-plane/dev
Add a option for adding a player after registered
2017-11-05 21:16:12 +08:00
Pig Fang
bce4ed4a42 Add a option for adding a player after registered 2017-11-05 20:56:52 +08:00
Pig Fang
249ac1b505 Fix adding texture to closet 2017-11-05 19:29:30 +08:00
printempw
c14e52a663 Merge pull request #102 from g-plane/dev
Refactor `Closet` model
2017-11-05 17:20:20 +08:00
Pig Fang
739bc17c3a Refactor Closet model 2017-11-05 16:54:01 +08:00
Pig Fang
8d1adc7e4d Add security check before resetting password 2017-11-05 10:25:20 +08:00
Pig Fang
ed27972608 Add tests for ClosetController 2017-11-04 20:25:54 +08:00
Pig Fang
b6ffa970cf Add tests for AdminController 2017-11-04 20:25:54 +08:00
Pig Fang
abd27055c1 Add tests for AuthController 2017-11-04 20:25:54 +08:00
Pig Fang
2a895e1b88 Add tests for middleware and HomeController 2017-11-04 20:25:54 +08:00
Pig Fang
71438446fe Get ready for PHPUnit 2017-11-03 23:24:25 +08:00
gplane
74d6b55483 Add score check before setting privacy 2017-11-03 21:59:27 +08:00
gplane
3171d78d5e Fix npm script 2017-09-18 11:42:56 +08:00
gplane
1216bd3539 Update README 2017-08-23 10:40:07 +08:00
gplane
6df8babc7d Tweak i18n text 2017-08-19 08:50:27 +08:00
gplane
d32f942e2b Add issue template 2017-08-19 08:41:21 +08:00
printempw
70f3a0047f Update gulpfile.js 2017-08-10 14:25:29 +08:00
printempw
b948f27692 Fix signing out after changing password 2017-08-07 14:46:03 +08:00
printempw
52281dd25c Add option destroyOnClose for showModal 2017-08-07 14:43:22 +08:00
printempw
231a91e367 Fix translation of getting textures 2017-08-07 13:48:20 +08:00
printempw
4bf0de92c5 Define default skin/avatar image in one place 2017-08-07 13:38:46 +08:00
printempw
64d6900434 Add fucking test for sending feedbacks 2017-08-07 13:14:49 +08:00
printempw
0f611d56f6 Adjust frequency of sending feedbacks 2017-08-07 10:16:25 +08:00
printempw
19f75f4a0d Add test for checking updates 2017-08-06 23:39:18 +08:00
printempw
3ab2db4133 Fix tests 2017-08-06 23:12:07 +08:00
printempw
1852e9f4fb Separate scripts about checking updates from HTML 2017-08-06 23:08:09 +08:00
printempw
a55f150eac Fix operating admin himself 2017-08-06 22:53:11 +08:00
printempw
efb7cf07e5 Fix removing items from closet 2017-08-06 22:40:30 +08:00
printempw
86c5343c55 Move all iCheck initialization to layout.js 2017-08-06 22:31:09 +08:00
printempw
c1553e5b55 Update gulpfile.js 2017-08-06 22:26:21 +08:00
printempw
c25332008f Revert "Make iCheck color followed by body theme"
This reverts commit e4ae3c7130c4aa73cf276b451c763a533a78da82.
2017-08-06 22:09:19 +08:00
gplane
37654eb807 Make iCheck color followed by body theme 2017-08-06 18:06:29 +08:00
gplane
0771c4c2dd Use "min" as unit when sign remaining time is less than 1 hour 2017-08-06 17:05:04 +08:00
printempw
a2edc469ac Show precision time when sign remaining time is less than 1 hour 2017-08-05 23:43:35 +08:00
printempw
cb2ce86aae Enhance detection of mobile browser scrolling #80 2017-08-05 18:22:03 +08:00
printempw
b5ca6ff3aa Update gulpfile.js 2017-08-05 16:48:17 +08:00
printempw
0db59a7a59 🔖 Version bump to v3.3.1 2017-08-05 16:38:46 +08:00
printempw
dd90ee9f8f Update ignored files when zipping releases 2017-08-05 16:21:20 +08:00
printempw
56be384dfd Fix sending statistics 2017-08-05 16:09:32 +08:00
printempw
fe721bd833 Skip copying vendor if error occurred when upgrading 2017-08-05 16:00:14 +08:00
printempw
4bf1058c46 Fix minor bug about error log 2017-08-05 15:31:47 +08:00
printempw
a8f4397be4 Enhance clearing compiled views 2017-08-05 15:10:08 +08:00
printempw
b06051dd91 Remove class App\Services\Storage 2017-08-05 15:04:06 +08:00
printempw
01a0d58c7d Update redirecting url of plugin market 2017-08-05 14:40:56 +08:00
printempw
bc7679fd0d Use default background image when option leaved empty 2017-08-05 14:35:28 +08:00
printempw
96633db340 Update URL of git submodule 2017-08-05 14:24:13 +08:00
printempw
cf0b1e3cac Update comment format 2017-08-05 14:15:26 +08:00
printempw
a716e0cae1 Add Chinese translation for dependency check 2017-08-05 13:44:19 +08:00
printempw
89243cb066 Rename handler.php to kernel.php 2017-08-05 13:40:42 +08:00
printempw
904ab9f05b Fix responsive home page, close #80 2017-08-04 10:21:03 +08:00
printempw
d5f7c704dd Add dangling commas in module.exports 2017-08-01 14:42:17 +08:00
printempw
5fd8ef62aa Update tests 2017-08-01 14:39:44 +08:00
printempw
3e798d9cc5 Simplify the form of catching ajax errors 2017-08-01 12:24:32 +08:00
printempw
07110d2580 Fix adding event listener using jQuery 2017-08-01 12:19:23 +08:00
printempw
21011ef277 Update config of Travis CI 2017-07-31 13:48:01 +08:00
printempw
12d46659ec 🔖 Version bump to v3.3 2017-07-31 13:06:08 +08:00
printempw
f29ab3042d Fix XSS when searching skinlib 2017-07-31 12:51:00 +08:00
printempw
2ea4920851 Update font-family of mail title 2017-07-30 16:33:27 +08:00
printempw
0566d4e7e0 Throw exception when two plugins use the same name definition 2017-07-30 16:11:23 +08:00
printempw
beb4b08f88 Update README 2017-07-30 15:39:44 +08:00
printempw
e170d6685f Fix searching player count of user at admin page 2017-07-30 14:48:40 +08:00
printempw
d15217ddcb Fix operating players of an admin himself on admin page 2017-07-30 14:42:26 +08:00
printempw
9f5c84aba9 Update README 2017-07-29 21:10:14 +08:00
printempw
153f515f15 Minor bug fixes for tests 2017-07-28 18:22:59 +08:00
printempw
28c4d555d4 Merge pull request #76 from g-plane/master
为 JavaScript 代码添加单元测试
2017-07-28 04:54:03 -05:00
printempw
4e546076ef Fix ajax URL of managing plugins 2017-07-28 17:51:18 +08:00
printempw
235141e2d9 Expect only new passwords to be at least 6 characters 2017-07-22 11:12:49 +08:00
gplane
c731bd023a Add CI config files 2017-07-20 15:56:42 +08:00
gplane
d1faaf64f5 Add unit test for JavaScript files 2017-07-20 15:36:59 +08:00
printempw
54a0ac3618 Apply new style for login page 2017-07-14 10:37:00 +08:00
printempw
a8ac404c98 Remove reference to index.js 2017-07-14 09:45:30 +08:00
printempw
52a18195cd Use ES6 destructuring assignment syntax 2017-07-14 09:34:09 +08:00
printempw
3a74329548 Rename sign in to sign 2017-07-14 09:17:52 +08:00
printempw
7d7b35f5fd Fix translation for user menu 2017-07-14 09:02:56 +08:00
printempw
eb0e5bc589 Fix clearing current filters when switching laguage 2017-07-14 08:47:42 +08:00
printempw
1154b219fe Fix translation of jQuery datatables 2017-07-14 08:29:57 +08:00
printempw
397da60f4f Forbid operations when user lacks permission 2017-07-14 08:21:29 +08:00
printempw
8bb885d476 Prevent default behavior of clicking button at login page 2017-07-13 21:37:37 +08:00
printempw
a51523e54c Fix url of setting user avatar 2017-07-13 21:24:05 +08:00
printempw
104f5a32a7 Refactor & modulize JavaScript files 2017-07-13 17:03:21 +08:00
printempw
fe04c49f7e Add ESLint to Gulp workflow 2017-07-13 17:02:31 +08:00
printempw
ddb0e0bff8 Remove file headers 2017-07-12 22:28:20 +08:00
printempw
d9206e955d Use url() to generate absolute url in JavaScript files 2017-07-12 22:19:23 +08:00
printempw
b5a857ef68 Update gulpfile.js and deprecate elixir 2017-07-12 22:09:40 +08:00
printempw
b873ffef9c Adjust filename of source files 2017-07-03 20:54:19 +08:00
printempw
d9abb7c99f Fix minor bugs 2017-06-30 16:36:59 +08:00
printempw
8df825d16a Fix fucking auto height reseting caused by AdminLTE 2017-06-30 14:04:32 +08:00
printempw
c87bcf1e3e Deprecate bower and use yarn instead 2017-06-30 12:14:06 +08:00
printempw
c9bdc1b6e9 Fix background image placeholder 2017-06-30 12:04:27 +08:00
printempw
f4dc8cbcf9 Add detection of directory write permission 2017-06-30 11:23:26 +08:00
printempw
b6506e2776 Add placeholder for background image at homepage 2017-06-30 10:43:34 +08:00
printempw
34962255a2 Add ajax pagination & search for skinlib 2017-06-30 10:33:41 +08:00
printempw
a0d1924165 Return exception in plain text for xhr requests 2017-06-29 21:34:02 +08:00
printempw
e83b9d1268 Fix translation for accessing non-existent plugin configuration 2017-06-29 15:02:11 +08:00
printempw
10801b8f7d Redirect to last requested path after logging in 2017-06-28 20:42:51 +08:00
printempw
1957f97807 Add option for detecting IP address via which header 2017-06-28 19:50:34 +08:00
printempw
88ed00660a Fix password encryption of CrazyLogin #66 2017-06-28 18:38:48 +08:00
printempw
fda8d9fd35 Fix not clearing cape preview when switching players 2017-06-28 17:23:57 +08:00
printempw
b7df1b362c Reset invalid player textures automatically 2017-06-28 17:13:07 +08:00
printempw
f07cc0f76f Add extra links in user-menu for admins 2017-06-27 22:51:14 +08:00
printempw
44196fa9e6 Use yarn instead of shitty npm 2017-06-27 22:50:44 +08:00
printempw
27c7a77f04 Add Chinese translation for runtime checking 2017-06-27 20:09:42 +08:00
printempw
6aebb483a1 Move route defination files to /routes 2017-06-27 19:48:18 +08:00
printempw
3560db200c Know nothing about the fucking git submodule 2017-06-17 13:39:25 +08:00
printempw
a053c5388c Set simplified Chinese version as default README 2017-05-08 22:53:40 +08:00
printempw
2ed5dad582 Fix determining URL with language preferred 2017-05-06 21:50:31 +08:00
printempw
48c8aeb6ff Fix real-time nickname hinting when transfering players 2017-05-06 21:21:19 +08:00
printempw
2665d5c56b Fix filter of skinlib 2017-05-05 12:43:53 +08:00
printempw
b800d6fe07 Fix user status after ban/unban 2017-05-05 12:07:47 +08:00
printempw
a47070f4e3 Fix unhandled uid format 2017-05-05 11:57:41 +08:00
printempw
6eacd7e378 Merge pull request #64 from g-plane/master
一些疏漏
2017-04-29 13:36:21 +08:00
gplane
5365164ef5 Use 0 to reset texture for player in admin panel 2017-04-29 08:49:08 +08:00
printempw
e6030842aa Merge pull request #63 from g-plane/master
细节优化,感谢 @g-plane!
2017-04-28 22:12:40 +08:00
gplane
189a796a7f Fix reloading plugins table 2017-04-28 19:54:26 +08:00
gplane
dfbe6400d4 Add some redirectings for admin panel 2017-04-27 18:02:05 +08:00
gplane
2ca383628e Fix redirect after updating profile 2017-04-27 16:38:40 +08:00
gplane
d9552e268c Fix password length of installation 2017-04-27 12:42:04 +08:00
gplane
97bcfa2686 Fix updating email address
Add detecting whether email is existed or not
2017-04-27 09:25:42 +08:00
gplane
b54ddb6fb2 Add changing player name in admin panel 2017-04-27 08:52:55 +08:00
gplane
e134296565 Fix detection of options of clearing textures 2017-04-27 00:02:48 +08:00
gplane
9d16e20db5 Fix missing preview of cape in player management
of user center.
2017-04-27 00:00:42 +08:00
gplane
2649840644 Fix misspelling of "general.js" 2017-04-26 23:48:39 +08:00
gplane
8f0487b0ee Update text about changing texture of player 2017-04-26 23:47:47 +08:00
gplane
ca9aded3df Add option for choosing types of textures to be cleared 2017-04-26 23:39:10 +08:00
gplane
e0fee86ea7 Fix missing filter when switching language 2017-04-26 21:07:42 +08:00
gplane
ffc2de2e4a Remove English hint for search page 2017-04-26 20:50:20 +08:00
gplane
602e52d9e6 Fix displaying player name rule 2017-04-26 17:50:10 +08:00
gplane
8a8a4e57ee Show message when closet is empty
after deleting textures.
2017-04-26 17:43:34 +08:00
gplane
8a6ef9e437 Use "url()" function 2017-04-26 17:34:24 +08:00
gplane
8abed82899 Fix applying textures to player 2017-04-26 17:05:15 +08:00
gplane
12bdac3bb4 Fix removing table row when deleting user 2017-04-26 16:32:17 +08:00
gplane
c723f0a780 Fix score calculation 2017-04-26 16:24:19 +08:00
gplane
800cebcc8f Remove lodash 2017-04-26 15:58:53 +08:00
gplane
911724881c Fix getting default value of user management 2017-04-26 15:32:26 +08:00
gplane
44999af7d8 Display nickname before changing texture owner 2017-04-26 15:28:53 +08:00
gplane
4b8a40ce59 Fix status text of user management 2017-04-25 23:24:03 +08:00
gplane
93364ef723 Add default value when renaming texture in skin library 2017-04-25 22:03:12 +08:00
gplane
b0f29c5036 Add i18n for sweetalert2 in admin panel 2017-04-25 17:31:08 +08:00
gplane
293cb0e457 Redirect to index if search keyword is empty 2017-04-25 08:51:30 +08:00
gplane
4311af2a5f Fix type mistake 2017-04-24 17:16:54 +08:00
gplane
fdea88eb2b Add searching texture for uploaders themselves 2017-04-24 17:13:06 +08:00
gplane
16ff93c32d Add i18n for "Applicable Model" in skin library 2017-04-24 17:08:39 +08:00
gplane
5c7b8bf6b2 Optimize filter of skin library 2017-04-24 17:02:29 +08:00
gplane
874f4bd681 Remove file suffix when uploading 2017-04-24 11:35:55 +08:00
gplane
f53bb7acb6 Optimize closet
1. Use jqPaginator
2. Use CSR for closet
3. Use AJAX for closet
4. Just type to search instead of pressing ENTER key
5. Link to skin library is according to current category when closet is empty
6. Texture indicator shows category of texture
2017-04-24 11:26:53 +08:00
gplane
7607beebaf Use sweetalert2 instead of built-in function 2017-04-23 11:46:51 +08:00
gplane
80f82b4b87 Fix text about banning user 2017-04-22 23:38:59 +08:00
gplane
8056216d3f Fix score calculation 2017-04-22 23:35:25 +08:00
gplane
b6dfc1c2a4 Fix text about returning score 2017-04-22 23:02:48 +08:00
gplane
5b15b6922c Fix link of cleaning filter 2017-04-22 18:40:44 +08:00
gplane
4ae8ed2d82 Use CSR for DataTables 2017-04-22 18:36:22 +08:00
gplane
e708c0363e Add default value when renaming closet item 2017-04-22 09:17:39 +08:00
printempw
ec76dbb57a Merge pull request #59 from g-plane/master
修复一些细节
2017-04-21 22:16:02 +08:00
gplane
2b0f8b20c1 Fix score calculation 2017-04-21 18:44:11 +08:00
gplane
98ff895d3b Fix setting existing texture to be private 2017-04-21 18:11:17 +08:00
gplane
8b002ab157 Add menu item of cleaning filter 2017-04-21 16:55:34 +08:00
gplane
2986e6babd Fix showing private textures for owner 2017-04-21 16:48:25 +08:00
gplane
ec9598ae16 Update default copyright text 2017-04-21 13:02:03 +08:00
gplane
2c9ba2c277 Fix i18n 2017-04-21 12:34:12 +08:00
gplane
f2b51fbd2a Generate preview on img clicked only 2017-04-21 00:18:51 +08:00
gplane
6e5ed604cd Bluring when updating score in admin panel 2017-04-21 00:09:13 +08:00
gplane
3e27625064 Update storage display when checking in 2017-04-21 00:05:45 +08:00
gplane
e3e70a59e6 Update texture name when choosing file again 2017-04-20 23:46:06 +08:00
gplane
7dcc1eb87e Fix preview link of admin panel 2017-04-20 23:16:38 +08:00
gplane
1d09b41dd6 Fix PHP version detection of composer 2017-04-20 23:01:16 +08:00
printempw
5db84529de Merge branch 'master' of github.com:printempw/blessing-skin-server 2017-02-03 14:26:14 +08:00
printempw
c19eec5a90 fix division by zero when user score < rate 2017-02-03 14:25:17 +08:00
printempw
59ec13d95a Merge pull request #49 from lzjluzijie/master
add detection for size of HD skins
2017-01-25 15:53:32 +08:00
HaLuLu-MECHREVO X6Ti
c4a2b22c30 add detection for size of HD skins 2017-01-25 15:34:43 +08:00
printempw
0d338ab4a7 move setup.wizard.master to setup.master 2017-01-22 22:32:50 +08:00
printempw
989b29a43a fix getting remaining time of signing in 2017-01-22 22:19:55 +08:00
printempw
4c248bd88a fix reference of styles on setup pages 2017-01-22 22:19:19 +08:00
printempw
d8f94a68fb ignore new commits of git submodule 2017-01-22 20:29:08 +08:00
printempw
8498d7c76d fix wrong link to texture detail #48 2017-01-22 18:54:02 +08:00
printempw
b198ce5d35 fix binding email #47 2017-01-22 18:39:14 +08:00
printempw
22984ceef1 ignore plugins directory 2017-01-22 17:21:16 +08:00
printempw
233b2d4e39 return error message directly when requested with POST 2017-01-22 16:45:19 +08:00
printempw
24137cf2a9 fix wrong css reference 2017-01-22 16:35:09 +08:00
printempw
81bc32fa6d fix division by zero 2017-01-22 16:28:58 +08:00
printempw
38018276e5 fix changing current language at texture detail page 2017-01-22 15:58:52 +08:00
printempw
097194d542 redirect plugin market to g-plane/unofficial-plugins-market 2017-01-21 17:04:09 +08:00
printempw
2804a2b079 print a brand on every pages' console 2017-01-21 14:38:03 +08:00
printempw
a58a8fef28 add zh_CN readme file 2017-01-21 13:56:10 +08:00
printempw
314fde72e8 remove default breadcrumb 2017-01-21 13:35:38 +08:00
printempw
a086584a41 update dom id of copyright text 2017-01-21 12:59:35 +08:00
printempw
ea7c7b55e8 fix font-weight of sweet alerts 2017-01-21 11:25:42 +08:00
printempw
21febf0117 add additional options for showing modals 2017-01-21 11:18:15 +08:00
printempw
c6850f41bb add some detection for bad ass 2017-01-21 11:17:45 +08:00
printempw
f9b812b156 don't pack plugins when releasing zip archives 2017-01-20 22:16:58 +08:00
printempw
9f6096c7fc add id for copyright text block 2017-01-20 22:14:01 +08:00
printempw
b13552e5d1 use IoC container to call plugin callbacks 2017-01-20 21:36:29 +08:00
printempw
c16ae91de0 enhance showing previews of player texture 2017-01-20 21:23:24 +08:00
printempw
49fd8e4eb3 enhance directory structure of assets 2017-01-20 18:22:10 +08:00
printempw
e180a38544 load default favicon when option value is empty 2017-01-20 17:28:53 +08:00
printempw
100314dfd7 use babel to compile ES6 scripts to ES5 2017-01-19 23:07:13 +08:00
printempw
5fb237f01a use event listeners instead of setting href 2017-01-19 22:54:10 +08:00
printempw
2be20b4bee fix default parameter value of OptionForm::addMessage 2017-01-19 12:57:36 +08:00
printempw
2a419628f9 use ES6 style in gulpfile.js 2017-01-18 23:05:32 +08:00
printempw
2461b47d75 clear unused imported namespaces 2017-01-18 22:57:15 +08:00
printempw
13e51464f6 separate checking installation as a middleware 2017-01-18 22:42:50 +08:00
printempw
294b008880 now maximum password length is extended to 64 2017-01-18 22:35:25 +08:00
printempw
c628a3da3e make language detector more accurate 2017-01-18 22:31:35 +08:00
printempw
120df57edf add JavaScript helper function url() 2017-01-18 21:49:23 +08:00
printempw
4cfb3f27f6 use hash_equals() to compare password hash 2017-01-18 12:59:52 +08:00
printempw
47c758c5c0 fix comparing time of signing in 2017-01-18 12:56:37 +08:00
printempw
9ff5bbfcaa ✏️ use signing in instead of checking in 2017-01-17 22:57:16 +08:00
printempw
a0494ce3d0 fix awful indentation in i18n files of option pages 2017-01-17 22:16:03 +08:00
printempw
db15ff2314 fix url to config pages of plugins 2017-01-17 21:41:20 +08:00
printempw
fd17d3ac75 bump v3.2.1 🚀 2017-01-15 16:21:34 +08:00
printempw
5f9eb0b6fd add option for sending usage statistics 2017-01-15 16:20:29 +08:00
printempw
9486f19f5d add support for callback of enabling/disabling/deleting plugins 2017-01-14 21:31:21 +08:00
printempw
10a9397fd0 fix searching closet 2017-01-14 20:39:13 +08:00
printempw
ad159c7f20 add url field for plugins' package.json 2017-01-14 20:26:38 +08:00
printempw
3fcb991ac7 encrypt token cookie 2017-01-14 20:24:48 +08:00
printempw
74fc9eb2b0 update translation of error pages 2017-01-14 19:35:37 +08:00
printempw
6ad7660939 update composer dependencies 2017-01-14 19:28:45 +08:00
printempw
ba6ae737ca set current language with query string 2017-01-14 19:28:27 +08:00
printempw
10f86d4253 add detection for vendor existence 2017-01-14 18:42:53 +08:00
printempw
79f1608780 update custom error pages 2017-01-14 18:42:30 +08:00
printempw
5f9f799580 fix horizonal scroll of datatables 2017-01-13 22:53:42 +08:00
printempw
6c34392c11 clear compiled view cache when update 2017-01-13 22:34:06 +08:00
printempw
38e24f4642 stop loop after adding all the contents 2017-01-08 16:12:28 +08:00
printempw
07b3a025a5 use name as unique identifier for plugins generally 2017-01-08 16:09:54 +08:00
printempw
954329a8e7 add useful functions for plugins 2017-01-08 16:05:54 +08:00
printempw
f6aadc71f0 add language-chooser for error pages 2017-01-08 15:20:50 +08:00
printempw
06aae6a164 update error messages for stupids 2017-01-08 15:17:23 +08:00
printempw
3569c43fb2 use Query Builder to get storage size used by user 2017-01-08 14:29:48 +08:00
printempw
118d8cc649 show current role at user/admin panel 2017-01-08 14:15:55 +08:00
printempw
1d4dca0ff3 update util functions 2017-01-08 13:44:03 +08:00
printempw
ee81077b00 fix custom version comparing 2017-01-08 13:28:58 +08:00
printempw
482f6efa02 fix determining request protocol behind load balancer & proxies 2017-01-08 13:26:33 +08:00
printempw
7d9535007e support hashing passwords with password_hash() 2017-01-08 12:49:32 +08:00
printempw
c018e132c8 add option for generating random APP_KEY & SALT when setup 2017-01-08 11:28:55 +08:00
printempw
acb4d643f7 update ciphers 2017-01-08 10:48:46 +08:00
printempw
4276b56e0c fix getting user from UserRepository by custom property 2017-01-08 10:40:22 +08:00
printempw
f5dd7c8c5f bind user.current at CheckAuthenticated middleware 2017-01-07 22:28:37 +08:00
printempw
fbf6b203e1 fix comparing bool value with string 2017-01-07 22:15:47 +08:00
printempw
2b175249cb fix encrypting user password when register 2017-01-05 23:06:44 +08:00
printempw
967ef3e1b0 fix comparing versions contain hyphen 2017-01-02 16:23:31 +08:00
printempw
6ef9f90beb update to v3.2.0 2017-01-02 15:43:40 +08:00
printempw
c2fa342aae update translation 2017-01-02 15:36:08 +08:00
printempw
30fb7bdedf update translation of downloading updates 2017-01-02 15:31:46 +08:00
printempw
8790f4b630 update notice of enabling APP_DEBUG 2017-01-02 15:13:21 +08:00
printempw
f00033ab1b improve fault tolerance of missing directories 2017-01-02 14:49:28 +08:00
printempw
994b827643 add notice of enabling APP_DEBUG when error occured 2017-01-02 14:41:58 +08:00
printempw
7f966ce80d add hooks about loading assets 2017-01-02 14:37:16 +08:00
printempw
658a2d48f5 generate new APP_KEY automatically when setup 2017-01-02 13:28:23 +08:00
printempw
c603ff0386 fix IIS location path starts with dot 2017-01-02 12:24:33 +08:00
printempw
6c462d0a96 use jQuery DataTable to show plugins page 2017-01-02 12:19:34 +08:00
printempw
53d1a6627d do dom operations before showing success when checking in 2017-01-02 11:17:07 +08:00
printempw
8a0cd184e3 update README 2017-01-02 10:53:19 +08:00
printempw
6c11b8f256 add breadcrumb to every page 2017-01-02 10:40:09 +08:00
printempw
2125e05bc2 add support for using trans id in plugin title/description 2017-01-02 10:39:50 +08:00
printempw
cc6afebfec fix comparing string with bool value 2017-01-02 10:28:10 +08:00
printempw
36014020e5 add RewriteBase to .htaccess 2017-01-02 00:21:15 +08:00
printempw
27e9dea422 fix not deducting score when adding texture to closet 2017-01-02 00:19:55 +08:00
printempw
1830cd2e54 fix missing style of copyright text 2017-01-02 00:14:53 +08:00
printempw
d2f16b6b68 update README 2017-01-01 23:09:18 +08:00
printempw
1de6b6be8b update package name 2017-01-01 22:33:48 +08:00
printempw
8f3505d62e update description 2017-01-01 22:30:23 +08:00
printempw
c4f8004b41 fix determining invalid image type 2017-01-01 21:24:23 +08:00
printempw
fb64056cbd fix minor bugs caused by batch-import plugin 2017-01-01 16:37:29 +08:00
printempw
177c25bfb4 Merge pull request #42 from g-plane/master
working on i18n of update
2017-01-01 12:28:57 +08:00
gplane
d36ac3643b working on i18n of update 2017-01-01 12:22:18 +08:00
printempw
9be6c356d2 update to v3.2-pr8 2016-12-31 23:50:37 +08:00
printempw
4ae6d868bb use true/false instead of 1/0 in options 2016-12-31 23:36:44 +08:00
printempw
91d528d311 finish i18n work of option forms 2016-12-31 23:28:09 +08:00
printempw
ad459653b4 fix bug of langauge chooser at setup 2016-12-31 23:27:45 +08:00
printempw
3b96166ee8 finish i18n work of user/player management 2016-12-31 21:16:04 +08:00
printempw
932382d5c8 adjust style of tables 2016-12-31 18:42:04 +08:00
printempw
acedbcce0b add language chooser at setup page 2016-12-31 17:14:19 +08:00
printempw
47b0b17c15 fix installing failed when already installed incompletely 2016-12-31 16:43:23 +08:00
printempw
d622e455c7 add plugin_assets() helper function 2016-12-31 16:07:12 +08:00
printempw
f0a76dad04 add dependency for redis plugin 2016-12-31 15:12:23 +08:00
printempw
dcbeb35155 add renderWithOutSubmitButton and disabled apis for OptionForm 2016-12-31 15:11:49 +08:00
printempw
ee5fec149e fix saving option values whose id is formatted as *[*] 2016-12-31 14:05:55 +08:00
printempw
f7159e0bbb use custom function to get client ip since Symfony's sucks 2016-12-31 13:56:53 +08:00
printempw
6d6abf41f5 add option for customizing favicon 2016-12-31 13:36:46 +08:00
printempw
b861dbc0b5 move translation file from app.js to locale.js 2016-12-31 13:17:13 +08:00
printempw
2250b00c0a use DataTables at player management 2016-12-31 13:07:00 +08:00
printempw
3ca85aff8f use jQuery DataTables plugin at user management 2016-12-31 11:38:07 +08:00
printempw
57937ac458 update translation for update wizard 2016-12-31 11:37:11 +08:00
printempw
35e49e58ab adjust style of .description 2016-12-30 20:55:33 +08:00
printempw
4c8d390d47 fix loading namespace of disabled plugins 2016-12-30 20:48:45 +08:00
printempw
77af4d2f95 bind Parsedown to container 2016-12-30 20:47:52 +08:00
printempw
b9aa8618d0 add detection for mbstring & tokenizer extensions 2016-12-30 20:42:37 +08:00
printempw
d4453df8c2 working on i18n of admin panel 2016-12-30 20:37:27 +08:00
printempw
9f1446fafb use semantic versioning 2016-12-30 20:24:49 +08:00
printempw
59d7a9c4c2 deprecate Option::save() 2016-12-30 19:35:07 +08:00
printempw
098d0ed7b8 Merge branch 'master' of github.com:printempw/blessing-skin-server 2016-12-30 17:45:29 +08:00
printempw
dbef0b0efd finish i18n of setup 2016-12-30 17:44:53 +08:00
printempw
526d4b6be2 Merge pull request #41 from g-plane/master
Working on i18n of partial views of admin
2016-12-30 17:31:22 +08:00
gplane
11754a63fd working on i18n of partial views of admin 2016-12-30 17:23:05 +08:00
printempw
866ce9a04f add gulp task of cleaning cache 2016-12-30 16:18:13 +08:00
printempw
6a8b1df491 Merge branch 'master' of github.com:printempw/blessing-skin-server 2016-12-30 16:05:51 +08:00
printempw
2c4d2f9189 Merge pull request #40 from g-plane/master
working on i18n of setup
2016-12-30 16:05:22 +08:00
printempw
75431a14ca enhance style of language select 2016-12-30 15:57:33 +08:00
gplane
ac975d8e9c working on i18n of setup 2016-12-30 15:01:34 +08:00
printempw
e0a4667cc8 add detection for Accept-Language 2016-12-30 12:43:59 +08:00
printempw
cbec1d3869 rewrite option pages with new OptionForm 2016-12-29 23:14:09 +08:00
printempw
228c17ca68 add renderWithOutTable & renderInputTagsOnly for OptionForm 2016-12-29 13:11:46 +08:00
printempw
1d7dc13e18 refactor OptonForm 2016-12-28 23:28:15 +08:00
printempw
da7a0ac606 add option for score consumption of adding to closet 2016-12-28 13:08:17 +08:00
printempw
f31bd85445 add Markdown support for site announcement 2016-12-28 12:53:13 +08:00
printempw
886b15de87 add many styles for copyright text 2016-12-27 23:05:09 +08:00
printempw
5e567c48a5 add permission check for storage path 2016-12-27 22:31:52 +08:00
printempw
c37091d0f1 fix showing empty file when UploadFile::error !== UPLOAD_ERR_OK 2016-12-25 23:21:13 +08:00
printempw
53777163d9 update to v3.2-pr7 2016-12-24 23:41:12 +08:00
printempw
33b89db7f5 implement ArrayAccess interface for plugins 2016-12-24 23:06:56 +08:00
printempw
043dabaccf add error handler of rendering exceptions in brief 2016-12-23 21:44:52 +08:00
printempw
04de047b8a fix bug of posting to /plugins/manage 2016-12-22 21:57:51 +08:00
printempw
af48273465 add option for returning score when deleting textures 2016-12-21 22:53:53 +08:00
printempw
2ee71b6d98 show custom error page when APP_DEBUG is false 2016-12-18 21:59:51 +08:00
printempw
70bed0c4c3 minor change of naming things and bug fixes 2016-12-18 17:32:46 +08:00
printempw
0adce0240e update to v3.2-pr6 2016-12-17 23:11:29 +08:00
printempw
6e0ecf4d96 remove unnecessary directories 2016-12-17 23:00:07 +08:00
printempw
8677cd9376 rename middlewares 2016-12-17 22:45:08 +08:00
printempw
372be47ac8 fix parse error at index.php under PHP 5.3 2016-12-17 20:48:13 +08:00
printempw
55f8c87b92 add PluginController 2016-12-17 19:52:59 +08:00
printempw
94495614c3 separate runtime check to a function 2016-12-17 19:52:22 +08:00
printempw
2807c3ce6d enhance judgement of active menu 2016-12-17 19:02:56 +08:00
printempw
58014e9b1e fix not checking chinese player names 2016-12-17 18:17:34 +08:00
printempw
be23dac2b3 adjust styles at user/player 2016-12-17 18:07:29 +08:00
printempw
65acb7426b save modified options at terminable middleware instead of destruct function 2016-12-17 17:25:01 +08:00
printempw
c9a3c0549b separate codes with namespaced class names from index.php 2016-12-17 13:06:36 +08:00
printempw
4f30cc6eb7 use error control operater when invoking set_time_limit() 2016-12-16 22:54:12 +08:00
printempw
56cefa1ca5 check data of closet valid before loop 2016-12-16 22:51:50 +08:00
printempw
139db5c08d fix redirecting url after enable/disable plugins 2016-12-16 22:45:51 +08:00
printempw
efd57bfce0 use Request::ip() instead 2016-12-16 22:20:41 +08:00
printempw
28a66cba18 use methods from UrlGenerator to set root url & schema 2016-12-16 22:14:32 +08:00
printempw
011b6e6e04 add support for memcache 2016-12-14 22:46:05 +08:00
printempw
8e75b3b605 remove temp file if uploaded file duplicated 2016-12-14 22:11:40 +08:00
printempw
223081cf05 add --force for database migration command 2016-12-14 22:10:48 +08:00
printempw
27113f8b4b update to v3.2-pr4 2016-12-11 22:42:42 +08:00
printempw
325ea187e0 fix rendering content of option form 2016-12-11 22:26:58 +08:00
printempw
2bff6a080f add translation for index 2016-12-11 22:04:15 +08:00
printempw
5370e4904c brand-new landing page 2016-12-11 15:17:24 +08:00
printempw
a858456d38 add some application information for javascript 2016-12-10 22:01:05 +08:00
printempw
6ff4ad0c33 add support for multilevel menus 2016-12-10 21:30:24 +08:00
printempw
637189ddf6 update to v3.2-pr3 2016-12-10 20:29:20 +08:00
printempw
5055deb3cb fix logging out at homepage when installed to a subdir 2016-12-10 19:50:15 +08:00
printempw
55534bb52b fix getting info of invalid texture 2016-12-10 19:49:45 +08:00
printempw
05edc193ae add event for rendering header & footer 2016-12-10 19:36:01 +08:00
printempw
91ff0fd2a7 start using laravel-debugbar 2016-12-10 18:55:08 +08:00
printempw
28ea2b2858 separate v2 data migrations as a plugin 2016-11-25 22:34:41 +08:00
printempw
3811f7d704 working on extracting of updates 2016-11-25 13:13:26 +08:00
printempw
9b6c18cd6b now we have an awesome progress bar when download updates 2016-11-25 12:54:20 +08:00
printempw
6834b68948 add runtime check 2016-11-21 22:04:10 +08:00
printempw
4ef6fba0c6 remove constant BASE_DIR 2016-11-21 21:50:24 +08:00
printempw
3a527137d4 update dependencies 2016-11-21 12:15:00 +08:00
printempw
721f8750ae add query string for captcha forcely 2016-11-19 23:21:27 +08:00
printempw
d2a2b81652 add event PluginWasDeleted 2016-11-19 22:02:02 +08:00
printempw
0d006dac66 add event UserProfileUpdated 2016-11-18 23:06:15 +08:00
printempw
eb3b963dca add custom messages & callbacks for option forms 2016-11-18 22:39:12 +08:00
printempw
a91da6cf3c fix rendering of option forms 2016-11-18 21:59:09 +08:00
printempw
b84a137cf7 fix rules for player names 2016-11-18 17:28:49 +08:00
printempw
58a2e10c0a add query string for avatars forcely 2016-11-18 17:24:13 +08:00
printempw
7004ab627c fix routes for setup wizard 2016-11-18 16:59:05 +08:00
printempw
589be0c892 move setup wizard into laravel framework 2016-11-18 16:46:58 +08:00
printempw
fbea8e0905 use laravel migrations to create tables 2016-11-18 16:08:01 +08:00
printempw
5fc43ed45b fix some minor issues for plugins 2016-11-17 17:32:12 +08:00
printempw
b232503fab add ability of selecting multi textures at closet 2016-11-13 12:20:30 +08:00
printempw
be4af844fe abstract forms for options 2016-11-12 23:50:41 +08:00
printempw
fdf2a82e2e fix removing ending slash of url 2016-11-11 23:04:53 +08:00
printempw
36925139db fix escaping unicode player name 2016-11-11 21:19:45 +08:00
printempw
11c88f28cd add log for password resetting 2016-11-07 22:34:34 +08:00
printempw
b42ad27f6f add events of player operations 2016-11-07 22:16:27 +08:00
printempw
ccbed31ab2 add link for examples of custom css/js 2016-11-07 21:57:43 +08:00
printempw
a51c55f4d8 fix bug when showing texture whose uploader was deleted 2016-11-06 13:22:27 +08:00
printempw
a77e87288a modifying copyright text is not permitted now 2016-11-06 11:58:08 +08:00
printempw
739bff4633 add id for register buttons at homepage 2016-11-06 11:48:31 +08:00
printempw
a6751473f6 event CheckPlayerExists now returns bool value 2016-11-06 10:58:01 +08:00
printempw
1ee3ecd462 fix checking user password returned by event listeners 2016-11-05 21:23:07 +08:00
printempw
821cd025e9 fix unknown column username 2016-11-05 21:08:10 +08:00
printempw
e0a59900a3 add event EncryptUserPassword 2016-11-05 20:11:48 +08:00
printempw
ea1948dc59 fix bug at binding email 2016-11-05 20:11:31 +08:00
printempw
4e6cd56c39 fix class names of ciphers 2016-11-05 20:10:46 +08:00
printempw
b63cceddf3 remove notice of data adapter on option page 2016-10-30 15:33:06 +08:00
printempw
e9ace93035 fix removing items from closet 2016-10-30 15:31:49 +08:00
printempw
fb4e080e30 fix width of plugin description 2016-10-30 14:48:47 +08:00
printempw
f71190e286 update ciphers 2016-10-30 14:12:22 +08:00
printempw
6aaec6f658 working on events & data adapter 2016-10-30 11:57:26 +08:00
printempw
167c40f550 add last-modified header for json profiles 2016-10-30 11:56:59 +08:00
printempw
0df49ff670 fix using InvalidArgumentException 2016-10-29 21:31:58 +08:00
printempw
5c042ae0ab separate cache logic from core 2016-10-29 18:54:38 +08:00
printempw
2559f7907b add namespace hints for plugin views and translation 2016-10-27 22:52:26 +08:00
printempw
e6fedfd2f3 separate config generator as a plugin 2016-10-25 22:47:50 +08:00
printempw
f3e803f57f use app() instead of App::make() 2016-10-25 21:35:09 +08:00
printempw
329f4c86bc add class autoloader for plugins 2016-10-24 22:32:07 +08:00
printempw
84e4d97f00 fix determining tables exist without prefix 2016-10-23 13:32:20 +08:00
printempw
7f79a654bd fix booting option repository at setup 2016-10-23 13:04:59 +08:00
printempw
429dc7c7a7 fix using array as class contant 2016-10-23 12:19:19 +08:00
printempw
e35fa9b85a refactor models 2016-10-23 11:41:52 +08:00
printempw
a877fa0788 always redirect after uploading texture 2016-10-23 11:39:15 +08:00
printempw
e6a08c5229 fix wrong base url when logout 2016-10-23 11:07:08 +08:00
printempw
c615612889 fix trans key of notice for removing items 2016-10-22 23:09:35 +08:00
printempw
121cc4ea6d fix translation key of preference 2016-10-22 22:54:02 +08:00
printempw
c849ed21fa abstract general Repository 2016-10-21 22:11:49 +08:00
printempw
d6e810da4a working on data adaptation 2016-10-17 17:51:51 +08:00
printempw
55414072e7 working on framework of plugins 2016-10-17 12:20:55 +08:00
printempw
688bf668e8 return bool value when option value is 0 or 1 2016-10-17 10:07:38 +08:00
printempw
b0714795bd add icon for players at admin index 2016-10-17 09:54:55 +08:00
printempw
82ada0930b add option for auto detecting asset url 2016-10-17 09:46:57 +08:00
printempw
02fe0c67f1 update sources for updating 2016-10-16 22:29:49 +08:00
printempw
cfdf000b25 update to v3.1.2 2016-10-16 22:09:24 +08:00
printempw
1b1a198839 fix using ClosetModel 2016-10-16 22:06:31 +08:00
printempw
9186146437 add link for confused Chinese users 2016-10-16 21:58:25 +08:00
printempw
923b048e4f use awesome Carbon instead of awful strtotime() 2016-10-16 21:30:40 +08:00
printempw
0aa68aeb58 add some chart at admin panel 2016-10-16 21:21:37 +08:00
printempw
ab4c72184a add menu item for importing data from v2 2016-10-16 20:29:12 +08:00
printempw
86d82931bb add option of max size of uploaded file 2016-10-16 20:18:40 +08:00
printempw
7f0e9a4178 add search for closet 2016-10-16 20:04:21 +08:00
printempw
b01d0fded2 use Query Builder to refactor Closet model 2016-10-16 18:54:36 +08:00
printempw
c09700ea57 enhance abstraction of Player model 2016-10-16 18:16:15 +08:00
printempw
1717095cef rename most-liked to most-likes 2016-10-07 17:03:10 +08:00
printempw
d0a5191a61 abstract registering player 2016-10-07 16:06:38 +08:00
printempw
a22357d1c6 fix translation of auth.logout.fail 2016-10-06 17:57:07 +08:00
printempw
f81c405dba fix comparing with undefined 2016-10-06 17:56:01 +08:00
printempw
98a0d70571 fix cache-control header when return_200_when_notfound is on 2016-10-03 21:57:55 +08:00
printempw
41e0a628d6 modularize routes 2016-10-03 21:44:26 +08:00
printempw
f0532dcc6c fix minimal length of password 2016-10-02 20:30:27 +08:00
printempw
5efd875b06 fix PrettyPageException at setup pages 2016-09-30 23:21:04 +08:00
printempw
fa9629e796 fix updater 2016-09-30 21:00:47 +08:00
printempw
a4ad0d7e19 deprecate Utils::convertString() due to security 2016-09-30 20:54:10 +08:00
printempw
a079331bf8 enhance translations of skinlib 2016-09-30 20:46:15 +08:00
printempw
7ead22de93 enhance rendering menus 2016-09-30 17:00:41 +08:00
printempw
e71f608d18 fix typos in language files 2016-09-30 16:33:45 +08:00
printempw
975e34db95 allow to re-upload textures which were setted to private 2016-09-30 16:31:45 +08:00
printempw
ee4cbd2092 fix cache control of json profile 2016-09-28 23:26:19 +08:00
printempw
e3af929579 update to v3.1.1 2016-09-28 22:58:01 +08:00
printempw
e119ba073c add update tips 2016-09-28 22:56:21 +08:00
printempw
6a8cbc97e2 add notice for adblock 2016-09-28 18:12:35 +08:00
printempw
bafa285903 update .env.example 2016-09-28 18:08:16 +08:00
printempw
486286245f fix getting database prefix 2016-09-28 18:07:59 +08:00
printempw
fd7afd2ead fix i18n when http exception occurs 2016-09-28 17:54:07 +08:00
printempw
1618707e5d regenerate session id after logging out 2016-09-28 17:48:37 +08:00
printempw
4ee1d0a78a enhance translations of error pages 2016-09-28 13:23:07 +08:00
printempw
65b0109d39 fix showing flash message 2016-09-28 13:03:33 +08:00
printempw
c81ee6ecf3 update gulp zipping task for packing vendors 2016-09-27 22:47:20 +08:00
printempw
459c325597 fix translation of noticing wrong password 2016-09-27 22:41:10 +08:00
printempw
a877e93c3a fix getting environment variables 2016-09-27 22:35:04 +08:00
printempw
03fbf61cf8 fix checking in after zero 2016-09-27 22:32:15 +08:00
printempw
af95ef11d6 fix minus page numbers 2016-09-27 22:31:37 +08:00
printempw
446149c9ef fix url() function when using CDN 2016-09-27 22:15:51 +08:00
printempw
5304062b40 update composer.json 2016-09-27 22:15:23 +08:00
printempw
3dabe909b4 fix bug when getting type of real-time preview 2016-09-27 21:39:49 +08:00
printempw
783fcf5a4b update phpdotenv to v2.4.0 2016-09-27 21:38:13 +08:00
printempw
ae92f54122 fix compatibility of String.prototype.endsWith 2016-09-26 22:36:34 +08:00
printempw
e3dee247b4 fix invisible language select on mobile 2016-09-26 22:13:39 +08:00
printempw
fb54ca8281 fix view of skinlib search 2016-09-26 21:48:40 +08:00
printempw
ddc84518ee fix version control of update urls 2016-09-25 15:59:00 +08:00
printempw
901fb8c67d update to v3.1 2016-09-25 15:39:34 +08:00
printempw
33f684f791 add default value for APP_KEY 2016-09-25 15:32:35 +08:00
printempw
2e9ae091da add importing options automatically 2016-09-25 14:32:56 +08:00
printempw
c86dc05572 add options of caching things 2016-09-25 14:21:51 +08:00
printempw
084e04c30a add caching headers 2016-09-25 11:40:50 +08:00
printempw
d5bb4ed6bf update .bowerrc 2016-09-25 10:42:13 +08:00
printempw
206e7e7d1c adjust position of language select 2016-09-25 10:40:39 +08:00
printempw
15c3c55142 add renaming closet items 2016-09-25 10:35:16 +08:00
printempw
74c07d8353 working on i18n of admin pages 2016-09-25 10:02:40 +08:00
printempw
8602e795d9 delete unused config files 2016-09-25 09:55:04 +08:00
printempw
713e87ce00 fix search of users & players on admin page 2016-09-25 09:49:59 +08:00
printempw
eb8f33ef8f fix bug of transferring player 2016-09-25 09:38:46 +08:00
printempw
6f7e6534ba fix setup 2016-09-25 09:35:10 +08:00
printempw
5861b6f03b update gulpfile 2016-09-25 09:00:40 +08:00
printempw
f0ef6dec0d move static files to resources/assets 2016-09-25 00:03:07 +08:00
printempw
e598b37db4 move fonts & images to resources/dist 2016-09-24 23:48:52 +08:00
printempw
1e57e9cef4 redirect to former url after setting locale 2016-09-24 23:37:28 +08:00
printempw
effa0a42df working on i18n of controllers 2016-09-24 22:49:20 +08:00
printempw
1cdfb139c1 move language switcher to HomeController 2016-09-24 22:45:54 +08:00
printempw
85645a0e6a Merge pull request #34 from g-plane/master
Thx @g-plane for works on i18n
2016-09-24 17:31:41 +08:00
printempw
6d5105b5cd check mime type of file out of laravel validator 2016-09-22 22:00:12 +08:00
g-plane
a6dbd3998d working on i18n of errors 2016-09-18 19:45:01 +08:00
g-plane
629dd20113 working on i18n of utils.js 2016-09-18 18:58:01 +08:00
g-plane
197009cf2c working on i18n of skin library 2016-09-18 13:30:58 +08:00
printempw
734efafe53 fix escaping translation 2016-09-15 23:27:06 +08:00
printempw
d9b364556b working on i18n of user center 2016-09-15 23:03:58 +08:00
printempw
23f6e4b35e add helper function for menu and copyright 2016-09-15 20:35:46 +08:00
printempw
f102512204 update README 2016-09-15 11:21:39 +08:00
printempw
c52f0e092d update gulp zipping task 2016-09-15 11:10:13 +08:00
printempw
2ad59839a5 add JavaScript i18n files 2016-09-15 11:04:42 +08:00
printempw
8507860b15 add helper function for header and footer 2016-09-15 11:04:08 +08:00
printempw
41f24b9a3a add menu for switching languages 2016-09-15 09:20:02 +08:00
printempw
0fe9cf19b4 add route for setting locale dynamically 2016-09-14 23:27:02 +08:00
printempw
d51ab2bfc6 fix combining assets 2016-09-14 22:56:07 +08:00
printempw
9642c1c9b0 move assets to resources directory 2016-09-14 22:44:30 +08:00
printempw
a207810ab9 add setting display_errors 2016-09-14 20:02:46 +08:00
printempw
b816664428 fix bootstrap of setup and migration 2016-09-14 19:57:24 +08:00
printempw
a5a48789c5 working on translations 2016-09-11 15:40:09 +08:00
printempw
2c890730b6 fix email binding 2016-09-11 15:39:55 +08:00
printempw
cb04820196 use YAML for localization 2016-09-11 11:10:02 +08:00
printempw
8571384c4a update README 2016-09-10 23:35:43 +08:00
printempw
c9daa8a02b show nickname of user instead of uid 2016-09-10 22:15:07 +08:00
printempw
0a3ea9b1e1 fix undefined tid 2016-09-10 22:06:43 +08:00
printempw
963a8a516b fix ajax url of signing in 2016-09-10 21:43:08 +08:00
printempw
6c1311db5e add json helper function 2016-09-10 21:39:45 +08:00
printempw
97539d4178 fix ajax urls at skinlib 2016-09-10 21:37:00 +08:00
printempw
b455fe6f06 fix response of validations 2016-09-10 21:14:46 +08:00
printempw
9ef9137688 extend validator rules at ValidatorExtendServiceProvider 2016-09-10 19:06:54 +08:00
printempw
a172eb0def fix asset urls at update page 2016-09-10 19:05:40 +08:00
printempw
35c978697b fix checking file exists 2016-09-10 18:50:04 +08:00
printempw
0fe1391750 simplify entrance file 2016-09-10 18:09:12 +08:00
printempw
48c02f1f01 remove phpunit.xml 2016-09-10 17:56:51 +08:00
printempw
d35f7b3249 remove unused database directory 2016-09-10 17:54:31 +08:00
printempw
5e3e1e64d4 fixed support for sub directory 2016-09-10 17:52:33 +08:00
printempw
11d08b9545 remove unused tests 2016-09-10 17:52:04 +08:00
printempw
300d5c4b6f working on support for sub directory 2016-09-10 17:02:53 +08:00
printempw
fd622e2eb8 save session when terminate abnormally 2016-09-08 18:08:45 +08:00
printempw
fe8291d05c enhance notice when submitted too many wrong passwords 2016-09-05 22:27:35 +08:00
printempw
c6bee0727f fix urls of assets for sub directory 2016-09-05 22:18:34 +08:00
printempw
691f26e736 fix UrlGenerator at error page 2016-09-04 17:05:30 +08:00
printempw
b73c819142 use Mail of laravel 2016-09-04 16:15:15 +08:00
printempw
bc73947b6b update composer.json 2016-09-04 15:49:21 +08:00
printempw
1fa51927bb use composer to load helpers 2016-09-04 15:47:51 +08:00
printempw
681a56a741 use validator of laravel instead of Validate class 2016-09-04 15:35:12 +08:00
printempw
91411f5563 fix custom message of HttpException 2016-09-04 15:16:42 +08:00
printempw
f5c9e08ad6 use validator of laravel 2016-09-03 23:50:55 +08:00
printempw
2e1b073c55 add i18n files 2016-09-03 23:50:17 +08:00
printempw
f30c7c8aa4 add timestamp to control cache of update sources 2016-09-03 22:09:13 +08:00
printempw
ac0ef4e086 fix 3d preview when select type at upload page 2016-09-03 21:50:08 +08:00
printempw
635b13b7d2 fix missing loading gif 2016-09-03 21:46:10 +08:00
printempw
31001f15ae fix cache of requests with size 2016-09-03 21:12:13 +08:00
printempw
2b55346a0c fix undefined player_name at PlayerController 2016-09-03 21:06:01 +08:00
printempw
fde6005cbf fix preview with size 2016-09-03 21:04:34 +08:00
printempw
16709fdae0 update README 2016-08-30 16:25:49 +08:00
printempw
7ed653e876 separate event listeners from app core 2016-08-30 10:10:11 +08:00
printempw
fffb8fd441 add file cache for non-existent players 2016-08-30 08:55:02 +08:00
printempw
9f02cf26c1 use custom helpers instead of util classes 2016-08-29 23:31:43 +08:00
printempw
0dd6d0125c use redirect helper function 2016-08-29 23:12:45 +08:00
printempw
cfd289c0c8 add macros for responses 2016-08-29 22:48:55 +08:00
printempw
8196324f73 write data from cookie to session in a parent middleware 2016-08-29 22:46:57 +08:00
printempw
bde548de40 add PrettyPageException to handle exceptions which should be rendered 2016-08-29 19:47:30 +08:00
printempw
124b98f9d7 load some envs to config to prevent cache problems 2016-08-29 16:41:28 +08:00
printempw
3df7cbc0b6 use Predis as alias to prevent conflict 2016-08-29 16:09:00 +08:00
printempw
1caae0dd75 add cache for json profiles of players 2016-08-29 15:28:20 +08:00
printempw
9290f1d2a7 fix rendering HttpException with whoops 2016-08-29 15:10:51 +08:00
printempw
1798d07210 update routes 2016-08-29 14:49:10 +08:00
printempw
3949ddd59c add events and listeners for cache 2016-08-29 14:25:24 +08:00
printempw
35d71b331b fix relative urls 2016-08-29 14:24:28 +08:00
printempw
fc4b64ca34 enhance Option class 2016-08-29 14:23:53 +08:00
printempw
f7fd47f2d6 fix bootstrapers 2016-08-29 14:22:53 +08:00
printempw
cebae55ca5 fix preview of double layer skins 2016-08-29 12:19:21 +08:00
printempw
0fc0bc9c2b Merge branch 'master' of github.com:printempw/blessing-skin-server 2016-08-29 11:02:02 +08:00
printempw
20cdea101f use helper function to generate absolute assets url 2016-08-29 10:40:03 +08:00
Alexander Xia
03d5768f40 fix double layer skin preview 2016-08-29 02:34:54 +00:00
printempw
adcc681721 stop rotating when pause 2016-08-29 10:13:26 +08:00
printempw
f11070dcf0 fix relative urls 2016-08-28 22:16:48 +08:00
printempw
ca775a2809 add options to service container 2016-08-28 22:15:09 +08:00
printempw
b7dc5e395e fix getting app version 2016-08-28 21:48:15 +08:00
printempw
15154eda7f remove default auth system 2016-08-28 20:50:29 +08:00
printempw
776109f487 use Storage facade to manage files 2016-08-28 20:33:35 +08:00
printempw
bd1579d7fb fix bootstrapers at update page 2016-08-28 18:48:59 +08:00
printempw
7e23d08285 change dist directory of assets 2016-08-28 18:34:41 +08:00
printempw
cc74d4020d add installation check at BootServiceProvider 2016-08-28 18:33:47 +08:00
printempw
f7458bc638 register services providers manually at setup 2016-08-28 18:32:38 +08:00
printempw
368656d807 update .env 2016-08-28 13:42:05 +08:00
printempw
07589b54d0 use laravel elixir to compile assets 2016-08-28 11:49:22 +08:00
printempw
1e7030236e initialize for laravel 2016-08-28 10:05:21 +08:00
935 changed files with 77277 additions and 19719 deletions

View File

@ -1,3 +0,0 @@
{
"directory": "assets/bower_components"
}

View File

@ -0,0 +1,45 @@
APP_DEBUG=true
APP_ENV=development
APP_FALLBACK_LOCALE=en
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=blessingskin
DB_USERNAME=username
DB_PASSWORD=secret
DB_PREFIX=
# Hash Algorithm for Passwords
#
# Available values:
# - BCRYPT, ARGON2I, PHP_PASSWORD_HASH
# - MD5, SALTED2MD5
# - SHA256, SALTED2SHA256
# - SHA512, SALTED2SHA512
#
# New sites are *highly* recommended to use BCRYPT.
#
PWD_METHOD=BCRYPT
APP_KEY=base64:JaytOHG/JlLgulTVAhiS0tRqnAfCkQydbdP6VRmoAMY=
MAIL_MAILER=smtp
MAIL_HOST=
MAIL_PORT=465
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME=
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_CONNECTION=sync
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
PLUGINS_DIR=null
PLUGINS_URL=null

26
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1,26 @@
# [Choice] PHP version (use -bullseye variants on local arm64/Apple Silicon): 8, 8.1, 8.0, 7, 7.4, 7.3, 8-bullseye, 8.1-bullseye, 8.0-bullseye, 7-bullseye, 7.4-bullseye, 7.3-bullseye, 8-buster, 8.1-buster, 8.0-buster, 7-buster, 7.4-buster
ARG VARIANT=8-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/php:0-${VARIANT}
# Install MariaDB client
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y mariadb-client zlib1g-dev libpng-dev libzip-dev libwebp-dev \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
# Install php-mysql driver
RUN docker-php-ext-install mysqli pdo pdo_mysql gd zip
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# Enable Apache rewrite module
RUN a2enmod rewrite
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

View File

@ -0,0 +1,13 @@
Listen 8080
<Directory /workspace/public/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<VirtualHost *:8080>
DocumentRoot /workspace/public
ErrorLog /workspace/storage/logs/apache-error.log
CustomLog /workspace/storage/logs/apache-access.log combined
</VirtualHost>

View File

@ -0,0 +1,34 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/php-mariadb
// Update the VARIANT arg in docker-compose.yml to pick a PHP version
{
"name": "PHP & MariaDB (Community)",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"xdebug.php-debug",
"bmewburn.vscode-intelephense-client",
"mrmlnc.vscode-apache"
],
// For use with PHP or Apache (e.g.php -S localhost:8080 or apache2ctl start)
"forwardPorts": [8080, 3306],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sudo truncate -s 0 /etc/apache2/ports.conf && sudo rm -f /etc/apache2/sites-enabled/000-default.conf && sudo ln -sf /workspace/.devcontainer/blessing-skin.apache.conf /etc/apache2/sites-enabled/ && ln -sf .devcontainer/.env.devcontainer .env && composer install && yarn install",
// Start apache2 after the container is started
"postStartCommand": "apache2ctl start && echo '\\n👉 \\e[0;32mPlease run '\\'yarn build\\'' to build the frontend. Application is available on port 8080.\\e[0m 👈\\n'",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"powershell": "latest"
}
}

View File

@ -0,0 +1,47 @@
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
# Update 'VARIANT' to pick a version of PHP version: 8, 8.1, 8.0, 7, 7.4
# Append -bullseye or -buster to pin to an OS version.
# Use -bullseye variants on local arm64/Apple Silicon.
VARIANT: "8-bullseye"
# Optional Node.js version
NODE_VERSION: "lts/*"
volumes:
- ..:/workspace:cached
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db
# Uncomment the next line to use a non-root user for all processes.
# user: vscode
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
db:
image: mariadb:10.4
restart: unless-stopped
volumes:
- mariadb-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: mariadb
MYSQL_DATABASE: blessingskin
MYSQL_USER: username
MYSQL_PASSWORD: secret
# Add "forwardPorts": ["3306"] to **devcontainer.json** to forward MariaDB locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
volumes:
mariadb-data:

59
.dockerignore Normal file
View File

@ -0,0 +1,59 @@
.git/
.github/
.vscode/
.idea/
.cache/
.cache-loader/
coverage/
node_modules/
plugins/**
public/app/*
public/lang/*
public/plugins/**
resources/assets/tests/
storage/*.db
storage/*.sqlite
storage/insane-profile-cache
storage/oauth-public.key
storage/oauth-private.key
storage/install.lock
storage/options.php
storage/debugbar
storage/framework/cache/**
storage/framework/sessions/**
storage/framework/testing/
storage/framework/views/**
storage/logs/**
storage/packages/**
storage/textures/*
storage/update_cache/*
target/
tests/
vendor/*
_ide_helper.php
.dockerignore
.editorconfig
.env
.env.testing
.eslintignore
.eslintrc.yml
.gitignore
.php_cs.*
.php-cs-fixer.cache
.php-cs-fixer.dist.php
.phpstorm.meta.php
.phpunit.result.cache
.sass-cache
.uini
azure-pipelines.yml
crowdin.yml
docker-compose.yml
Dockerfile*
index.html
junit.xml
phpunit.xml
README*.md
server.php
tsconfig.dev.json
tsconfig.eslint.json
yarn-error.log

13
.editorconfig Normal file
View File

@ -0,0 +1,13 @@
# http://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{php,md,ps1,Dockerfile}]
indent_size = 4

View File

@ -1,46 +1,45 @@
###################################
# Blessing Skin Server V3 #
# Configuration #
###################################
APP_DEBUG=false
APP_ENV=production
APP_FALLBACK_LOCALE=en
# 务必在生产环境下禁用!
APP_DEBUG = true
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=blessingskin
DB_USERNAME=username
DB_PASSWORD=secret
DB_PREFIX=
# =========================
# = 数据库连接信息 =
# =========================
# MySQL 主机
DB_HOST = 127.0.0.1
# MySQL 端口,默认 3306
DB_PORT = 3306
# MySQL 数据库名
DB_DATABASE = ""
# MySQL 数据库用户名
DB_USERNAME = ""
# MySQL 连接密码
DB_PASSWORD = ""
# =========================
# 数据表前缀
# Hash Algorithm for Passwords
#
# 如果您有在同一数据库内安装多个 Blessing Skin Server 的需求,
# 请为每个皮肤站设置不同的数据表前缀。前缀名只能为数字、字母加下划线。
DB_PREFIX = ""
# 密码加密方式
# Available values:
# - BCRYPT, ARGON2I, PHP_PASSWORD_HASH
# - MD5, SALTED2MD5
# - SHA256, SALTED2SHA256
# - SHA512, SALTED2SHA512
#
# 可选的值有MD5, SALTED2MD5, SHA256
PWD_METHOD = "MD5"
# New sites are *highly* recommended to use BCRYPT.
#
PWD_METHOD=BCRYPT
APP_KEY=
# 盐,用于 token 与密码加密
# 修改为任意随机字符串以保证站点安全
SALT = "change-it+to*what)you^like"
MAIL_MAILER=smtp
MAIL_HOST=
MAIL_PORT=465
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME=
# SMTP 配置,用于发送重置密码的邮件
# MAIL_HOST 留空以停用重置密码功能
MAIL_HOST = ""
MAIL_PORT = 465
MAIL_USERNAME = ""
MAIL_PASSWORD = ""
MAIL_ENCRYPTION = "ssl"
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_CONNECTION=sync
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
PLUGINS_DIR=null
PLUGINS_URL=null

105
.env.testing Normal file
View File

@ -0,0 +1,105 @@
APP_DEBUG=false
APP_ENV=testing
DB_CONNECTION=sqlite
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=:memory:
DB_USERNAME=root
DB_PASSWORD=root
DB_PREFIX=
PWD_METHOD=BCRYPT
BCRYPT_ROUNDS=4
APP_KEY=base64:eVX/xzF5NhpGB2luswliFx9XSBsbbAP21wOi68X/P34=
MAIL_MAILER=array
MAIL_HOST=localhost
MAIL_PORT=465
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=ssl
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_CONNECTION=sync
LOG_CHANNEL=null
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=
REDIS_PORT=6379
PLUGINS_DIR=plugins
PLUGINS_URL=
TEXTURES_DIR=
JWT_SECRET=1tdM3gXarxYI4KlAHMBo238iC2tEb4I3EtBlZTQQXvInXIt7V2ix7hJ1KTvxCKZW
PASSPORT_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----
MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQC6q6SCprX3yfOE
DFBnfFk3R+33qvoe26nYQkavKfv7zA9KQxCBNHEsFKOQ6ui+ViebVHAIHBPm2518
REVMLN2JONvXbPETV6gJO/b6FFwo2Aow/GbTnesLhWEAPW11ei0/hBbjWF9hQZ/n
x3YsFk0xtml2iPDijfUohwp50iFyCQylw4S5Sy3vuVdM063dkxvECsU6wmHDev9C
PxFZGl3W2iLSwttYl7xmlwll8xuqxDQUJpJbOxrPeDKdDI1ikarSqA1c8bV1YLT+
CHxB7T5b1EPeaYRmeLl+wyd/ZxeBWWgDLBusi5wPFpSEIVxu1RzTYarOXEpD+XNV
Ohpb7LxpbJx8YRJru1B6CBouVO2pqoCEM21GtG7zSDNtaY+yVcj9Kf2SIbfz0e6a
SLAcyOT0q3aId4+z9q8TAfPVV7y0D7B3PaOz/3pMC+jHDjCRwQkN/DR7ODUKEjCd
UjsveGHtseBa3qBoKWcg39ZvwYeDF0P/cFa/yOqw5JxyWhbjk95YdPaSixdUyyMG
XkFTOrnBREVtBAfdTOG6WTFcIlyJK+ST0cJXVcrjFonbmJCCwTJqxz9t+935CfTt
CzLLPdONU16jZJ7j1cVoWb4L8o0OA+FBSawBxFOKyhFlh3+HKRnSCZSDqaSDsYUf
M3IupiGUcByhpZ9mNqhnLeivIXwapwIDAQABAoICAFu27F+S2DH0A9S7lh+aPV1H
VniKhVR2+aZ6va7fUmJ++n4yoB/TK82MIGcZu5uUyeXr4RVi8jZJbcF565BHNNtw
V7cq2/F0bmeHEkwBh9w7dRpnUIAlhS/GawfKpoaDLksYM4SkzUwECbQ/0GRN2sST
ipKGKtAtDihI3RFIeE1Ge/PPsdy2Ps4bAnUJRdHpLsmtvwSlL5JzUonyYawlI7jl
uRlTSqDnAFZpW+E+xjerKalC4EK5se0AceGuoqKszkCs98/UJCMVDigH9EER9sL4
chYLQtVz+DN7X+MdPDO9wThZygkHGPhi0DpxB7CevYhv4pN8TbLDE3Lq1ruWf2T3
7ts21ymjVIiOayBA9l86P0FSS/lP9KF53LyeNkOJKUy5On6xHoW5IKlrMJdmGwFH
B4yaR7bw5vxErhpMTzcYJVWqjCbo+PBJhdy7x+2XrrBLs9X0hfS/jeeAIuRlzju1
9xe3zO6U41sDjkCkrUavOn57DL6jh9LMgxT8cZkSdrP6rpawEyjPUi5kMbbQkv0j
eWiqz0vozJN5HcVpj36F5kqZyCnIojmeo4FCKdn7n/wvyGYQPSAekVpV80KzoJ2j
GQ440Q7Sgozj/Lw4cCPgG3/MA1Dwu+TUuaddFjBH2oqZ2X0bCqVCEVWhfmaD4z2R
I9C9nLvpxoMtcCHkG1VFAoIBAQDfawcBHMPxZQOy/qTqXZd7YR3bzGgd/SkLEWwg
PtDGKe36tDf3E/RGRij4HGl9v/fA7N/CufW0tJY7Ii/cn7yYdZg/dzaCoYIZbICl
CytWtsM0iH3XPuY3UpgsOwML0xK8hdD1U7qBKk5rnjF9Q9vKrB8ATR9hM0bPaGtr
Bqfx8A+kj6wqRpA8jbN0kZxJVv0/LgZSCrH3qUjHfXoYYtLhMBZd8UydyvyETo/1
Z44WS9oNqX8mBUvHjsuOQx3+eFPOr69QPIo06QMxytSEzMilgz40QUBWF68gKwGi
NYdUfR3IXVTmvJhYH2mQWqMKVk+KJFd2UanjKbBCOKrDSG4TAoIBAQDV5LMp/ztd
YQvMCWJzUrpazGqkoEGli/qxWb/pDpemgQT++lt6PBRQmmLKXZfNp9VJdZdP6+lF
ypGcA8tACY93m7Fk4wtewXG+0oTxmBkWqSiiO3ExoBQTxXLoZ9GwKt/exaM25QJ1
O2livxrYFFJbUe1YRqQENIURYk13RgeIaWS0gd9vp/yp0EhZAvGUPHFjKRsLjw7Y
gZDJ+lXj2pXg9THUzkhVDm+fM6blIsLcvf7qc8yKQI3nwZr00e/ba7xSNF8AhpdP
rxw59vm1RzsngZpZOK0Z1143gFRtGhhVWtvmhCvJo1EOssFu01ixE0bNq5nRIIJo
O/mY7NC9bCOdAoIBAEBfcyYz5pUwGM/DJTtN+i6XfeXt0HYLkn7Y50GnN7pRLHuW
36U2P6Tb5EQQ06hi3nzdA1/0+sG1Yq/pGsdD0zBOea6Xp8IdzQGMTMjBHhyfDkGd
rjyNqAF6r9PWsPsANx7Qo7N8C3nZ+bxyWSoRmkucKlaI4ii8gIOUP5cX1N4V4Dv3
FZEcwcRgw7srlU9gXBmPJk0PPdXxFcI8+if6mW4+z8MDmqLAcN+iT0JTMxJjipFz
K+qFjh8Smr4Dwqmme+dKoYXJ27yBAuWe3nrhElL2LL8bqfDkZBYtrgvRxotmfWVU
1vigkHibnGv2YZHB6qsP649w2jVUtq9t6m3X+bcCggEAEKDqCN7N17GewCsOm1aY
JEz2EXxf/iXGxJjsoYq/4XLwV35RNEyNa8LE4WSrU5KzszVQISd/CCz6av2khIL5
w1u4S9aW4LP7StGFAl9HvApEnXAvmaMPTIYyK70+gQqkQuZsjOz65vBKfiHLTXcu
++h/ojhDsgv/OF3DFf28wi8nZB0gqMaPjwghR8JB07trOUFN1/U0O0K/ZeRvXvp0
YnvNdvTejLZFmUPjuracHZsrwUBla24fWiAkEtprYkya5G0r4ZeVFd3QPPVlbmFu
SOD7heoxEuw6Z+gzKBQ6RhB9PguSd+eZeqINBbeqkoGkJIMtvyNe4AmhmvD2PXO1
xQKCAQAx12vD3q2+DHrpJ4fKGp1RbCxFIOYgXcBJ6zCozVZXpLUa54IBTLyQyDNF
D8+Wq5b1IbCnxBn55tsgq/CSLkVHigVfUDGnAt3lD+ggLdZmu7ayQY0BNe1quF5M
EgkOE0uYtq+2p+u4gxRB+gnQd1YIlPs0U0mrawbzV5ZX2vR5Ry1XpBno75JpnUbN
3D9DuIDVLuqsKJcx6KClWef2PzJB2uN7jDf4UnCtp5QCFB1GNt+5AzCNh9Bozas8
OflASrSn64AeyCZycCplmRY/F4BnH++7YI0Q/mjawByW7qYoHkFzmKuUcgakh200
y/ieeWy8Vunl0e4T4Bz/0zInBifn
-----END PRIVATE KEY-----"
PASSPORT_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAuqukgqa198nzhAxQZ3xZ
N0ft96r6Htup2EJGryn7+8wPSkMQgTRxLBSjkOrovlYnm1RwCBwT5tudfERFTCzd
iTjb12zxE1eoCTv2+hRcKNgKMPxm053rC4VhAD1tdXotP4QW41hfYUGf58d2LBZN
MbZpdojw4o31KIcKedIhcgkMpcOEuUst77lXTNOt3ZMbxArFOsJhw3r/Qj8RWRpd
1toi0sLbWJe8ZpcJZfMbqsQ0FCaSWzsaz3gynQyNYpGq0qgNXPG1dWC0/gh8Qe0+
W9RD3mmEZni5fsMnf2cXgVloAywbrIucDxaUhCFcbtUc02GqzlxKQ/lzVToaW+y8
aWycfGESa7tQeggaLlTtqaqAhDNtRrRu80gzbWmPslXI/Sn9kiG389HumkiwHMjk
9Kt2iHePs/avEwHz1Ve8tA+wdz2js/96TAvoxw4wkcEJDfw0ezg1ChIwnVI7L3hh
7bHgWt6gaClnIN/Wb8GHgxdD/3BWv8jqsOSccloW45PeWHT2kosXVMsjBl5BUzq5
wURFbQQH3UzhulkxXCJciSvkk9HCV1XK4xaJ25iQgsEyasc/bfvd+Qn07Qsyyz3T
jVNeo2Se49XFaFm+C/KNDgPhQUmsAcRTisoRZYd/hykZ0gmUg6mkg7GFHzNyLqYh
lHAcoaWfZjaoZy3oryF8GqcCAwEAAQ==
-----END PUBLIC KEY-----"

9
.eslintignore Normal file
View File

@ -0,0 +1,9 @@
public/
vendor/
coverage/
plugins/
node_modules/
*.d.ts
resources/assets/tests/__mocks__/
resources/assets/tests/ts-shims/
resources/assets/tests/*.ts

27
.eslintrc.yml Normal file
View File

@ -0,0 +1,27 @@
root: true
parser: '@typescript-eslint/parser'
parserOptions:
project: tsconfig.eslint.json
plugins:
- '@typescript-eslint/eslint-plugin'
extends:
- eslint:recommended
- plugin:@typescript-eslint/recommended
- plugin:@typescript-eslint/recommended-requiring-type-checking
- plugin:react-hooks/recommended
rules:
prefer-const: error
'@typescript-eslint/no-unsafe-assignment': off
'@typescript-eslint/no-unsafe-member-access': off
'@typescript-eslint/no-unsafe-return': off
'@typescript-eslint/no-unused-vars': off
'@typescript-eslint/explicit-module-boundary-types': off
'@typescript-eslint/no-explicit-any': off
'@typescript-eslint/ban-ts-comment': off
'@typescript-eslint/no-non-null-assertion': off
'@typescript-eslint/no-floating-promises': off
'@typescript-eslint/no-misused-promises':
- off
- checksVoidReturn: false
'@typescript-eslint/unbound-method': off
'@typescript-eslint/restrict-template-expressions': off

81
.github/CONTRIBUTING.md vendored Normal file
View File

@ -0,0 +1,81 @@
# 贡献指南
欢迎您为 Blessing Skin 作出贡献!
## 分支约定
不管是直接 push 代码还是提交 Pull Request都必须使 commit 指向 `dev` 分支。
## 开发
### 环境设置
首先确保您安装好以下工具:
- [Git](https://git-scm.org)
- [Node.js](https://nodejs.org)
- [Yarn](https://yarnpkg.com)
- [Composer](https://getcomposer.org)
- [PowerShell Core](https://github.com/PowerShell/PowerShell#get-powershell)
然后执行以下命令:
```bash
git clone https://github.com/bs-community/blessing-skin-server.git
cd blessing-skin-server
composer install
cp .env.example .env
php artisan key:generate
yarn
```
然后在 `.env` 中配置好您的环境信息,务必设置好 `ASSET_URL`,否则无法编译前端资源。
### 进行开发
运行 Blessing Skin 前,前端代码需要并构建。
`.env` 中的 `APP_ENV``development` 时,您需要先执行 `yarn dev` 并保持此进程的运行。这样 Blessing Skin 的前端资源才能被正确加载,同时使页面带有热重载功能。(有时热重载可能会失效,此时需要您手动刷新页面)
另外,在运行 `yarn dev` 即运行 `webpack-dev-server` 时,由于 `webpack-dev-server` 的端口往往与 Blessing Skin 的端口不同,因此有可能导致热重载失败。此时可以在 Nginx 中添加以下配置:
```
location ~* \w+\.hot-update\.json$ {
rewrite (\w+\.hot-update\.json)$ /$1 break;
proxy_pass http://$host:8080;
}
```
`APP_ENV` 为其它值时,您需要事先执行 `pwsh ./tools/build.ps1`。此命令将构建并压缩前端资源。通常用于生产环境。
> 如果传递 `-Simple` 参数给 `build.ps1` 脚本,则只会运行 webpack 来编译代码,而不会复制首页背景以及生成 commit 信息。
### 测试
进行前端测试:
```bash
yarn test
```
请尽量保证前端测试的覆盖率为 100%。
进行 PHP 代码测试:
```bash
./vendor/bin/phpunit
```
## 代码规范
请确保您的编辑器或 IDE 安装好 EditorConfig 插件。如果进行前端开发,推荐安装上 ESLint 插件。(您也可以通过执行 `yarn lint` 进行检查)
## 发布
> 本节仅针对本项目的维护成员。
首先请确保您当前处于 `dev` 分支。然后,运行 `yarn new-version <action>` 即可发布新版本,不需要其它人工操作。
其中 `action` 参数是必需的,且只能为 `patch`、`minor`、`major` 中的其中一个。
另外,可以不定期地将 `dev` 上的 commits 合并到 `master` 分支,以满足一些想尝鲜的用户。但尽管如此,这不意味着 `dev` 分支是随意的—— `dev` 分支上的功能、特性可以是未完成的,但不应该影响用户的使用,因为也允许用户使用 `dev` 分支上的代码去体验新特性。

1
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1 @@
custom: https://afdian.net/@blessing-skin

View File

@ -0,0 +1,71 @@
name: Bug 报告
description: 发起 bug 报告
body:
- type: markdown
attributes:
value: |
在报告问题之前,请确保您已经 **认真** 阅读:
- [FAQ](https://blessing.netlify.app/en/faq.html)
- [报告问题的正确姿势](https://blessing.netlify.app/report.html)
- type: input
id: bs
attributes:
label: Blessing Skin 版本
validations:
required: true
- type: dropdown
id: php
attributes:
label: PHP 版本
options:
- '7.3'
- '7.4'
- '8.0'
- '8.1'
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: 出现问题时所使用的浏览器
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
validations:
required: true
- type: dropdown
id: web-server
attributes:
label: 您正在使用的 Web Server
options:
- Nginx
- Apache
- type: checkboxes
id: baota
attributes:
label: 您正在使用宝塔吗?
options:
- label:
- type: textarea
id: what-happened
attributes:
label: 出现了什么问题?
description: 顺便告诉我们,您期望的行为是怎样的?
validations:
required: true
- type: textarea
id: logs
attributes:
label: 错误日志
description: 您可以粘贴 Blessing Skin 的日志或 Web Server 的日志。Blessing Skin 的日志位于 `storage/logs` 目录里。
render: text
- type: textarea
id: reproduction
attributes:
label: 重现步骤
description: 详细描述您出错前的操作步骤
validations:
required: true

64
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@ -0,0 +1,64 @@
name: Bug Report
description: File a bug report
body:
- type: markdown
attributes:
value: |
Please filing an issue, please make sure you've read:
- [FAQ](https://blessing.netlify.app/en/faq.html)
- type: input
id: bs
attributes:
label: Which version of Blessing Skin are you using?
validations:
required: true
- type: dropdown
id: php
attributes:
label: Which version of PHP are you using?
options:
- '7.3'
- '7.4'
- '8.0'
- '8.1'
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
validations:
required: true
- type: dropdown
id: web-server
attributes:
label: Which web server are you using?
options:
- Nginx
- Apache
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
validations:
required: true
- type: textarea
id: logs
attributes:
label: Error Logs
description: You can paste logs of Blessing Skin or your web server. Logs of Blessing Skin can be found at `storage/logs` directory.
render: text
- type: textarea
id: reproduction
attributes:
label: Steps to Reproduce
description: Tell us how to reproduce this issue.
validations:
required: true

20
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,20 @@
blank_issues_enabled: false
contact_links:
- name: Ask questions about using Blessing Skin
url: https://github.com/bs-community/blessing-skin-server/discussions
about: If you're not going to report a bug, please ask and answer questions there.
- name: Report Issue about Blessing Skin plugins
url: https://github.com/bs-community/blessing-skin-plugins/issues
about: Please ask and answer questions there.
- name: Report Issue about integrating with Flarum
url: https://github.com/bs-community/flarum-oauth-client/issues
about: Please ask and answer questions there.
- name: 询问关于使用 Blessing Skin 的问题
url: https://github.com/bs-community/blessing-skin-server/discussions
about: 如果您并不是要报告 bug请在那里进行讨论。
- name: 报告与 Blessing Skin 插件有关的问题
url: https://github.com/bs-community/blessing-skin-plugins/issues
about: 请在那里报告问题。
- name: 报告与 Flarum 对接有关的问题
url: https://github.com/bs-community/flarum-oauth-client/issues
about: 请在那里报告问题。

155
.github/workflows/CI.yml vendored Normal file
View File

@ -0,0 +1,155 @@
name: CI
on:
push:
branches:
- dev
paths-ignore:
- 'resources/lang/**'
- '**.md'
pull_request:
branches:
- dev
paths-ignore:
- 'resources/lang/**'
- '**.md'
jobs:
php-lint:
name: PHP Linting
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
coverage: none
extensions: mbstring, dom, fileinfo, gd, imagick
- name: Install dependencies
run: |
composer install --prefer-dist --no-progress
- name: Prepare
run: |
cp .env.example .env
mkdir -p resources/views/overrides
- name: Validate Twig templates
run: php artisan twig:lint -v
- name: Check coding style
run: ./vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --diff --format=txt
php:
name: PHP ${{ matrix.php }} Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP only
uses: shivammathur/setup-php@v2
if: matrix.php != '8.3'
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: mbstring, dom, fileinfo, sqlite, gd, zip, imagick
- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
if: matrix.php == '8.3'
with:
php-version: ${{ matrix.php }}
coverage: xdebug
extensions: mbstring, dom, fileinfo, sqlite, gd, zip, imagick
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Run tests only
if: matrix.php != '8.3'
run: ./vendor/bin/phpunit
- name: Run tests with coverage report
if: matrix.php == '8.3'
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Upload coverage report
uses: codecov/codecov-action@v1
if: matrix.php == '8.3' && success()
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: github-actions
lint:
name: Frontend Linting
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run checks
run: |
yarn lint
yarn fmt:check
yarn type:check
jest:
name: Frontend Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: yarn
- name: Run tests
run: yarn test --coverage
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: github-actions
build:
name: Snapshot Build
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
extensions: mbstring, dom, fileinfo, sqlite, gd, zip, imagick
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Node dependencies
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-lock-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-lock-
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer install --prefer-dist --no-progress --no-dev
yarn install --frozen-lockfile
- name: Build frontend
run: |
yarn build
cp resources/assets/src/images/bg.webp public/app/
cp resources/assets/src/images/favicon.ico public/app/
- uses: benjlevesque/short-sha@v3.0
id: short-sha
- name: Archive release
run: zip -9 -r blessing-skin-server-${{ steps.short-sha.outputs.sha }}.zip app bootstrap config database plugins public resources/lang resources/views resources/misc/textures routes storage vendor .env.example artisan LICENSE README.md README-zh.md index.html
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: blessing-skin-server-${{ steps.short-sha.outputs.sha }}.zip
path: blessing-skin-server-${{ steps.short-sha.outputs.sha }}.zip

40
.github/workflows/Release.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Release
on:
push:
tags:
- '*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build and create archive
run: ./tools/release.ps1
shell: pwsh
env:
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
- name: Get version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Upload release asset
id: upload_release_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./blessing-skin-server-${{ steps.get_version.outputs.VERSION }}.zip
asset_name: blessing-skin-server-${{ steps.get_version.outputs.VERSION }}.zip
asset_content_type: application/zip

37
.github/workflows/Telegram.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Telegram
on:
push:
branches:
- dev
paths:
- 'app/**'
- 'bootstrap/**'
- 'config/**'
- 'database/**'
- 'public/**'
- 'resources/**'
- 'routes/**'
- '*.lock'
- 'webpack.*'
workflow_dispatch:
jobs:
notification:
name: Send Message
runs-on: ubuntu-latest
steps:
- name: Download bot
run: |
$headers = @{ Authorization = 'Bearer ${{ secrets.GITHUB_TOKEN }}' }
$botRelease = (Invoke-WebRequest -Headers $headers 'https://api.github.com/repos/bs-community/telegram-bot/releases/latest').Content | ConvertFrom-Json
$botBinUrl = ((Invoke-WebRequest -Headers $headers $botRelease.assets_url).Content | ConvertFrom-Json).browser_download_url
bash -c "curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -fSL $botBinUrl -o bot"
chmod +x ./bot
shell: pwsh
- name: Run bot
run: ./bot diff
shell: pwsh
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}

35
.gitignore vendored
View File

@ -1,14 +1,29 @@
.env
.sass-cache
coverage
.idea/
.cache/
.cache-loader/
vendor/*
textures/*
storage/textures
storage/textures/*
storage/update_cache/*
node_modules/*
resources/cache/*
assets/bower_components/*
assets/dist/*
koala-config.json
assets/css/*
assets/js/*
bootstrap/*
resources/assets/*
storage/*
target/
yarn-error.log
_ide_helper.php
.phpstorm.meta.php
.uini
junit.xml
storage/*.db
storage/*.sqlite
storage/insane-profile-cache
storage/oauth-public.key
storage/oauth-private.key
storage/install.lock
storage/options.php
.phpunit.result.cache
.php-cs-fixer.cache
resources/views/overrides
.DS_Store
*/.DS_Store

41
.gitpod.yml Normal file
View File

@ -0,0 +1,41 @@
tasks:
- init: yarn install
command: yarn dev
- init: composer install
command: |
cp .env.example .env
mkdir public/app/
cp resources/assets/src/images/bg.webp resources/assets/src/images/favicon.ico public/app
touch storage/database.db
sed 's/DB_CONNECTION=mysql/DB_CONNECTION=sqlite/' -i .env
sed 's/DB_DATABASE=blessingskin/DB_DATABASE=\/workspace\/blessing-skin-server\/storage\/database\.db/' -i .env
php artisan key:generate
php artisan serve --host=0.0.0.0
- command: gp ports await 8080 && gp preview $(gp url 8000)
github:
prebuilds:
# enable for the master/default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: false
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: false
vscode:
extensions:
- 'editorconfig.editorconfig'
- 'eamodio.gitlens'
- 'bmewburn.vscode-intelephense-client'
- 'esbenp.prettier-vscode'
- 'jpoissonnier.vscode-styled-components'
- 'mblode.twig-language-2'
- 'felixfbecker.php-debug'
ports:
- port: 8080
visibility: public

View File

@ -1,12 +0,0 @@
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php [L]
# Protect .env file
<Files .env>
Order allow,deny
Deny from all
</Files>

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn pretty-quick --staged

23
.php-cs-fixer.dist.php Normal file
View File

@ -0,0 +1,23 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in('app')
->in('database')
->in('routes')
->in('tests');
$config = new PhpCsFixer\Config();
return $config->setRules([
'@Symfony' => true,
'align_multiline_comment' => true,
'array_syntax' => ['syntax' => 'short'],
'increment_style' => ['style' => 'post'],
'list_syntax' => ['syntax' => 'short'],
'yoda_style' => false,
'global_namespace_import' => [
'import_constants' => true,
'import_functions' => true,
'import_classes' => null,
],
])
->setFinder($finder);

7
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"recommendations": [
"editorconfig.editorconfig",
"bmewburn.vscode-intelephense-client",
"esbenp.prettier-vscode"
]
}

34
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,34 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Jest Tests",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["${file}"],
"internalConsoleOptions": "openOnSessionStart",
"skipFiles": ["<node_internals>/**"]
},
{
"type": "php",
"request": "launch",
"name": "Launch with XDebug",
"ignore": ["**/vendor/**/*.php"]
},
{
"type": "firefox",
"request": "launch",
"reAttach": true,
"name": "Launch with Firefox Debugger",
"url": "http://localhost/",
"webRoot": "${workspaceFolder}",
"pathMappings": [
{
"url": "webpack:///",
"path": "${workspaceFolder}/"
}
]
}
]
}

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}

82
Dockerfile Normal file
View File

@ -0,0 +1,82 @@
FROM composer:latest as vendor
WORKDIR /app
COPY composer.json composer.lock ./
RUN composer install \
--prefer-dist \
--no-dev \
--no-suggest \
--no-progress \
--no-autoloader \
--no-scripts \
--no-interaction \
--ignore-platform-reqs
FROM node:alpine as frontend
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY postcss.config.js tsconfig.build.json tsconfig.json webpack.config.ts ./
COPY tools/*Plugin.ts ./tools/
COPY resources ./resources
RUN yarn build && \
cp resources/assets/src/images/bg.webp public/app/ && \
cp resources/assets/src/images/favicon.ico public/app/ && \
# Strip unused files
rm -rf *.config.js *.config.ts tsconfig.* \
package.json yarn.lock node_modules/ \
resources/assets/ resources/lang resources/misc resources/misc/backgrounds/ \
tools/
FROM composer:latest as builder
WORKDIR /app
COPY . ./
COPY --from=vendor /app ./
COPY --from=frontend /app/public ./public
COPY --from=frontend /app/resources/views/assets ./resources/views/assets
RUN composer dump-autoload -o --no-dev -n && \
rm -rf *.config.js *.config.ts tsconfig.* \
package.json yarn.lock node_modules/ \
resources/assets/ resources/misc resources/misc/backgrounds/ \
tools/ && \
mv .env.example .env && \
php artisan key:generate && \
mv .env storage/ && \
ln -s storage/.env .env && \
touch storage/database.db && \
mkdir storage/plugins && \
sed 's/PLUGINS_DIR=null/PLUGINS_DIR=\/app\/storage\/plugins/' -i storage/.env && \
sed 's/DB_CONNECTION=mysql/DB_CONNECTION=sqlite/' -i storage/.env && \
sed 's/DB_DATABASE=blessingskin/DB_DATABASE=\/app\/storage\/database\.db/' -i storage/.env
FROM php:8-apache
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions gd zip
WORKDIR /app
COPY --from=builder /app ./
ENV APACHE_DOCUMENT_ROOT /app/public
RUN chown -R www-data:www-data . && \
sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf && \
sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf && \
a2enmod rewrite headers
EXPOSE 80
VOLUME ["/app/storage"]

695
LICENSE
View File

@ -1,674 +1,21 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
MIT License
Copyright (c) 2016-present The Blessing Skin Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

92
README-zh.md Normal file
View File

@ -0,0 +1,92 @@
- **简体中文**
- [English](./README.md)
<p align="center"><img src="https://media.githubusercontent.com/media/bs-community/logo/main/logo.png"></p>
<p align="center">
<a href="https://github.com/bs-community/blessing-skin-server/actions"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/bs-community/blessing-skin-server/CI?style=flat-square"></a>
<a href="https://codecov.io/gh/bs-community/blessing-skin-server"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/bs-community/blessing-skin-server?style=flat-square"></a>
<a href="https://github.com/bs-community/blessing-skin-server/releases"><img alt="GitHub release (latest SemVer including pre-releases)" src="https://img.shields.io/github/v/release/bs-community/blessing-skin-server?include_prereleases&style=flat-square"></a>
<a href="https://github.com/bs-community/blessing-skin-server/blob/master/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/bs-community/blessing-skin-server?style=flat-square"></a>
<a href="https://discord.com/invite/QAsyEyt"><img alt="Discord" src="https://discord.com/api/guilds/761226550921658380/widget.png"></a>
</p>
优雅的开源 Minecraft 皮肤站,现在,回应您的等待。
Blessing Skin 是一款能让您上传、管理和分享您的 Minecraft 皮肤和披风的 Web 应用程序。与修改游戏材质包不同的是,所有人都能在游戏中看到各自的皮肤和披风(当然,前提是玩家们要使用同一个皮肤站)。
Blessing Skin 是一个开源的 PHP 项目,这意味着您可以自由地在您的服务器上部署它。
## 特性
- 完整实现了一个皮肤站该有的功能
- 支持单用户多个角色
- 通过皮肤库来分享您的皮肤和披风!
- 易于使用
- 可视化的用户、角色、材质管理页面
- 详细的站点配置页面
- 多处 UI/UX 优化只为更好的用户体验
- 安全
- 支持多种安全密码 Hash 算法
- 注册可要求 Email 验证
- 防止恶意请求的积分系统
- 强大的可扩展性
- 多种多样的插件
- 支持与 Authme/Discuz 等程序的用户数据对接(插件)
- 支持自定义 Yggdrasil API 外置登录系统(插件)
## 环境要求
Blessing Skin 对您的服务器有一定的要求。在大多数情况下,下列所需的 PHP 扩展已经开启。
- 一台支持 URL 重写的主机Nginx 或 Apache
- PHP >= 8.1.0
- 安装并启用如下 PHP 扩展:
- OpenSSL >= 1.1.1 (TLS 1.3)
- PDO
- Mbstring
- Tokenizer
- GD
- XML
- Ctype
- JSON
- fileinfo
- zip
- Imagick
## 快速使用
请参阅 [安装指南](https://blessing.netlify.app/setup.html)。
## 插件系统
Blessing Skin 提供了强大的插件系统,您可以通过添加多种多样的插件来为您的皮肤站添加功能。
## 自行构建
详情可阅读 [这里](https://blessing.netlify.app/build.html)。
> 您可以订阅我们的 Telegram 频道 [Blessing Skin News](https://t.me/blessing_skin_news) 来获取最新开发动态。当有新的 Commit 被推送时,我们的机器人将会在频道内发送一条消息来提示您能否拉取最新代码,以及拉取后应该做什么。
## 国际化i18n
Blessing Skin 可支持多种语言,当前支持英语、简体中文和西班牙语。
如果您愿意将您的翻译贡献出来,欢迎参与 [我们的 Crowdin 项目](https://crowdin.com/project/blessing-skin)。
## 问题报告
请参阅 [报告问题的正确姿势](https://blessing.netlify.app/report.html)。
## 相关链接
- [用户手册](https://blessing.netlify.app/)
- [插件开发文档](https://bs-plugin.netlify.app/)
## 版权
MIT License
Copyright (c) 2016-present The Blessing Skin Team
程序原作者为 [@printempw](https://printempw.github.io/),转载请注明。

311
README.md
View File

@ -1,275 +1,90 @@
# Blessing Skin Server
- [简体中文](./README-zh.md)
- **English**
优雅的开源 PHP Minecraft 皮肤站,现已更新至 v3。
<p align="center"><img src="https://media.githubusercontent.com/media/bs-community/logo/main/logo.png"></p>
![screenshot](https://img.prinzeugen.net/image.php?di=VH7Z)
<p align="center">
<a href="https://github.com/bs-community/blessing-skin-server/actions"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/bs-community/blessing-skin-server/CI.yml?branch=dev&style=flat-square"></a>
<a href="https://codecov.io/gh/bs-community/blessing-skin-server"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/bs-community/blessing-skin-server?style=flat-square"></a>
<a href="https://github.com/bs-community/blessing-skin-server/releases"><img alt="GitHub release (latest SemVer including pre-releases)" src="https://img.shields.io/github/v/release/bs-community/blessing-skin-server?include_prereleases&style=flat-square"></a>
<a href="https://github.com/bs-community/blessing-skin-server/blob/master/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/bs-community/blessing-skin-server?style=flat-square"></a>
<a href="https://discord.com/invite/QAsyEyt"><img alt="Discord" src="https://discord.com/api/guilds/761226550921658380/widget.png"></a>
</p>
特性:
-----------
- 支持 [UniSkinAPI](https://github.com/RecursiveG/UniSkinServer/blob/master/doc/UniSkinAPI_zh-CN.md)
- 支持 [CustomSkinLoader API](https://github.com/xfl03/CustomSkinLoaderAPI/blob/master/CustomSkinAPI/CustomSkinAPI_en.md)
- 同时支持旧版样式链接
- ~~支持与 Authme、CrazyLogin、Discuz 等程序进行数据对接~~ V3 的数据对接还在开发中
- 支持一个用户多个角色
- 皮肤库、衣柜功能
- 积分系统,防止用户恶意上传/添加角色
- 完善的用户管理后台以及配置页面
- 多种后台配色
- 可以获取由皮肤生成的头像
Puzzled by losing your custom skins in Minecraft servers runing in offline mode? Now you can easily get them back with the help of Blessing Skin!
面向开发者们的特性:
-----------
- MVC 设计模式,使用强大的 Blade 模板引擎和 Eloquent ORM
- 使用 composer、bower 等包管理器管理依赖
- 几乎所有请求都使用 ajax 发送
- 使用 CSS 预处理器 Sass
- 使用 gulp 作为前端构建工具
Blessing Skin is a web application where you can upload, manage and share your custom skins & capes! Unlike modifying a resource pack, everyone in the game will see the different skins of each other (of course they should register at the same website too).
Blessing Skin is an open-source project written in PHP, which means you can deploy it freely on your own web server!
环境要求:
-----------
1. 一台支持 URL 重写的主机Nginx、Apache 或 IIS
2. **PHP 版本 >= 5.5.9**
3. PHP 安装 GD 扩展库
4. 目录的写权限
5. 不支持安装在子目录
## Features
快速使用:
-----------
1. 下载发布的打包版源码,重命名 `.env.example``.env` 并配置你的数据库连接信息(如果是 windows 就重命名为 `.env.`,后面那个点会自动去掉的)
2. 访问 `/setup/index.php` 进行安装
3. 如果你是用的是 Nginx请配置你的 `nginx.conf` 并加入重写规则
4. 访问你的站点,注册一个新账户或者使用 `安装时所配置的账户` 登录
5. (在数据库的 `users` 表中将你的用户 permission 字段设置为 `1` 即可获取管理员权限, 设置为 `2` 即为超级管理员)
6. 在角色管理面板使用你的 Minecraft 角色名添加一个新角色
7. 在皮肤库上传你的皮肤 & 披风(可设为私有)并添加至衣柜
8. 应用皮肤 & 披风到你的角色
9. 在你所使用的皮肤 Mod 配置文件中加入你的地址
10. 完成啦~
- A fully functional skin hosting service
- Multiple player names can be owned by one user on the website
- Share your skins and capes online with skin library!
- Easy-to-use
- Visual page for user/player/texture management
- Detailed option pages
- Many tweaks for a better UI/UX
- Security
- Support many secure password hash algorithms
- Email verification for registration
- Score system for preventing evil requests
- Incredibly extensible
- Plenty of plugins available
- Integration with Authme/Discuz (available as plugin)
- Support custom Yggdrasil API authentication (available as plugin)
自行构建:
------------
普通用户下载打包版并按照 `快速使用` 中的方法配置即可,但是如果你想要自定义 Blessing Skin Server 的一些内容的话,就需要自己用源码构建啦。
## Requirements
**不推荐不熟悉 shell 操作以及不想折腾的用户使用。**
Blessing Skin has only a few system requirements. In most cases, these PHP extensions are already enabled.
先从 git 上 clone 源码:
- Web server with URL rewriting enabled (Nginx or Apache)
- PHP >= 8.1.0
- PHP Extensions
- OpenSSL >= 1.1.1 (TLS 1.3)
- PDO
- Mbstring
- Tokenizer
- GD
- XML
- Ctype
- JSON
- fileinfo
- zip
- Imagick
```
$ git clone https://github.com/printempw/blessing-skin-server.git
```
## Quick Install
使用 composer 安装 PHP 依赖:
Please read [Installation Guide](https://blessing.netlify.app/en/setup.html).
```
$ composer install
```
## Plugin System
使用 bower 安装前端依赖库:
Blessing Skin provides an elegant and powerful plugin system, and you can attach plenty of functions and customization to your site via installing plugins.
```
$ bower install
```
## Build From Source
使用 gulp 构建前端代码:
Please refer to [Manual Build](https://blessing.netlify.app/build.html).
```
$ gulp copy && gulp build
```
## Internationalization
可以开始使用啦~
Blessing Skin supports multiple languages, while currently supporting English, Simplified Chinese and Spanish.
服务器配置:
------------
如果你使用 Apache 或者 IIS 作为 web 服务器(大部分的虚拟主机),那么恭喜你,我已经帮你把重写规则写好啦,开箱即用,无需任何配置~
If you are willing to contribute your translation, welcome to join [our Crowdin project](https://crowdin.com/project/blessing-skin).
如果你使用 Nginx请在你的 `nginx.conf` 中加入如下规则**(重要)**
## Report Bugs
```
location / {
try_files $uri $uri/ /index.php?$query_string;
}
Read [FAQ](https://blessing.netlify.app/faq.html) and double check if your situation doesn't suit any case mentioned there before reporting.
# Protect .env file
location ~ /\.env
{
deny all;
}
```
When reporting a problem, please attach your log file (located at `storage/logs/laravel.log`) and the information of your server where the error occured on. You should also read this [guide](https://blessing.netlify.app/report.html) before reporting a problem.
现在你可以访问 `http://example.com/{ player_name }.json` 来得到你的首选 API可在后台配置的 JSON 用户数据。另外一个 API 的 JSON 数据可以通过访问 `http://example.com/(usm|csl)/{ player_name }.json` 得到。
## Related Links
上传完皮肤后,你就可以访问 `http://example.com/skin/{ player_name }.png` 得到你的首选模型皮肤啦。 披风图片在这里:`http://example.com/cape/{ player_name }.png` 。
- [User Manual](https://blessing.netlify.app/en/)
- [Plugins Development Documentation](https://bs-plugin.netlify.app/)
客户端配置:
------------
#### CustomSkinLoader 13.1 及以上(推荐)
## Copyright & License
CustomSkinLoader 13.1 经过作者的完全重写,支持了 CSL API并且使用了高端洋气的 JSON 配置文件。你问我 JSON 是什么?为什么不去问问神奇海螺呢。
MIT License
配置文件位于 `.minecraft/CustomSkinLoader/CustomSkinLoader.json`,你需要在 loadlist 数组最顶端加入你的皮肤站配置。
举个栗子(原来的 JSON 长这样):
```json
{
"enable": true,
"loadlist": [
{
"name": "Mojang",
"type": "MojangAPI"
},
{
"name": "SkinMe",
"type": "UniSkinAPI",
"root": "http://www.skinme.cc/uniskin/"
}
]
}
```
你需要将其修改成像这样:
```json
{
"enable": true,
"loadlist": [
{
"name": "YourSkinServer",
"type": "CustomSkinAPI",
"root": "http://example.com/"
},
{
"name": "Mojang",
"type": "MojangAPI"
},
{
"name": "SkinMe",
"type": "UniSkinAPI",
"root": "http://www.skinme.cc/uniskin/"
}
]
}
```
`"type"` 字段按照你的后台中配置的首选 API 来填(CustomSkinAPI|UniSkinAPI)CSL 13.1 版是支持三种加载方式的~~万受♂之王~~
如果还是不会填的话,请查看 CSL 开发者的 [MCBBS 发布贴](http://www.mcbbs.net/thread-269807-1-1.html)。
#### CustomSkinLoader 13.1 版以下:
`.minecraft/CustomSkinLoader/skinurls.txt` 中添加你的皮肤站地址:
```
http://example.com/skin/*.png
http://skins.minecraft.net/MinecraftSkins/*.png
http://minecrack.fr.nf/mc/skinsminecrackd/*.png
http://www.skinme.cc/MinecraftSkins/*.png
```
注意你需要将你的皮肤站地址放在配置文件最上方以优先加载。
同理在 `.minecraft/CustomSkinLoader/capeurls.txt` 中加入:
```
http://example.com/cape/*.png
```
#### UniSkinMod 1.4 版及以上(推荐)
配置文件位于 `.minecraft/config/UniSkinMod/UniSkinMod.json`
举个栗子(原来的 JSON 长这样):
```json
{
"rootURIs": [
"http://www.skinme.cc/uniskin",
"https://skin.prinzeugen.net"
],
"legacySkinURIs": [],
"legacyCapeURIs": []
}
```
你需要在 `rootURIs` 字典中加入你的皮肤站的地址:
```json
{
"rootURIs": [
"http://www.skinme.cc/uniskin",
"https://skin.prinzeugen.net",
"http://example.com"
],
"legacySkinURIs": [],
"legacyCapeURIs": []
}
```
如果你的皮肤站首选 API 为 CustomSkinLoader API 的话,你需要在 UniSkinMod 配置文件中填入类似于 `http://example.com/usm` (添加后缀)来支持 UniSkinMod。
配置 `rootURIs` 后,`legacySkinURIs` 和 `legacyCapeURIs` 可以不用配置。详见[文档](https://github.com/RecursiveG/UniSkinMod/blob/1.9/README.md)。
#### UniSkinMod 1.2 及 1.3 版
在你 MC 客户端的 `.minecraft/config/UniSkinMod.cfg` 中加入你的皮肤站根地址:
举个栗子:
```
# SkinMe Default
Root: http://www.skinme.cc/uniskin
# Your Server
Root: http://example.com
```
如果你把皮肤站安装到子目录的话,请一起带上你的子目录。
#### UniSkinMod 1.2 版以下
同样是在 `.minecraft/config/UniSkinMod.cfg` 中配置你的皮肤站地址,但是稍有点不一样。旧版的 UniSkinMod 是不支持 Json API 的,而是使用了传统图片链接的方式(其实这样的话皮肤站也好实现):
举个栗子:
```
Skin: http://skins.minecraft.net/MinecraftSkins/%s.png
Cape: http://skins.minecraft.net/MinecraftCloaks/%s.png
# Your Server
Skin: http://example.com/skin/%s.png
Cape: http://example.com/cape/%s.png
```
这是通过 URL 重写(伪静态)实现的,所以皮肤站目录下没有 `skin``cape` 目录也不要惊讶哦。
如果一切都正常工作,你就可以在游戏中看到你的皮肤啦~
> 顺带一提用户中心有一个自动生成配置的功能哦~
![screenshot2](https://img.prinzeugen.net/image.php?di=42U6)
常见问题:
------------
#### 访问 `example.com/skin/xxx.png ` 404?
请确认你的伪静态URL 重写)是否配置正确。
#### 500 错误?
本程序使用了一些 PHP 5.4 的新特性,请确保你的 PHP 版本 >= 5.4
#### 游戏中皮肤不显示?
请先确认你的皮肤站 URL 重写规则已经配置正确,并且可以正常获取皮肤图片。
如果还是不能显示皮肤,请阅读您所使用的皮肤 Mod 的 FAQ。
还是不行的话,请在启动器开启调试模式,并且查看所有关于 skin 的日志, CSL 的日志位于 `.minecraft/CustomSkinLoader/CustomSkinLoader.log`
一般来说看了就可以明白了,如果还是不明白请邮件 [联系我](mailto:h@prinzeugen.net)(带上你的日志)。
版权:
------------
Blessing Skin Server 程序是基于 GUN General Public License v3.0 开放源代码的自由软件,你可以遵照 GPLv3 协议来修改和重新发布这一程序。
程序原作者为 [@printempw](https://prinzeugen.net/),转载请注明。
Copyright (c) 2016-present The Blessing Skin Team

View File

@ -0,0 +1,52 @@
<?php
namespace App\Console\Commands;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
class BsInstallCommand extends Command
{
protected $signature = 'bs:install {email} {password} {nickname}';
protected $description = 'Execute installation and create a super administrator.';
public function handle(Filesystem $filesystem)
{
if ($filesystem->exists(storage_path('install.lock'))) {
$this->info('You have installed Blessing Skin Server. Nothing to do.');
return;
}
$this->call('migrate', ['--force' => true]);
if (!$this->getLaravel()->runningUnitTests()) {
// @codeCoverageIgnoreStart
$this->call('key:generate');
$this->call('passport:keys', ['--no-interaction' => true]);
// @codeCoverageIgnoreEnd
}
option(['site_url' => url('/')]);
$admin = new User();
$admin->email = $this->argument('email');
$admin->nickname = $this->argument('nickname');
$admin->score = option('user_initial_score');
$admin->avatar = 0;
$admin->password = app('cipher')->hash($this->argument('password'), config('secure.salt'));
$admin->ip = '127.0.0.1';
$admin->permission = User::SUPER_ADMIN;
$admin->register_at = Carbon::now();
$admin->last_sign_at = Carbon::now()->subDay();
$admin->verified = true;
$admin->save();
$filesystem->put(storage_path('install.lock'), '');
$this->info('Installation completed!');
$this->info('We recommend to modify your "Site URL" option if incorrect.');
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Console\Commands;
use App\Services\Option;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Foundation\Application;
class OptionsCacheCommand extends Command
{
protected $signature = 'options:cache';
protected $description = 'Cache Blessing Skin options';
public function handle(Filesystem $filesystem, Application $app)
{
$path = storage_path('options.php');
$filesystem->delete($path);
$app->forgetInstance(Option::class);
$content = var_export(resolve(Option::class)->all(), true);
$notice = '// This is auto-generated. DO NOT edit manually.'.PHP_EOL;
$content = '<?php'.PHP_EOL.$notice.'return '.$content.';';
$filesystem->put($path, $content);
$this->info('Options cached successfully.');
}
}

View File

@ -0,0 +1,25 @@
<?php
namespace App\Console\Commands;
use App\Services\PluginManager;
use Illuminate\Console\Command;
class PluginDisableCommand extends Command
{
protected $signature = 'plugin:disable {name}';
protected $description = 'Disable a plugin';
public function handle(PluginManager $plugins)
{
$plugin = $plugins->get($this->argument('name'));
if ($plugin) {
$plugins->disable($this->argument('name'));
$title = trans($plugin->title);
$this->info(trans('admin.plugins.operations.disabled', ['plugin' => $title]));
} else {
$this->warn(trans('admin.plugins.operations.not-found'));
}
}
}

View File

@ -0,0 +1,26 @@
<?php
namespace App\Console\Commands;
use App\Services\PluginManager;
use Illuminate\Console\Command;
class PluginEnableCommand extends Command
{
protected $signature = 'plugin:enable {name}';
protected $description = 'Enable a plugin';
public function handle(PluginManager $plugins)
{
$name = $this->argument('name');
$result = $plugins->enable($name);
if ($result === true) {
$plugin = $plugins->get($name);
$title = trans($plugin->title);
$this->info(trans('admin.plugins.operations.enabled', ['plugin' => $title]));
} elseif ($result === false) {
$this->warn(trans('admin.plugins.operations.not-found'));
}
}
}

View File

@ -0,0 +1,44 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class SaltRandomCommand extends Command
{
protected $signature = 'salt:random {--show : Display the salt instead of modifying files}';
protected $description = 'Set the application salt';
public function handle()
{
$salt = $this->generateRandomSalt();
if ($this->option('show')) {
return $this->line('<comment>'.$salt.'</comment>');
}
// Next, we will replace the application salt in the environment file so it is
// automatically setup for this developer. This salt gets generated using a
// secure random byte generator and is later base64 encoded for storage.
$this->setKeyInEnvironmentFile($salt);
$this->laravel['config']['secure.salt'] = $salt;
$this->info("Application salt [$salt] set successfully.");
}
protected function setKeyInEnvironmentFile(string $salt)
{
file_put_contents($this->laravel->environmentFilePath(), str_replace(
'SALT = '.$this->laravel['config']['secure.salt'],
'SALT = '.$salt,
file_get_contents($this->laravel->environmentFilePath())
));
}
protected function generateRandomSalt(): string
{
return bin2hex(resolve(\Illuminate\Contracts\Encryption\Encrypter::class)->generateKey('AES-128-CBC'));
}
}

View File

@ -0,0 +1,49 @@
<?php
namespace App\Console\Commands;
use Composer\Semver\Comparator;
use Illuminate\Console\Command;
use Illuminate\Contracts\Console\Kernel as Artisan;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Facades\Cache;
class UpdateCommand extends Command
{
protected $signature = 'update';
protected $description = 'Execute update.';
public function handle(Artisan $artisan, Filesystem $filesystem)
{
$this->procedures()->each(function ($procedure, $version) {
if (Comparator::lessThan(option('version'), $version)) {
$procedure();
}
});
option(['version' => config('app.version')]);
$artisan->call('migrate', ['--force' => true]);
$artisan->call('view:clear');
$filesystem->put(storage_path('install.lock'), '');
Cache::flush();
$this->info(trans('setup.updates.success.title'));
}
/**
* @codeCoverageIgnore
*/
protected function procedures()
{
return collect([
// this is just for testing
'0.0.1' => fn () => event('__0.0.1'),
'5.0.0' => function () {
if (option('home_pic_url') === './app/bg.jpg') {
option(['home_pic_url' => './app/bg.webp']);
}
},
]);
}
}

18
app/Console/Kernel.php Normal file
View File

@ -0,0 +1,18 @@
<?php
namespace App\Console;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
protected $commands = [
\Laravel\Passport\Console\KeysCommand::class,
Commands\BsInstallCommand::class,
Commands\OptionsCacheCommand::class,
Commands\PluginDisableCommand::class,
Commands\PluginEnableCommand::class,
Commands\SaltRandomCommand::class,
Commands\UpdateCommand::class,
];
}

View File

@ -1,269 +0,0 @@
<?php
namespace App\Controllers;
use App\Models\User;
use App\Models\UserModel;
use App\Models\Player;
use App\Models\PlayerModel;
use App\Models\Texture;
use App\Exceptions\E;
use Validate;
use Utils;
use View;
class AdminController extends BaseController
{
public function index()
{
View::show('admin.index');
}
public function customize()
{
View::show('admin.customize');
}
public function score()
{
View::show('admin.score');
}
public function options()
{
View::show('admin.options');
}
public function update()
{
$action = Utils::getValue('action', $_GET);
if ($action == "check") {
$updater = new \Updater(\App::version());
if ($updater->newVersionAvailable()) {
View::json([
'new_version_available' => true,
'latest_version' => $updater->latest_version
]);
} else {
View::json([
'new_version_available' => false,
'latest_version' => $updater->current_version
]);
}
} elseif ($action == "download") {
View::show('admin.download');
} else {
View::show('admin.update');
}
}
public function users()
{
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$filter = isset($_GET['filter']) ? $_GET['filter'] : "";
$q = isset($_GET['q']) ? $_GET['q'] : "";
if ($filter == "") {
$users = UserModel::orderBy('uid');
} elseif ($filter == "email") {
$users = UserModel::like('email', $q)->orderBy('uid');
} elseif ($filter == "nickname") {
$users = UserModel::like('nickname', $q)->orderBy('uid');
}
$total_pages = ceil($users->count() / 30);
$users = $users->skip(($page - 1) * 30)->take(30)->get();
echo View::make('admin.users')->with('users', $users)
->with('filter', $filter)
->with('q', $q)
->with('page', $page)
->with('total_pages', $total_pages)
->render();
}
public function players()
{
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$filter = isset($_GET['filter']) ? $_GET['filter'] : "";
$q = isset($_GET['q']) ? $_GET['q'] : "";
if ($filter == "") {
$players = PlayerModel::orderBy('uid');
} elseif ($filter == "player_name") {
$players = PlayerModel::like('player_name', $q)->orderBy('uid');
} elseif ($filter == "uid") {
$players = PlayerModel::where('uid', $q)->orderBy('uid');
}
$total_pages = ceil($players->count() / 30);
$players = $players->skip(($page - 1) * 30)->take(30)->get();
echo View::make('admin.players')->with('players', $players)
->with('filter', $filter)
->with('q', $q)
->with('page', $page)
->with('total_pages', $total_pages)
->render();
}
/**
* Handle ajax request from /admin/users
*/
public function userAjaxHandler()
{
$action = isset($_GET['action']) ? $_GET['action'] : "";
if ($action == "color") {
Validate::checkPost(['color_scheme']);
$color_scheme = str_replace('_', '-', $_POST['color_scheme']);
\Option::set('color_scheme', $color_scheme);
View::json('修改配色成功', 0);
}
$user = new User(Utils::getValue('uid', $_POST));
// current user
$cur_user = new User($_SESSION['uid']);
if (!$user->is_registered)
throw new E('用户不存在', 1);
if ($action == "email") {
Validate::checkPost(['email']);
if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
View::json('邮箱格式错误', 3);
}
if ($user->setEmail($_POST['email']))
View::json('邮箱修改成功', 0);
} elseif ($action == "nickname") {
Validate::checkPost(['nickname']);
if (Utils::convertString($_POST['nickname']) != $_POST['nickname'])
View::json('无效的昵称。昵称中包含了奇怪的字符。', 1);
if ($user->setNickName($_POST['nickname']))
View::json('昵称已成功设置为 '.$_POST['nickname'], 0);
} elseif ($action == "password") {
Validate::checkPost(['password']);
if (\Validate::password($_POST['password'])) {
if ($user->changePasswd($_POST['password']))
View::json('密码修改成功', 0);
}
} elseif ($action == "score") {
Validate::checkPost(['score']);
if ($user->setScore($_POST['score']))
View::json('积分修改成功', 0);
} elseif ($action == "ban") {
if ($user->getPermission() == "1") {
if ($cur_user->getPermission() != "2")
View::json('非超级管理员无法封禁普通管理员');
} elseif ($user->getPermission() == "2") {
View::json('超级管理员无法被封禁');
}
$permission = $user->getPermission() == "-1" ? "0" : "-1";
if ($user->setPermission($permission)) {
View::json([
'errno' => 0,
'msg' => '账号已被' . ($permission == '-1' ? '封禁' : '解封'),
'permission' => $user->getPermission()
]);
}
} elseif ($action == "admin") {
if ($cur_user->getPermission() != "2")
View::json('非超级管理员无法进行此操作');
if ($user->getPermission() == "2")
View::json('超级管理员无法被解除');
$permission = $user->getPermission() == "1" ? "0" : "1";
if ($user->setPermission($permission)) {
View::json([
'errno' => 0,
'msg' => '账号已被' . ($permission == '1' ? '设为' : '解除') . '管理员',
'permission' => $user->getPermission()
]);
}
} elseif ($action == "delete") {
if ($user->delete())
View::json('账号已被成功删除', 0);
} else {
throw new E('非法参数', 1);
}
}
/**
* Handle ajax request from /admin/players
*/
public function playerAjaxHandler()
{
$action = isset($_GET['action']) ? $_GET['action'] : "";
// exception will be throw by model if player is not existent
$player = new Player(Utils::getValue('pid', $_POST));
if ($action == "preference") {
Validate::checkPost(['preference']);
if ($_POST['preference'] != "default" && $_POST['preference'] != "slim")
View::json('无效的参数', 0);
if ($player->setPreference($_POST['preference']))
View::json('角色 '.$player->player_name.' 的优先模型已更改至 '.$_POST['preference'], 0);
} elseif ($action == "texture") {
Validate::checkPost(['model', 'tid']);
if ($_POST['model'] != "steve" && $_POST['model'] != "alex" && $_POST['model'] != "cape")
View::json('无效的参数', 0);
if (!(is_numeric($_POST['tid']) && Texture::find($_POST['tid'])))
View::json('材质 tid.'.$_POST['tid'].' 不存在', 1);
if ($player->setTexture(['tid_'.$_POST['model'] => $_POST['tid']]))
View::json('角色 '.$player->player_name.' 的材质修改成功', 0);
} elseif ($action == "owner") {
Validate::checkPost(['uid']);
if (!is_numeric($_POST['uid']))
View::json('无效的参数', 0);
$user = new User($_POST['uid']);
if (!$user->is_registered)
View::json('不存在的用户', 1);
if ($player->setOwner($_POST['uid']))
View::json('角色 '.$player->player_name.' 已成功让渡至 '.$user->getNickName(), 0);
} elseif ($action == "delete") {
if (PlayerModel::where('pid', $_POST['pid'])->delete())
View::json('角色已被成功删除', 0);
} else {
throw new E('非法参数', 1);
}
}
}

View File

@ -1,228 +0,0 @@
<?php
namespace App\Controllers;
use App\Models\User;
use App\Models\UserModel;
use App\Exceptions\E;
use Validate;
use Mail;
use View;
use Utils;
use Option;
use Http;
class AuthController extends BaseController
{
public function login()
{
View::show('auth.login');
}
public function handleLogin()
{
// instantiate user
$user = ($_SESSION['auth_type'] == 'email') ?
new User(null, ['email' => $_POST['email']]) :
new User(null, ['username' => $_POST['username']]);
if (Utils::getValue('login_fails', $_SESSION) > 3) {
if (strtolower(Utils::getValue('captcha', $_POST)) != strtolower($_SESSION['phrase']))
View::json('验证码填写错误', 1);
}
if (!$user->is_registered) {
View::json('用户不存在哦', 2);
} else {
if ($user->checkPasswd($_POST['password'])) {
unset($_SESSION['login_fails']);
$_SESSION['uid'] = $user->uid;
$_SESSION['token'] = $user->getToken();
$time = $_POST['keep'] == true ? 86400 : 3600;
setcookie('uid', $user->uid, time()+$time, '/');
setcookie('token', $user->getToken(), time()+$time, '/');
View::json([
'errno' => 0,
'msg' => '登录成功,欢迎回来~',
'token' => $user->getToken()
]);
} else {
$_SESSION['login_fails'] = isset($_SESSION['login_fails']) ?
$_SESSION['login_fails'] + 1 : 1;
View::json([
'errno' => 1,
'msg' => '邮箱或密码不对哦~',
'login_fails' => $_SESSION['login_fails']
]);
}
}
}
public function logout()
{
if (isset($_SESSION['token'])) {
setcookie('uid', '', time() - 3600, '/');
setcookie('token', '', time() - 3600, '/');
session_destroy();
View::json('登出成功~', 0);
} else {
throw new E('并没有有效的 session', 1);
}
}
public function register()
{
if (Option::get('user_can_register') == 1) {
View::show('auth.register');
} else {
throw new E('残念。。本皮肤站已经关闭注册咯 QAQ', 7, true);
}
}
public function handleRegister()
{
if (strtolower(Utils::getValue('captcha', $_POST)) != strtolower($_SESSION['phrase']))
View::json('验证码填写错误', 1);
$user = new User(null, ['email' => $_POST['email']]);
if (!$user->is_registered) {
if (Option::get('user_can_register') == 1) {
if (Validate::password($_POST['password'])) {
// If amount of registered accounts of IP is more than allowed amounts,
// then reject the register.
if (UserModel::where('ip', Http::getRealIP())->count() < Option::get('regs_per_ip'))
{
if (Validate::nickname(Utils::getValue('nickname', $_POST)))
View::json('无效的昵称,昵称不能包含奇怪的字符', 1);
// register new user
$user = $user->register($_POST['password'], Http::getRealIP());
$user->setNickName($_POST['nickname']);
// set cookies
setcookie('uid', $user->uid, time() + 3600, '/');
setcookie('token', $user->getToken(), time() + 3600, '/');
View::json([
'errno' => 0,
'msg' => '注册成功,正在跳转~',
'token' => $user->getToken()
]);
} else {
View::json('你最多只能注册 '.Option::get('regs_per_ip').' 个账户哦', 7);
}
}
} else {
View::json('残念。。本皮肤站已经关闭注册咯 QAQ', 7);
}
} else {
View::json('这个邮箱已经注册过啦,换一个吧', 5);
}
}
public function forgot()
{
if ($_ENV['MAIL_HOST'] != "") {
View::show('auth.forgot');
} else {
throw new E('本站已关闭重置密码功能', 8, true);
}
}
public function handleForgot()
{
if (strtolower(Utils::getValue('captcha', $_POST)) != strtolower($_SESSION['phrase']))
View::json('验证码填写错误', 1);
if ($_ENV['MAIL_HOST'] == "")
View::json('本站已关闭重置密码功能', 1);
if (isset($_SESSION['last_mail_time']) && (time() - $_SESSION['last_mail_time']) < 60)
View::json('你邮件发送得太频繁啦,过 60 秒后再点发送吧', 1);
$user = new User(null, ['email' => $_POST['email']]);
if (!$user->is_registered)
View::json('该邮箱尚未注册', 1);
$mail = new Mail();
$mail->from(Option::get('site_name'))
->to($_POST['email'])
->subject('重置您在 '.Option::get('site_name').' 上的账户密码');
$uid = $user->uid;
$token = base64_encode($user->getToken().substr(time(), 4, 6).Utils::generateRndString(16));
$url = Option::get('site_url')."/auth/reset?uid=$uid&token=$token";
$mail->content(View::make('auth.mail')->with('reset_url', $url)->render());
if (!$mail->send()) {
View::json('邮件发送失败,详细信息:'.$mail->getLastError(), 2);
} else {
$_SESSION['last_mail_time'] = time();
View::json('邮件已发送,一小时内有效,请注意查收.', 0);
}
}
public function reset()
{
if (isset($_GET['uid']) && isset($_GET['token'])) {
$user = new User($_GET['uid']);
if (!$user->is_registered)
Http::redirect('./forgot', '无效的链接');
$token = substr(base64_decode($_GET['token']), 0, -22);
if ($user->getToken() != $token) {
Http::redirect('./forgot', '无效的链接');
}
$timestamp = substr(base64_decode($_GET['token']), strlen($token), 6);
// more than 1 hour
if ((substr(time(), 4, 6) - $timestamp) > 3600) {
Http::redirect('./forgot', '链接已过期');
}
echo View::make('auth.reset')->with('user', $user);
} else {
Http::redirect('./login', '非法访问');
}
}
public function handleReset()
{
Validate::checkPost(['uid', 'password']);
if (Validate::password($_POST['password'])) {
$user = new User($_POST['uid']);
$user->changePasswd($_POST['password']);
View::json('密码重置成功', 0);
}
}
public function captcha()
{
$builder = new \Gregwar\Captcha\CaptchaBuilder;
$builder->build($width = 100, $height = 34);
$_SESSION['phrase'] = $builder->getPhrase();
header('Content-type: image/jpeg');
$builder->output();
}
}

View File

@ -1,10 +0,0 @@
<?php
namespace App\Controllers;
/**
* 突然发现这个基类卵用没有 (;´Д`)
*/
class BaseController
{
}

View File

@ -1,72 +0,0 @@
<?php
namespace App\Controllers;
use App\Models\User;
use App\Models\Texture;
use App\Models\Closet;
use App\Models\ClosetModel;
use App\Exceptions\E;
use View;
use Option;
class ClosetController extends BaseController
{
private $closet;
public function __construct()
{
$this->closet = new Closet($_SESSION['uid']);
}
public function index()
{
$category = isset($_GET['category']) ? $_GET['category'] : "skin";
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$items = array_slice($this->closet->getItems($category), ($page-1)*6, 6);
$total_pages = ceil(count($this->closet->getItems($category)) / 6);
echo View::make('user.closet')->with('items', $items)
->with('page', $page)
->with('category', $category)
->with('total_pages', $total_pages)
->with('user', (new User($_SESSION['uid'])))
->render();
}
public function info()
{
View::json($this->closet->getItems());
}
public function add()
{
\Validate::checkPost(['tid', 'name']);
if ($this->closet->add($_POST['tid'], $_POST['name'])) {
$t = Texture::find($_POST['tid']);
$t->likes += 1;
$t->save();
View::json('材质 '.$_POST['name'].' 收藏成功~', 0);
}
}
public function remove()
{
if (!is_numeric(\Utils::getValue('tid', $_POST)))
throw new E('非法参数', 1);
if ($this->closet->remove($_POST['tid'])) {
$t = Texture::find($_POST['tid']);
$t->likes = $t->likes - 1;
$t->save();
View::json('材质已从衣柜中移除', 0);
}
}
}

View File

@ -1,30 +0,0 @@
<?php
namespace App\Controllers;
use App\Models\User;
class HomeController extends BaseController
{
public function index()
{
if (isset($_COOKIE['uid']) && isset($_COOKIE['token'])) {
$user = new User($_COOKIE['uid']);
if ($_COOKIE['token'] == $user->getToken() && $user->getPermission() != "-1") {
$_SESSION['uid'] = $_COOKIE['uid'];
$_SESSION['token'] = $_COOKIE['token'];
} else {
// delete cookies
setcookie("uid", "", time() - 3600, '/');
setcookie("token", "", time() - 3600, '/');
}
}
$user = isset($_SESSION['uid']) ? new User($_SESSION['uid']) : null;
echo \View::make('index')->with('user', $user);
}
}

View File

@ -1,152 +0,0 @@
<?php
namespace App\Controllers;
use App\Models\User;
use App\Models\Player;
use App\Models\PlayerModel;
use App\Models\Texture;
use App\Exceptions\E;
use Validate;
use Utils;
use Option;
use View;
class PlayerController extends BaseController
{
private $player = null;
private $user = null;
public function __construct()
{
$this->user = new User($_SESSION['uid']);
if (isset($_POST['pid'])) {
$this->player = new Player($_POST['pid']);
if (!$this->player)
\Http::abort(404, '角色不存在');
}
}
public function index()
{
echo View::make('user.player')->with('players', $this->user->getPlayers()->toArray())->with('user', $this->user);
}
public function add()
{
$player_name = $_POST['player_name'];
if (!isset($player_name))
View::json('你还没有填写要添加的角色名哦', 1);
if (!Validate::playerName($player_name))
{
$msg = "无效的角色名。角色名只能包含" . ((Option::get('allow_chinese_playername') == "1") ? "汉字、" : "")."字母、数字以及下划线";
View::json($msg, 2);
}
if (!PlayerModel::where('player_name', $player_name)->get()->isEmpty())
View::json('该角色名已经被其他人注册掉啦', 6);
if ($this->user->getScore() < Option::get('score_per_player'))
View::json('积分不够添加角色啦', 7);
$player = new PlayerModel();
$player->uid = $this->user->uid;
$player->player_name = $player_name;
$player->preference = "default";
$player->last_modified = Utils::getTimeFormatted();
$player->save();
$this->user->setScore(Option::get('score_per_player'), 'minus');
View::json('成功添加了角色 '.$player_name.'', 0);
}
public function delete()
{
$player_name = $this->player->model->player_name;
$this->player->model->delete();
$this->user->setScore(Option::get('score_per_player'), 'plus');
View::json('角色 '.$player_name.' 已被删除', 0);
}
public function show()
{
echo json_encode($this->player->model->toArray(), JSON_NUMERIC_CHECK);
}
public function rename()
{
$new_player_name = Utils::getValue('new_player_name', $_POST);
if (!$new_player_name)
throw new E('非法参数', 1);
if (!Validate::playerName($new_player_name))
{
$msg = "无效的角色名。角色名只能包含" . ((Option::get('allow_chinese_playername') == "1") ? "汉字、" : "")."字母、数字以及下划线";
View::json($msg, 2);
}
if (!PlayerModel::where('player_name', $new_player_name)->get()->isEmpty())
View::json('此角色名已被他人使用,换一个吧~', 6);
$old_player_name = $this->player->model->player_name;
$this->player->model->player_name = $new_player_name;
$this->player->model->last_modified = Utils::getTimeFormatted();
$this->player->model->save();
View::json('角色 '.$old_player_name.' 已更名为 '.$_POST['new_player_name'], 0);
}
/**
* A wrapper of Player::setTexture()
*/
public function setTexture()
{
$tid = Utils::getValue('tid', $_POST);
if (!is_numeric($tid))
throw new E('非法参数', 1);
if (!($texture = Texture::find($tid)))
View::json('Unexistent texture.', 6);
$field_name = "tid_".$texture->type;
$this->player->model->$field_name = $tid;
$this->player->model->last_modified = Utils::getTimeFormatted();
$this->player->model->save();
View::json('材质已成功应用至角色 '.$this->player->model->player_name.'', 0);
}
public function clearTexture()
{
$this->player->clearTexture();
View::json('角色 '.$this->player->model->player_name.' 的材质已被成功重置', 0);
}
public function setPreference()
{
if (!isset($_POST['preference']) ||
($_POST['preference'] != "default" && $_POST['preference'] != "slim"))
{
throw new E('非法参数', 1);
}
$this->player->setPreference($_POST['preference']);
View::json('角色 '.$this->player->player_name.' 的优先模型已更改至 '.$_POST['preference'], 0);
}
}

View File

@ -1,270 +0,0 @@
<?php
namespace App\Controllers;
use App\Models\User;
use App\Models\Texture;
use App\Exceptions\E;
use Validate;
use Option;
use Utils;
use View;
use Http;
class SkinlibController extends BaseController
{
private $user = null;
function __construct()
{
$this->user = isset($_SESSION['uid']) ? new User($_SESSION['uid']) : null;
}
public function index()
{
$filter = isset($_GET['filter']) ? $_GET['filter'] : "skin";
$sort = isset($_GET['sort']) ? $_GET['sort'] : "time";
$sort_by = ($sort == "time") ? "upload_at" : $sort;
$uid = isset($_GET['uid']) ? $_GET['uid'] : 0;
$page = isset($_GET['page']) ? $_GET['page'] : 1;
if ($filter == "skin") {
$textures = Texture::where(function($query) {
$query->where('type', '=', 'steve')
->orWhere('type', '=', 'alex');
})->orderBy($sort_by, 'desc');
} elseif ($filter == "user") {
$textures = Texture::where('uploader', $uid)->orderBy($sort_by, 'desc');
} else {
$textures = Texture::where('type', $filter)->orderBy($sort_by, 'desc');
}
if (!is_null($this->user)) {
// show private textures when show uploaded textures of current user
if ($uid != $this->user->uid && !$this->user->is_admin)
$textures = $textures->where('public', '1');
} else {
$textures = $textures->where('public', '1');
}
$total_pages = ceil($textures->count() / 20);
$textures = $textures->skip(($page - 1) * 20)->take(20)->get();
echo View::make('skinlib.index')->with('user', $this->user)
->with('sort', $sort)
->with('filter', $filter)
->with('textures', $textures)
->with('page', $page)
->with('total_pages', $total_pages)
->render();
}
public function search()
{
$q = isset($_GET['q']) ? $_GET['q'] : "";
$filter = isset($_GET['filter']) ? $_GET['filter'] : "skin";
$sort = isset($_GET['sort']) ? $_GET['sort'] : "time";
$sort_by = ($sort == "time") ? "upload_at" : $sort;
if ($filter == "skin") {
$textures = Texture::like('name', $q)->where(function($query) use ($q) {
$query->where('public', '=', '1')
->where('type', '=', 'steve')
->orWhere('type', '=', 'alex');
})->orderBy($sort_by, 'desc')->get();
} else {
$textures = Texture::like('name', $q)
->where('type', $filter)
->where('public', '1')
->orderBy($sort_by, 'desc')->get();
}
echo View::make('skinlib.search')->with('user', $this->user)
->with('sort', $sort)
->with('filter', $filter)
->with('q', $q)
->with('textures', $textures)->render();
}
public function show()
{
if (!isset($_GET['tid'])) Http::abort(404, 'No specified tid.');
$texture = Texture::find($_GET['tid']);
if (!$texture || $texture && !\Storage::exists(BASE_DIR."/textures/".$texture->hash)) {
if (Option::get('auto_del_invalid_texture') == "1") {
if ($texture) $texture->delete();
Http::abort(404, '请求的材质文件已经被删除');
}
Http::abort(404, '请求的材质文件已经被删除,请联系管理员删除该条目');
}
if ($texture->public == "0") {
if (is_null($this->user) || ($this->user->uid != $texture->uploader && !$this->user->is_admin))
Http::abort(404, '请求的材质已经设为隐私,仅上传者和管理员可查看');
}
echo View::make('skinlib.show')->with('texture', $texture)->with('with_out_filter', true)->with('user', $this->user)->render();
}
public function info($tid)
{
echo json_encode(Texture::find($tid)->toArray());
}
public function upload()
{
echo View::make('skinlib.upload')->with('user', $this->user)->with('with_out_filter', true)->render();
}
public function handleUpload()
{
$this->checkUpload(isset($_POST['type']) ? $_POST['type'] : "");
$t = new Texture();
$t->name = $_POST['name'];
$t->type = $_POST['type'];
$t->likes = 1;
$t->hash = Utils::upload($_FILES['file']);
$t->size = ceil($_FILES['file']['size'] / 1024);
$t->public = ($_POST['public'] == 'true') ? "1" : "0";
$t->uploader = $this->user->uid;
$t->upload_at = Utils::getTimeFormatted();
$cost = $t->size * (($t->public == "1") ? Option::get('score_per_storage') : Option::get('private_score_per_storage'));
if ($this->user->getScore() < $cost)
View::json('积分不够啦', 7);
$results = Texture::where('hash', $t->hash)->get();
if (!$results->isEmpty()) {
foreach ($results as $result) {
if ($result->type == $t->type) {
View::json([
'errno' => 0,
'msg' => '已经有人上传过这个材质了,直接添加到衣柜使用吧~',
'tid' => $result->tid
]);
}
}
}
$t->save();
$this->user->setScore($cost, 'minus');
if ($this->user->closet->add($t->tid, $t->name)) {
View::json([
'errno' => 0,
'msg' => '材质 '.$_POST['name'].' 上传成功',
'tid' => $t->tid
]);
}
}
public function delete()
{
Validate::checkPost(['tid']);
$result = Texture::find($_POST['tid']);
if (!$result)
View::json('Unexistent texture.', 1);
if ($result->uploader != $this->user->uid && !$this->user->is_admin)
View::json('你不是这个材质的上传者哦', 1);
// check if file occupied
if (Texture::where('hash', $result['hash'])->count() == 1)
\Storage::remove("./textures/".$result['hash']);
$this->user->setScore($result->size * Option::get('score_per_storage'), 'plus');
if ($result->delete())
View::json('材质已被成功删除', 0);
}
public function privacy($tid)
{
$t = Texture::find($tid);
if (!$t) View::json('Unexistent texture.', 1);
if ($t->uploader != $this->user->uid && !$this->user->is_admin)
View::json('你不是这个材质的上传者哦', 1);
if ($t->setPrivacy(!$t->public)) {
View::json([
'errno' => 0,
'msg' => '材质已被设为'.($t->public == "0" ? "隐私" : "公开"),
'public' => $t->public
]);
}
}
public function rename() {
Validate::checkPost(['tid', 'new_name']);
Validate::textureName($_POST['new_name']);
$t = Texture::find($_POST['tid']);
if (!$t) View::json('材质不存在', 1);
if ($t->uploader != $this->user->uid && !$this->user->is_admin)
View::json('你不是这个材质的上传者哦', 1);
$t->name = $_POST['new_name'];
if ($t->save()) {
View::json('材质名称已被成功设置为'.$_POST['new_name'], 0);
}
}
private function checkUpload($type)
{
Validate::textureName(Utils::getValue('name', $_POST));
if (!Utils::getValue('file', $_FILES))
View::json('你还没有选择任何文件哟', 1);
if (!isset($_POST['public']) || ($_POST['public'] != 0 && $_POST['public'] != 1))
View::json('非法参数', 1);
if ($_FILES['file']['type'] == "image/png" || $_FILES['file']['type'] == "image/x-png")
{
// if error occured while uploading file
if ($_FILES['file']["error"] > 0)
View::json($_FILES['file']["error"], 1);
$size = getimagesize($_FILES['file']["tmp_name"]);
$ratio = $size[0] / $size[1];
if ($type == "steve" || $type == "alex") {
if ($ratio != 2 && $ratio != 1)
View::json("不是有效的皮肤文件(宽 {$size[0]},高 {$size[1]}", 1);
} elseif ($type == "cape") {
if ($ratio != 2)
View::json("不是有效的披风文件(宽 {$size[0]},高 {$size[1]}", 1);
} else {
View::json('非法参数', 1);
}
} else {
if (Utils::getValue('file', $_FILES)) {
View::json('文件格式不对哦', 1);
} else {
View::json('No file selected.', 1);
}
}
return true;
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,124 +0,0 @@
<?php
namespace App\Controllers;
use App\Models\User;
use App\Models\Texture;
use App\Exceptions\E;
use Utils;
use View;
class UserController extends BaseController
{
private $action = "";
private $user = null;
function __construct()
{
$this->action = isset($_GET['action']) ? $_GET['action'] : "";
$this->user = new User($_SESSION['uid']);
}
public function index()
{
echo View::make('user.index')->with('user', $this->user)->render();
}
public function sign()
{
if ($aquired_score = $this->user->sign()) {
View::json([
'errno' => 0,
'msg' => '签到成功,获得了 '.$aquired_score.' 积分~',
'score' => $this->user->getScore(),
'remaining_time' => $this->user->canSign(true)
]);
} else {
View::json($this->user->canSign(true).' 小时后才能再次签到哦~', 1);
}
}
public function profile()
{
echo View::make('user.profile')->with('user', $this->user);
}
public function handleProfile()
{
// handle changing nickname
if ($this->action == "nickname") {
if (!isset($_POST['new_nickname'])) throw new E('非法参数');
if (Utils::convertString($_POST['new_nickname']) != $_POST['new_nickname'])
View::json('无效的昵称。昵称中包含了奇怪的字符。', 1);
if ($this->user->setNickName($_POST['new_nickname']))
View::json('昵称已成功设置为 '.$_POST['new_nickname'], 0);
// handle changing password
} elseif ($this->action == "password") {
if (!(isset($_POST['current_password']) && isset($_POST['new_password'])))
throw new E('非法参数');
if (!$this->user->checkPasswd($_POST['current_password']))
View::json('原密码错误', 1);
if (\Validate::password($_POST['new_password'])) {
if ($this->user->changePasswd($_POST['new_password']))
View::json('密码修改成功,请重新登录', 0);
}
// handle changing email
} elseif ($this->action == "email") {
if (!(isset($_POST['new_email']) && isset($_POST['password'])))
throw new E('非法参数');
if (!filter_var($_POST['new_email'], FILTER_VALIDATE_EMAIL)) {
View::json('邮箱格式错误', 3);
}
if (!$this->user->checkPasswd($_POST['password']))
View::json('密码错误', 1);
if ($this->user->setEmail($_POST['new_email']))
View::json('邮箱修改成功,请重新登录', 0);
// handle deleting account
} elseif ($this->action == "delete") {
if (!isset($_POST['password']))
throw new E('非法参数');
if (!$this->user->checkPasswd($_POST['password']))
View::json('密码错误', 1);
if ($this->user->delete()) {
setcookie('uid', '', time() - 3600, '/');
setcookie('token', '', time() - 3600, '/');
session_destroy();
View::json('账号已被成功删除', 0);
}
}
}
public function config()
{
echo View::make('user.config')->with('user', $this->user);
}
public function setAvatar()
{
if (!isset($_POST['tid'])) throw new E('Empty tid.');
$result = Texture::find($_POST['tid']);
if ($result) {
if ($result->type == "cape") throw new E('披风可不能设置为头像哦~', 1);
if ((new User($_SESSION['uid']))->setAvatar($_POST['tid'])) {
View::json('设置成功!', 0);
}
} else {
throw new E('材质不存在。', 1);
}
}
}

View File

@ -1,78 +0,0 @@
<?php
namespace Blessing;
use \Illuminate\Database\Capsule\Manager as Capsule;
use \Blessing\Database\Schema;
use \App\Exceptions\E;
class Config
{
public static function getDbConfig()
{
return require BASE_DIR.'/config/database.php';
}
public static function getViewConfig()
{
return require BASE_DIR."/config/view.php";
}
public static function checkPHPVersion()
{
if (version_compare(PHP_VERSION, '5.5.9', '<'))
throw new E('Blessing Skin Server v3 要求 PHP 版本不低于 5.5.9,当前版本为 '.phpversion(), -1, true);
}
/**
* Check database config
*
* @param array $config
* @return \MySQLi
*/
public static function checkDbConfig(Array $config)
{
// use error control to hide shitty connect warnings
@$conn = new \mysqli($config['host'], $config['username'], $config['password'], $config['database'], $config['port']);
if ($conn->connect_error)
throw new E("无法连接至 MySQL 服务器,请检查你的配置:".$conn->connect_error, $conn->connect_errno, true);
$conn->query("SET names 'utf8'");
return true;
}
public static function checkTableExist()
{
$tables = ['users', 'closets', 'players', 'textures', 'options'];
foreach ($tables as $table_name) {
// prefix will be added automatically
if (!Schema::hasTable($table_name)) {
return false;
}
}
return true;
}
public static function checkCache()
{
$view_config = self::getViewConfig();
if (!is_dir($view_config['cache_path'])) {
if (!mkdir($view_config['cache_path']))
throw new E('缓存文件夹创建失败,请确认目录权限是否正确', -1);
}
return true;
}
public static function checkDotEnvExist()
{
if (!file_exists(BASE_DIR."/.env"))
exit('错误:.env 配置文件不存在');
return true;
}
}

View File

@ -1,200 +0,0 @@
<?php
namespace Blessing\Database;
use \App\Exceptions\E;
use \Blessing\Config;
/**
* Light-weight database helper
*
* @author <h@prinzeugen.net>
*/
class Database
{
/**
* Instance of MySQLi
*
* @var null
*/
private $connection = null;
/**
* Connection config
*
* @var array
*/
private $config = null;
/**
* Table name to do operations in
*
* @var string
*/
private $table_name = "";
/**
* Construct with table name and another config optionally
*
* @param string $table_name
* @param array $config
*/
public function __construct($config = null)
{
$this->config = is_null($config) ? Config::getDbConfig() : $config;
@$this->connection = new \mysqli(
$this->config['host'],
$this->config['username'],
$this->config['password'],
$this->config['database'],
$this->config['port']
);
if ($this->connection->connect_error)
throw new E("Could not connect to MySQL database. Check your configuration:".
$this->connection->connect_error, $this->connection->connect_errno, true);
$this->connection->query("SET names 'utf8'");
}
public function table($table_name, $no_prefix = false)
{
if ($this->connection->real_escape_string($table_name) == $table_name) {
$this->table_name = $no_prefix ? $table_name : $this->config['prefix'].$table_name;
return $this;
} else {
throw new \InvalidArgumentException('Table name contains invalid characters', 1);
}
}
public function query($sql)
{
// compile patterns
$sql = str_replace('{table}', $this->table_name, $sql);
$result = $this->connection->query($sql);
if ($this->connection->error)
throw new E("Database query error: ".$this->connection->error.", Statement: ".$sql, -1);
return $result;
}
public function fetchArray($sql)
{
return $this->query($sql)->fetch_array();
}
/**
* Select records from table
*
* @param string $key
* @param string $value
* @param array $condition, see function `where`
* @param string $table, which table to operate
* @param boolean $dont_fetch_array, return resources if true
* @return array|resources
*/
public function select($key, $value, $condition = null, $table = null, $dont_fetch_array = false)
{
$table = is_null($table) ? $this->table_name : $table;
if (isset($condition['where'])) {
$sql = "SELECT * FROM $table".$this->where($condition);
} else {
$sql = "SELECT * FROM $table WHERE $key='$value'";
}
if ($dont_fetch_array) {
return $this->query($sql);
} else {
return $this->fetchArray($sql);
}
}
public function insert($data, $table = null)
{
$keys = "";
$values = "";
$table = is_null($table) ? $this->table_name : $table;
foreach($data as $key => $value) {
if ($value == end($data)) {
$keys .= '`'.$key.'`';
$values .= '"'.$value.'"';
} else {
$keys .= '`'.$key.'`,';
$values .= '"'.$value.'", ';
}
}
$sql = "INSERT INTO $table ({$keys}) VALUES ($values)";
return $this->query($sql);
}
public function has($key, $value, $table = null)
{
return ($this->getNumRows($key, $value, $table) != 0) ? true : false;
}
public function hasTable($table_name)
{
$sql = "SELECT table_name FROM `INFORMATION_SCHEMA`.`TABLES` WHERE (table_name = '$table_name') AND TABLE_SCHEMA='".Config::getDbConfig()['database']."'";
return ($this->query($sql)->num_rows != 0) ? true : false;
}
public function update($key, $value, $condition = null, $table = null)
{
$table = is_null($table) ? $this->table_name : $table;
return $this->query("UPDATE $table SET `$key`='$value'".$this->where($condition));
}
public function delete($condition = null, $table = null)
{
$table = is_null($table) ? $this->table_name : $table;
return $this->query("DELETE FROM $table".$this->where($condition));
}
public function getNumRows($key, $value, $table = null)
{
$table = is_null($table) ? $this->table_name : $table;
$sql = "SELECT * FROM $table WHERE $key='$value'";
return $this->query($sql)->num_rows;
}
public function getRecordNum($table = null)
{
$table = is_null($table) ? $this->table_name : $table;
$sql = "SELECT * FROM $table WHERE 1";
return $this->query($sql)->num_rows;
}
/**
* Generate where statement
*
* @param array $condition, e.g. array('where'=>'username="shit"', 'limit'=>10, 'order'=>'uid')
* @return string
*/
private function where($condition)
{
$statement = "";
if (isset($condition['where']) && $condition['where'] != "") {
$statement .= ' WHERE '.$condition['where'];
}
if (isset($condition['order'])) {
$statement .= ' ORDER BY `'.$condition['order'].'`';
}
if (isset($condition['limit'])) {
$statement .= ' LIMIT '.$condition['limit'];
}
return $statement;
}
public function __destruct()
{
if (!is_null($this->connection))
$this->connection->close();
}
}

View File

@ -1,30 +0,0 @@
<?php
namespace Blessing\Database;
use Blessing\Storage;
class Migration
{
/**
* Create tables, prefix will be added automatically
*
* @return void
*/
public static function creatTables()
{
require BASE_DIR."/setup/tables.php";
}
public static function __callStatic($method, $args)
{
if (strpos($method, 'import') !== false) {
$filename = BASE_DIR."/setup/migrations/".snake_case($method).".php";
if (Storage::exists($filename)) {
return require $filename;
}
}
throw new \InvalidArgumentException('Non-existent migration');
}
}

View File

@ -1,24 +0,0 @@
<?php
namespace Blessing\Database;
use Illuminate\Database\Capsule\Manager as Capsule;
class Schema
{
/**
* Facade for Illuminate\Database\Schema
*
* @param string $method
* @param array $args
* @return mixed
*/
public static function __callStatic($method, $args)
{
// the instance of capusle has been set as global
$instance = Capsule::schema();
return call_user_func_array([$instance, $method], $args);
}
}

View File

@ -1,21 +0,0 @@
<?php
namespace Blessing\Facades;
use \Illuminate\Support\Facades\Facade;
/**
* @see \Blessing\Foundation\Application
*/
class App extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'app';
}
}

View File

@ -1,18 +0,0 @@
<?php
namespace Blessing\Facades;
use \Illuminate\Support\Facades\Facade;
class DB extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'db';
}
}

View File

@ -1,69 +0,0 @@
<?php
namespace Blessing\Foundation;
use \Illuminate\Container\Container;
use \Blessing\Config;
class Application extends Container
{
private $version = null;
/**
* Start Application
*
* @return void
*/
public function run()
{
$this->boot();
// Register Error Handler
Boot::registerErrorHandler();
// Redirect if not installed
Boot::checkInstallation();
// Start Route Dispatching
Boot::bootRouter();
}
public function boot()
{
// Load Aliases
Boot::loadServices();
// Check Runtime Environment
Boot::checkRuntimeEnv();
// Register Facades
Boot::registerFacades($this);
// Set Default Timezone to UTC+8
Boot::setTimeZone();
// Load dotenv Configuration
Boot::loadDotEnv(BASE_DIR);
// Boot Eloquent ORM
Boot::bootEloquent(Config::getDbConfig());
// Start Session
Boot::startSession();
}
/**
* Get the version number of the application.
*
* @return string
*/
public function version()
{
if (is_null($this->version)) {
$config = require BASE_DIR."/config/app.php";
$this->version = $config['version'];
}
return $this->version;
}
}

View File

@ -1,136 +0,0 @@
<?php
namespace Blessing\Foundation;
use \Illuminate\Database\Capsule\Manager as Capsule;
use \Illuminate\Support\Facades\Facade;
use \Pecee\SimpleRouter\SimpleRouter as Router;
use \App\Exceptions\ExceptionHandler;
use \App\Exceptions\E;
use \Blessing\Config;
use \Blessing\Option;
use \Blessing\Http;
class Boot
{
public static function loadDotEnv($dir)
{
if (Config::checkDotEnvExist()) {
$dotenv = new \Dotenv\Dotenv($dir);
$dotenv->load();
}
}
public static function registerFacades(Application $app)
{
Facade::setFacadeApplication($app);
$app->instance('app', $app);
$app->bind('manager', \App\Services\PluginManager::class);
$app->bind('db', \Blessing\Database\Database::class);
}
public static function setTimeZone($timezone = 'Asia/Shanghai')
{
// set default time zone, UTC+8 for default
date_default_timezone_set($timezone);
}
public static function checkRuntimeEnv()
{
Config::checkPHPVersion();
Config::checkCache();
}
public static function checkInstallation($redirect_to = '../setup/index.php')
{
if (!Config::checkTableExist()) {
Http::redirect($redirect_to);
}
if (!is_dir(BASE_DIR.'/textures/')) {
throw new E("检测到 `textures` 文件夹已被删除,请重新运行 <a href='./setup'>安装程序</a>,或者手动放置一个。", -1, true);
}
if (\App::version() != Option::get('version', '')) {
Http::redirect(Http::getBaseUrl().'/setup/update.php');
exit;
}
return true;
}
public static function loadServices()
{
// Set Aliases for App\Services
$services = require BASE_DIR.'/config/services.php';
foreach ($services as $facade => $class) {
class_alias($class, $facade);
}
}
/**
* Register error handler
*
* @param object $handler Push specified whoops handler
* @return void
*/
public static function registerErrorHandler($handler = null)
{
if (!is_null($handler) && $handler instanceof \Whoops\Handler\HandlerInterface) {
$whoops = new \Whoops\Run;
$whoops->pushHandler($handler);
$whoops->register();
return;
}
if ($_ENV['APP_DEBUG'] !== "false") {
// whoops: php errors for cool kids
$whoops = new \Whoops\Run;
$handler = ($_SERVER['REQUEST_METHOD'] == "GET") ?
new \Whoops\Handler\PrettyPageHandler : new \Whoops\Handler\PlainTextHandler;
$whoops->pushHandler($handler);
$whoops->register();
} else {
// Register custom error handler
ExceptionHandler::register();
}
}
public static function bootEloquent(Array $config)
{
if (Config::checkDbConfig($config)) {
$capsule = new Capsule;
$capsule->addConnection($config);
$capsule->setAsGlobal();
$capsule->bootEloquent();
}
}
public static function startSession()
{
session_start();
}
public static function bootRouter()
{
/**
* URL ends with slash will cause many reference problems
*/
if (Http::getUri() != "/" && substr(Http::getUri(), -1) == "/") {
$url = substr(Http::getCurrentUrl(), 0, -1);
Http::redirect($url);
}
// Require Route Config
Router::group([
'exceptionHandler' => 'App\Exceptions\RouterExceptionHandler'
], function() {
require BASE_DIR.'/config/routes.php';
});
// Start Route Dispatching
Router::start('App\Controllers');
}
}

View File

@ -1,102 +0,0 @@
<?php
namespace Blessing;
class Http
{
/**
* HTTP redirect
*
* @param string $url
* @param string $msg Write message to session
* @return void
*/
public static function redirect($url, $msg = "")
{
if ($msg !== "") $_SESSION['msg'] = $msg;
if (!headers_sent()) {
header('Location: '.$url);
} else {
echo "<meta http-equiv='Refresh' content='0; URL=$url'>";
}
exit;
}
/**
* 301 Moved Permanently
*
* @param string $url
* @return void
*/
public static function redirectPermanently($url)
{
http_response_code(301);
header('Location: '.$url);
exit;
}
public static function getRealIP()
{
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
return $ip;
}
public static function setUri($uri)
{
$_SERVER["REQUEST_URI"] = $uri;
return true;
}
public static function getUri()
{
return $_SERVER["REQUEST_URI"];
}
public static function getBaseUrl()
{
$base_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? "https://" : "http://";
$base_url .= $_SERVER["SERVER_NAME"];
$base_url .= ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
return $base_url;
}
public static function getCurrentUrl()
{
return self::getBaseUrl().$_SERVER["REQUEST_URI"];
}
/**
* Generate absolute url according to relative one
*
* @param string $relative
* @return string
*/
public static function urlTo($relative)
{
return Option::get('site_url').$relative;
}
public static function abort($code, $msg = "Something happened.", $is_json = false)
{
http_response_code((int)$code);
if ($is_json) {
View::json($msg, $code);
} else {
$config = require BASE_DIR."/config/view.php";
if (file_exists($config['view_path']."/errors/".$code.".tpl")) {
echo View::make('errors.'.$code)->with('code', $code)->with('message', $msg);
} else {
echo View::make('errors.e')->with('code', $code)->with('message', $msg);
}
exit;
}
}
}

View File

@ -1,75 +0,0 @@
<?php
namespace Blessing;
use PHPMailer;
class Mail
{
/**
* Instance of PHPMailer
* @var object
*/
private $mail;
public function __construct()
{
$mail = new PHPMailer();
// $mail->SMTPDebug = 3; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = $_ENV['MAIL_HOST']; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = $_ENV['MAIL_USERNAME']; // SMTP username
$mail->Password = $_ENV['MAIL_PASSWORD']; // SMTP password
$mail->SMTPSecure = $_ENV['MAIL_ENCRYPTION']; // Enable TLS encryption, `ssl` also accepted
$mail->Port = $_ENV['MAIL_PORT']; // TCP port to connect to
$mail->CharSet = 'UTF-8';
$this->mail = $mail;
}
/**
* Set sender name
*
* @param string $name [description]
*/
public function from($name)
{
$this->mail->setFrom($_ENV['MAIL_USERNAME'], $name);
return $this;
}
public function to($address)
{
$this->mail->addAddress($address);
return $this;
}
public function subject($subject)
{
$this->mail->Subject = $subject;
return $this;
}
public function getLastError()
{
return $this->mailer->ErrorInfo;
}
public function content($content)
{
$this->mail->isHTML(true);
$this->mail->Body = $content;
return $this;
}
/**
* Send a mail
*
* @return boolean
*/
public function send()
{
return $this->mail->send();
}
}

View File

@ -1,76 +0,0 @@
<?php
namespace Blessing;
use \Illuminate\Database\Eloquent\Model;
use \Exception;
class Option
{
public static function get($key, $default_value = null)
{
$option = OptionModel::where('option_name', $key)->first();
if (!$option) {
if (!is_null($default_value)) {
return $default_value;
} else {
$options = require BASE_DIR."/setup/options.php";
if (array_key_exists($key, $options)) {
self::add($key, $options[$key]);
return $options[$key];
}
throw new Exception('Unexistent option.', 1);
}
}
return $option->option_value;
}
public static function set($key, $value)
{
$option = OptionModel::where('option_name', $key)->first();
if (!$option)
throw new Exception('Unexistent option.', 1);
$option->option_value = $value;
return $option->save();
}
public static function add($key, $value)
{
if (self::has($key))
return true;
$option = new OptionModel;
$option->option_name = $key;
$option->option_value = $value;
$option->save();
}
public static function has($key)
{
try {
OptionModel::where('option_name', $key)->firstOrFail();
} catch (\Illuminate\Database\Eloquent\ModelNotFoundException $e) {
return false;
}
return true;
}
public static function delete($key)
{
OptionModel::where('option_name', $key)->delete();
}
}
class OptionModel extends Model
{
protected $table = 'options';
public $timestamps = false;
protected $fillable = ['option_value'];
}

View File

@ -1,165 +0,0 @@
<?php
namespace Blessing;
class Storage
{
/**
* Read a file and return bin data
*
* @param string $filename
* @return string|bool
*/
public static function get($filename)
{
$result = file_get_contents($filename, 'r');
if (false === $result) {
throw new \Exception("Failed to read $filename.");
}
return $result;
}
public static function put($filename, $data)
{
return file_put_contents($filename, $data);
}
public static function exists($filename)
{
return file_exists($filename);
}
public static function hash($filename, $type = 'sha256')
{
return hash_file('sha256', $filename);
}
public static function rename($fname, $new_fname)
{
if (false === rename($fname, $new_fname)) {
throw new \Exception("Failed to rename $fname to $new_fname.");
}
return $new_fname;
}
public static function size($filename)
{
if (self::exists($filename)) {
return filesize($filename);
} else {
return 0;
}
}
/**
* Remove a file
*
* @param $filename
* @return $bool
*/
public static function remove($filename)
{
if (self::exists($filename)) {
return unlink($filename);
}
}
public static function removeDir($dir)
{
$resource = opendir($dir);
$size = 0;
while($filename = @readdir($resource)) {
if ($filename != "." && $filename != "..") {
$path = $dir.$filename;
if (is_dir($path)) {
// recursion
self::removeDir($path."/");
} else {
unlink($path);
}
}
}
closedir($resource);
return rmdir($dir);
}
/**
* Recursively count the size of specified directory
*
* @param string $dir
* @return int, total size in bytes
*/
public static function getDirSize($dir)
{
$resource = opendir($dir);
$size = 0;
while($filename = @readdir($resource)) {
if ($filename != "." && $filename != "..") {
$path = $dir.$filename;
if (is_dir($path)) {
// recursion
$size += self::getDirSize($path);
} else if (is_file($path)) {
$size += filesize($path);
}
}
}
closedir($resource);
return $size;
}
/**
* Recursively count files of specified directory
*
* @param string $dir
* @param $file_num
* @return int, total size in bytes
*/
public static function getFileNum($dir, $file_num = 0)
{
$resource = opendir($dir);
while($filename = readdir($resource)) {
if ($filename != "." && $filename != "..") {
$path = $dir.$filename;
if (is_dir($path)) {
// recursion
$file_num = self::getFileNum($path, $file_num);
} else {
$file_num++;
}
}
}
closedir($resource);
return $file_num;
}
/**
* Copy directory recursively
*
* @param string $source
* @param string $dest
* @return bool
*/
public static function copyDir($source, $dest)
{
if(!is_dir($source))
return false;
if(!is_dir($dest))
mkdir($dest, 0777, true);
$handle = dir($source);
while($entry = $handle->read()) {
if ($entry != "." && $entry != "..") {
if (is_dir($source.'/'.$entry)) {
// recursion
self::copyDir($source.'/'.$entry, $dest.'/'.$entry);
} else {
@copy($source.'/'.$entry, $dest.'/'.$entry);
}
}
}
return true;
}
}

View File

@ -1,60 +0,0 @@
<?php
namespace Blessing;
/**
* Just a wrapper for Blade template engine
*/
class View
{
public static function show($view, $data = [], $mergeData = [])
{
echo self::make($view, $data, $mergeData)->render();
}
public static function make($view, $data = [], $mergeData = [])
{
$config = require BASE_DIR."/config/view.php";
$view_path = [$config['view_path']];
$cache_path = $config['cache_path'];
$compiler = new \Xiaoler\Blade\Compilers\BladeCompiler($cache_path);
$engine = new \Xiaoler\Blade\Engines\CompilerEngine($compiler);
$finder = new \Xiaoler\Blade\FileViewFinder($view_path);
$finder->addExtension('tpl');
$factory = new \Xiaoler\Blade\Factory($engine, $finder);
return $factory->make($view, $data, $mergeData);
}
// function reload
public static function json()
{
@header('Content-type: application/json; charset=utf-8');
$args = func_get_args();
if (count($args) == 1) {
self::jsonCustom($args[0]);
} elseif(count($args) == 2) {
self::jsonException($args[0], $args[1]);
}
}
private static function jsonCustom($array)
{
if (is_array($array))
exit(json_encode($array));
else
throw new \Exception('The given arugument should be array.');
}
private static function jsonException($msg, $errno)
{
exit(json_encode([
'errno' => $errno,
'msg' => $msg
]));
}
}

View File

@ -0,0 +1,14 @@
<?php
namespace App\Events;
class ConfigureAdminMenu extends Event
{
public $menu;
public function __construct(array &$menu)
{
// Pass array by reference
$this->menu = &$menu;
}
}

View File

@ -0,0 +1,14 @@
<?php
namespace App\Events;
class ConfigureExploreMenu extends Event
{
public $menu;
public function __construct(array &$menu)
{
// Pass array by reference
$this->menu = &$menu;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Events;
use Illuminate\Routing\Router;
class ConfigureRoutes extends Event
{
public $router;
public function __construct(Router $router)
{
$this->router = $router;
}
}

View File

@ -0,0 +1,13 @@
<?php
namespace App\Events;
class ConfigureUserMenu extends Event
{
public $menu;
public function __construct(array &$menu)
{
$this->menu = &$menu;
}
}

7
app/Events/Event.php Normal file
View File

@ -0,0 +1,7 @@
<?php
namespace App\Events;
abstract class Event
{
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Events;
use App\Models\Player;
class PlayerProfileUpdated extends Event
{
public $player;
public function __construct(Player $player)
{
$this->player = $player;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Events;
use App\Models\Player;
class PlayerRetrieved extends Event
{
public $player;
public function __construct(Player $player)
{
$this->player = $player;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Events;
use App\Models\Player;
class PlayerWasAdded extends Event
{
public $player;
public function __construct(Player $player)
{
$this->player = $player;
}
}

View File

@ -0,0 +1,13 @@
<?php
namespace App\Events;
class PlayerWasDeleted extends Event
{
public $playerName;
public function __construct($playerName)
{
$this->playerName = $playerName;
}
}

View File

@ -0,0 +1,13 @@
<?php
namespace App\Events;
class PlayerWillBeAdded extends Event
{
public $playerName;
public function __construct($playerName)
{
$this->playerName = $playerName;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Events;
use App\Models\Player;
class PlayerWillBeDeleted extends Event
{
public $player;
public function __construct(Player $player)
{
$this->player = $player;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Events;
use App\Services\Plugin;
class PluginBootFailed extends Event
{
public Plugin $plugin;
public function __construct(Plugin $plugin)
{
$this->plugin = $plugin;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Events;
use App\Services\Plugin;
class PluginWasDeleted extends Event
{
public $plugin;
public function __construct(Plugin $plugin)
{
$this->plugin = $plugin;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Events;
use App\Services\Plugin;
class PluginWasDisabled extends Event
{
public $plugin;
public function __construct(Plugin $plugin)
{
$this->plugin = $plugin;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Events;
use App\Services\Plugin;
class PluginWasEnabled extends Event
{
public $plugin;
public function __construct(Plugin $plugin)
{
$this->plugin = $plugin;
}
}

View File

@ -0,0 +1,13 @@
<?php
namespace App\Events;
class RenderingBadges extends Event
{
public $badges;
public function __construct(array &$badges)
{
$this->badges = &$badges;
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\Events;
class RenderingFooter extends Event
{
public $contents;
public function __construct(array &$contents)
{
$this->contents = &$contents;
}
public function addContent(string $content)
{
$this->contents[] = $content;
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\Events;
class RenderingHeader extends Event
{
public $contents;
public function __construct(array &$contents)
{
$this->contents = &$contents;
}
public function addContent(string $content)
{
$this->contents[] = $content;
}
}

View File

@ -0,0 +1,13 @@
<?php
namespace App\Events;
class TextureDeleting extends Event
{
public $texture;
public function __construct(\App\Models\Texture $texture)
{
$this->texture = $texture;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Events;
use App\Models\User;
class UserAuthenticated extends Event
{
public $user;
public function __construct(User $user)
{
$this->user = $user;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Events;
use App\Models\User;
class UserLoggedIn extends Event
{
public $user;
public function __construct(User $user)
{
$this->user = $user;
}
}

View File

@ -0,0 +1,17 @@
<?php
namespace App\Events;
use App\Models\User;
class UserProfileUpdated extends Event
{
public $type;
public $user;
public function __construct($type, User $user)
{
$this->type = $type;
$this->user = $user;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Events;
use App\Models\User;
class UserRegistered extends Event
{
public $user;
public function __construct(User $user)
{
$this->user = $user;
}
}

View File

@ -0,0 +1,16 @@
<?php
namespace App\Events;
class UserTryToLogin extends Event
{
public $identification;
public $authType;
public function __construct($identification, $authType)
{
$this->identification = $identification;
$this->authType = $authType;
}
}

View File

@ -1,39 +0,0 @@
<?php
namespace App\Exceptions;
class E extends \Exception
{
/**
* Custom error handler
*
* @param string $message
* @param integer $code
* @param boolean $render, to show a error page
*/
function __construct($message = "Error occured.", $code = -1, $render = false)
{
parent::__construct($message, $code);
if ($render) {
$this->showErrorPage();
} else {
$this->showErrorJson();
}
}
private function showErrorJson()
{
$exception['errno'] = $this->code;
$exception['msg'] = $this->message;
@header('Content-type: application/json; charset=utf-8');
exit(json_encode($exception));
}
private function showErrorPage()
{
echo \View::make('errors.e')->with('code', $this->code)
->with('message', $this->message)
->render();
exit;
}
}

View File

@ -1,70 +0,0 @@
<?php
namespace App\Exceptions;
class ExceptionHandler
{
public static function register()
{
if ($_SERVER['REQUEST_METHOD'] == "GET") {
// use closure to pass parameters
set_error_handler(function ($errno, $errstr, $errfile, $errline) {
self::handler(
new \ErrorException($errstr, $errno, $errno, $errfile, $errline)
);
});
}
}
public static function handler($e)
{
// do nothing if error reporting is turned off or suppressed with @
if (error_reporting() === 0) {
return;
}
switch ($e->getCode()) {
case E_PARSE:
case E_ERROR:
case E_CORE_ERROR:
case E_COMPILE_ERROR:
case E_USER_ERROR:
$level = 'Fatal Error';
break;
case E_WARNING:
case E_USER_WARNING:
case E_COMPILE_WARNING:
case E_RECOVERABLE_ERROR:
$level = 'Warning';
break;
case E_NOTICE:
case E_USER_NOTICE:
$level = 'Notice';
break;
case E_STRICT:
$level = 'Strict';
break;
case E_DEPRECATED:
case E_USER_DEPRECATED:
$level = 'Deprecated';
break;
default:
$level = 'Type Unknown';
break;
}
echo \View::make('errors.exception')->with('level', $level)
->with('message', $e->getMessage())
->with('file', $e->getFile())
->with('line', $e->getLine());
exit;
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Exceptions;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Laravel\Passport\Exceptions\MissingScopeException;
use Throwable;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
*/
protected $dontReport = [
\Illuminate\Auth\AuthenticationException::class,
\Illuminate\Auth\Access\AuthorizationException::class,
\Symfony\Component\HttpKernel\Exception\HttpException::class,
\Illuminate\Validation\ValidationException::class,
\Illuminate\Session\TokenMismatchException::class,
ModelNotFoundException::class,
PrettyPageException::class,
];
public function render($request, Throwable $exception)
{
if ($exception instanceof ModelNotFoundException) {
$model = $exception->getModel();
if (Str::endsWith($model, 'Texture')) {
$exception = new ModelNotFoundException(trans('skinlib.non-existent'));
}
} elseif ($exception instanceof MissingScopeException) {
return json($exception->getMessage(), 403);
}
return parent::render($request, $exception);
}
protected function convertExceptionToArray(Throwable $e)
{
return [
'message' => $e->getMessage(),
'exception' => true,
'trace' => collect($e->getTrace())
->map(fn ($trace) => Arr::only($trace, ['file', 'line']))
->filter(fn ($trace) => Arr::has($trace, 'file'))
->map(function ($trace) {
$trace['file'] = str_replace(base_path().DIRECTORY_SEPARATOR, '', $trace['file']);
return $trace;
})
->filter(function ($trace) {
// @codeCoverageIgnoreStart
$isFromPlugins = !app()->runningUnitTests()
&& Str::contains($trace['file'], resolve('plugins')->getPluginsDirs()->all());
// @codeCoverageIgnoreEnd
return Str::startsWith($trace['file'], 'app') || $isFromPlugins;
})
->values(),
];
}
}

View File

@ -0,0 +1,11 @@
<?php
namespace App\Exceptions;
class PrettyPageException extends \Exception
{
public function render()
{
return response()->view('errors.pretty', ['code' => $this->code, 'message' => $this->message]);
}
}

View File

@ -1,22 +0,0 @@
<?php
namespace App\Exceptions;
use Pecee\Http\Request;
use Pecee\SimpleRouter\RouterEntry;
use Pecee\Handler\IExceptionHandler;
class RouterExceptionHandler implements IExceptionHandler
{
public function handleError(Request $request, RouterEntry $router = null, \Exception $error)
{
if ($error->getCode() === 404) {
\Http::abort(404, $error->getMessage(), ($_SERVER['REQUEST_METHOD'] == "POST"));
} else {
throw $error;
}
}
}

View File

@ -0,0 +1,149 @@
<?php
namespace App\Http\Controllers;
use App\Models\Player;
use App\Models\Texture;
use App\Models\User;
use App\Services\PluginManager;
use Blessing\Filter;
use Carbon\Carbon;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Http\Request;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
class AdminController extends Controller
{
public function index(Filter $filter)
{
$grid = [
'layout' => [
['md-6', 'md-6'],
],
'widgets' => [
[
[
'admin.widgets.dashboard.usage',
'admin.widgets.dashboard.notification',
],
['admin.widgets.dashboard.chart'],
],
],
];
$grid = $filter->apply('grid:admin.index', $grid);
return view('admin.index', [
'grid' => $grid,
'sum' => [
'users' => User::count(),
'players' => Player::count(),
'textures' => Texture::count(),
'storage' => Texture::select('size')->sum('size'),
],
]);
}
public function chartData()
{
$xAxis = Collection::times(31, fn ($i) => Carbon::today()->subDays(31 - $i)->isoFormat('l'));
$oneMonthAgo = Carbon::today()->subMonth();
$grouping = fn ($field) => fn ($item) => Carbon::parse($item->$field)->isoFormat('l');
$mapping = fn ($item) => count($item);
$aligning = fn ($data) => fn ($day) => $data->get($day) ?? 0;
/** @var Collection */
$userRegistration = User::where('register_at', '>=', $oneMonthAgo)
->select('register_at')
->get()
->groupBy($grouping('register_at'))
->map($mapping);
/** @var Collection */
$textureUploads = Texture::where('upload_at', '>=', $oneMonthAgo)
->select('upload_at')
->get()
->groupBy($grouping('upload_at'))
->map($mapping);
return [
'labels' => [
trans('admin.index.user-registration'),
trans('admin.index.texture-uploads'),
],
'xAxis' => $xAxis,
'data' => [
$xAxis->map($aligning($userRegistration)),
$xAxis->map($aligning($textureUploads)),
],
];
}
public function status(
Request $request,
PluginManager $plugins,
Filesystem $filesystem,
Filter $filter,
) {
$db = config('database.connections.'.config('database.default'));
$dbType = Arr::get([
'mysql' => 'MySQL/MariaDB',
'sqlite' => 'SQLite',
'pgsql' => 'PostgreSQL',
], config('database.default'), '');
$enabledPlugins = $plugins->getEnabledPlugins()->map(fn ($plugin) => [
'title' => trans($plugin->title), 'version' => $plugin->version,
]);
if ($filesystem->exists(base_path('.git'))) {
$process = new \Symfony\Component\Process\Process(
['git', 'log', '--pretty=%H', '-1']
);
$process->run();
$commit = $process->isSuccessful() ? trim($process->getOutput()) : '';
}
$grid = [
'layout' => [
['md-6', 'md-6'],
],
'widgets' => [
[
['admin.widgets.status.info'],
['admin.widgets.status.plugins'],
],
],
];
$grid = $filter->apply('grid:admin.status', $grid);
return view('admin.status')
->with('grid', $grid)
->with('detail', [
'bs' => [
'version' => config('app.version'),
'env' => config('app.env'),
'debug' => config('app.debug') ? trans('general.yes') : trans('general.no'),
'commit' => Str::limit($commit ?? '', 16, ''),
'laravel' => app()->version(),
],
'server' => [
'php' => PHP_VERSION,
'web' => $request->server('SERVER_SOFTWARE', trans('general.unknown')),
'os' => sprintf('%s %s %s', php_uname('s'), php_uname('r'), php_uname('m')),
],
'db' => [
'type' => $dbType,
'host' => Arr::get($db, 'host', ''),
'port' => Arr::get($db, 'port', ''),
'username' => Arr::get($db, 'username'),
'database' => Arr::get($db, 'database'),
'prefix' => Arr::get($db, 'prefix'),
],
])
->with('plugins', $enabledPlugins);
}
}

View File

@ -0,0 +1,373 @@
<?php
namespace App\Http\Controllers;
use App\Events;
use App\Exceptions\PrettyPageException;
use App\Mail\ForgotPassword;
use App\Models\Player;
use App\Models\User;
use App\Rules;
use Blessing\Filter;
use Blessing\Rejection;
use Carbon\Carbon;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\URL;
use Vectorface\Whip\Whip;
class AuthController extends Controller
{
public function login(Filter $filter)
{
$whip = new Whip();
$ip = $whip->getValidIpAddress();
$ip = $filter->apply('client_ip', $ip);
$rows = [
'auth.rows.login.notice',
'auth.rows.login.message',
'auth.rows.login.form',
'auth.rows.login.registration-link',
];
$rows = $filter->apply('auth_page_rows:login', $rows);
return view('auth.login', [
'rows' => $rows,
'extra' => [
'tooManyFails' => cache(sha1('login_fails_'.$ip)) > 3,
'recaptcha' => option('recaptcha_sitekey'),
'invisible' => (bool) option('recaptcha_invisible'),
],
]);
}
public function handleLogin(
Request $request,
Rules\Captcha $captcha,
Dispatcher $dispatcher,
Filter $filter,
) {
$data = $request->validate([
'identification' => 'required',
'password' => 'required|min:6|max:32',
]);
$identification = $data['identification'];
$password = $data['password'];
$can = $filter->apply('can_login', null, [$identification, $password]);
if ($can instanceof Rejection) {
return json($can->getReason(), 1);
}
// Guess type of identification
$authType = filter_var($identification, FILTER_VALIDATE_EMAIL) ? 'email' : 'username';
$dispatcher->dispatch('auth.login.attempt', [$identification, $password, $authType]);
event(new Events\UserTryToLogin($identification, $authType));
if ($authType == 'email') {
$user = User::where('email', $identification)->first();
} else {
$player = Player::where('name', $identification)->first();
$user = optional($player)->user;
}
// Require CAPTCHA if user fails to login more than 3 times
$whip = new Whip();
$ip = $whip->getValidIpAddress();
$ip = $filter->apply('client_ip', $ip);
$loginFailsCacheKey = sha1('login_fails_'.$ip);
$loginFails = (int) Cache::get($loginFailsCacheKey, 0);
if ($loginFails > 3) {
$request->validate(['captcha' => ['required', $captcha]]);
}
if (!$user) {
return json(trans('auth.validation.user'), 2);
}
$dispatcher->dispatch('auth.login.ready', [$user]);
if ($user->verifyPassword($request->input('password'))) {
Session::forget('login_fails');
Cache::forget($loginFailsCacheKey);
Auth::login($user, $request->input('keep'));
$dispatcher->dispatch('auth.login.succeeded', [$user]);
event(new Events\UserLoggedIn($user));
return json(trans('auth.login.success'), 0, [
'redirectTo' => $request->session()->pull('last_requested_path', url('/user')),
]);
} else {
$loginFails++;
Cache::put($loginFailsCacheKey, $loginFails, 3600);
$dispatcher->dispatch('auth.login.failed', [$user, $loginFails]);
return json(trans('auth.validation.password'), 1, [
'login_fails' => $loginFails,
]);
}
}
public function logout(Dispatcher $dispatcher)
{
$user = Auth::user();
$dispatcher->dispatch('auth.logout.before', [$user]);
Auth::logout();
$dispatcher->dispatch('auth.logout.after', [$user]);
return json(trans('auth.logout.success'), 0);
}
public function register(Filter $filter)
{
$rows = [
'auth.rows.register.notice',
'auth.rows.register.form',
];
$rows = $filter->apply('auth_page_rows:register', $rows);
return view('auth.register', [
'site_name' => option_localized('site_name'),
'rows' => $rows,
'extra' => [
'player' => (bool) option('register_with_player_name'),
'recaptcha' => option('recaptcha_sitekey'),
'invisible' => (bool) option('recaptcha_invisible'),
],
]);
}
public function handleRegister(
Request $request,
Rules\Captcha $captcha,
Dispatcher $dispatcher,
Filter $filter,
) {
$can = $filter->apply('can_register', null);
if ($can instanceof Rejection) {
return json($can->getReason(), 1);
}
$rule = option('register_with_player_name') ?
['player_name' => [
'required',
new Rules\PlayerName(),
'min:'.option('player_name_length_min'),
'max:'.option('player_name_length_max'),
]] :
['nickname' => 'required|max:255'];
$data = $request->validate(array_merge([
'email' => 'required|email|unique:users',
'password' => 'required|min:8|max:32',
'captcha' => ['required', $captcha],
], $rule));
$playerName = $request->input('player_name');
$dispatcher->dispatch('auth.registration.attempt', [$data]);
if (
option('register_with_player_name')
&& Player::where('name', $playerName)->count() > 0
) {
return json(trans('user.player.add.repeated'), 1);
}
// If amount of registered accounts of IP is more than allowed amount,
// reject this registration.
$whip = new Whip();
$ip = $whip->getValidIpAddress();
$ip = $filter->apply('client_ip', $ip);
if (User::where('ip', $ip)->count() >= option('regs_per_ip')) {
return json(trans('auth.register.max', ['regs' => option('regs_per_ip')]), 1);
}
$dispatcher->dispatch('auth.registration.ready', [$data]);
$user = new User();
$user->email = $data['email'];
$user->nickname = $data[option('register_with_player_name') ? 'player_name' : 'nickname'];
$user->score = option('user_initial_score');
$user->avatar = 0;
$password = app('cipher')->hash($data['password'], config('secure.salt'));
$password = $filter->apply('user_password', $password);
$user->password = $password;
$user->ip = $ip;
$user->permission = User::NORMAL;
$user->register_at = Carbon::now();
$user->last_sign_at = Carbon::now()->subDay();
$user->save();
$dispatcher->dispatch('auth.registration.completed', [$user]);
event(new Events\UserRegistered($user));
if (option('register_with_player_name')) {
$dispatcher->dispatch('player.adding', [$playerName, $user]);
$player = new Player();
$player->uid = $user->uid;
$player->name = $playerName;
$player->tid_skin = 0;
$player->save();
$dispatcher->dispatch('player.added', [$player, $user]);
event(new Events\PlayerWasAdded($player));
}
$dispatcher->dispatch('auth.login.ready', [$user]);
Auth::login($user);
$dispatcher->dispatch('auth.login.succeeded', [$user]);
return json(trans('auth.register.success'), 0);
}
public function forgot()
{
if (config('mail.default') != '') {
return view('auth.forgot', [
'extra' => [
'recaptcha' => option('recaptcha_sitekey'),
'invisible' => (bool) option('recaptcha_invisible'),
],
]);
} else {
throw new PrettyPageException(trans('auth.forgot.disabled'), 8);
}
}
public function handleForgot(
Request $request,
Rules\Captcha $captcha,
Dispatcher $dispatcher,
Filter $filter,
) {
$data = $request->validate([
'email' => 'required|email',
'captcha' => ['required', $captcha],
]);
if (!config('mail.default')) {
return json(trans('auth.forgot.disabled'), 1);
}
$email = $data['email'];
$dispatcher->dispatch('auth.forgot.attempt', [$email]);
$rateLimit = 180;
$whip = new Whip();
$ip = $whip->getValidIpAddress();
$ip = $filter->apply('client_ip', $ip);
$lastMailCacheKey = sha1('last_mail_'.$ip);
$remain = $rateLimit + Cache::get($lastMailCacheKey, 0) - time();
if ($remain > 0) {
return json(trans('auth.forgot.frequent-mail'), 2);
}
$user = User::where('email', $email)->first();
if (!$user) {
return json(trans('auth.forgot.unregistered'), 1);
}
$dispatcher->dispatch('auth.forgot.ready', [$user]);
$url = URL::temporarySignedRoute(
'auth.reset',
Carbon::now()->addHour(),
['uid' => $user->uid],
false
);
try {
Mail::to($email)->send(new ForgotPassword(url($url)));
} catch (\Exception $e) {
report($e);
$dispatcher->dispatch('auth.forgot.failed', [$user, $url]);
return json(trans('auth.forgot.failed', ['msg' => $e->getMessage()]), 2);
}
$dispatcher->dispatch('auth.forgot.sent', [$user, $url]);
Cache::put($lastMailCacheKey, time(), 3600);
return json(trans('auth.forgot.success'), 0);
}
public function reset(Request $request, $uid)
{
abort_unless($request->hasValidSignature(false), 403, trans('auth.reset.invalid'));
return view('auth.reset')->with('user', User::find($uid));
}
public function handleReset(Dispatcher $dispatcher, Request $request, $uid)
{
abort_unless($request->hasValidSignature(false), 403, trans('auth.reset.invalid'));
['password' => $password] = $request->validate([
'password' => 'required|min:8|max:32',
]);
$user = User::find($uid);
$dispatcher->dispatch('auth.reset.before', [$user, $password]);
$user->changePassword($password);
$dispatcher->dispatch('auth.reset.after', [$user, $password]);
return json(trans('auth.reset.success'), 0);
}
public function captcha(\Gregwar\Captcha\CaptchaBuilder $builder)
{
$builder->build(100, 34);
session(['captcha' => $builder->getPhrase()]);
return response($builder->output(), 200, [
'Content-Type' => 'image/jpeg',
'Cache-Control' => 'no-store',
]);
}
public function fillEmail(Request $request)
{
$email = $request->validate(['email' => 'required|email|unique:users'])['email'];
$user = $request->user();
$user->email = $email;
$user->save();
return redirect('/user');
}
public function verify(Request $request)
{
if (!option('require_verification')) {
throw new PrettyPageException(trans('user.verification.disabled'), 1);
}
abort_unless($request->hasValidSignature(false), 403, trans('auth.verify.invalid'));
return view('auth.verify');
}
public function handleVerify(Request $request, User $user)
{
abort_unless($request->hasValidSignature(false), 403, trans('auth.verify.invalid'));
['email' => $email] = $request->validate(['email' => 'required|email']);
if ($user->email !== $email) {
return back()->with('errorMessage', trans('auth.verify.not-matched'));
}
$user->verified = true;
$user->save();
return redirect()->route('user.home');
}
}

View File

@ -0,0 +1,198 @@
<?php
namespace App\Http\Controllers;
use App\Models\Texture;
use App\Models\User;
use Blessing\Filter;
use Blessing\Rejection;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class ClosetController extends Controller
{
public function index(Filter $filter)
{
$grid = [
'layout' => [
['md-8', 'md-4'],
],
'widgets' => [
[
[
'user.widgets.email-verification',
'user.widgets.closet.list',
],
['shared.previewer'],
],
],
];
$grid = $filter->apply('grid:user.closet', $grid);
return view('user.closet')
->with('grid', $grid)
->with('extra', [
'unverified' => option('require_verification') && !auth()->user()->verified,
'rule' => trans('user.player.player-name-rule.'.option('player_name_rule')),
'length' => trans(
'user.player.player-name-length',
['min' => option('player_name_length_min'), 'max' => option('player_name_length_max')]
),
]);
}
public function getClosetData(Request $request)
{
$category = $request->input('category', 'skin');
/** @var User */
$user = auth()->user();
return $user
->closet()
->when(
$category === 'cape',
fn (Builder $query) => $query->where('type', 'cape'),
fn (Builder $query) => $query->whereIn('type', ['steve', 'alex']),
)
->when(
$request->input('q'),
fn (Builder $query, $search) => $query->like('item_name', $search)
)
->orderBy('texture_tid', 'DESC')
->paginate((int) $request->input('perPage', 6));
}
public function allIds()
{
/** @var User */
$user = auth()->user();
return $user->closet()->pluck('texture_tid');
}
public function add(
Request $request,
Dispatcher $dispatcher,
Filter $filter,
) {
['tid' => $tid, 'name' => $name] = $request->validate([
'tid' => 'required|integer',
'name' => 'required',
]);
/** @var User */
$user = Auth::user();
$name = $filter->apply('add_closet_item_name', $name, [$tid]);
$dispatcher->dispatch('closet.adding', [$tid, $name, $user]);
$can = $filter->apply('can_add_closet_item', true, [$tid, $name]);
if ($can instanceof Rejection) {
return json($can->getReason(), 1);
}
if ($user->score < option('score_per_closet_item')) {
return json(trans('user.closet.add.lack-score'), 1);
}
$tid = $request->tid;
$texture = Texture::find($tid);
if (!$texture) {
return json(trans('user.closet.add.not-found'), 1);
}
if (!$texture->public && ($texture->uploader != $user->uid && !$user->isAdmin())) {
return json(trans('skinlib.show.private'), 1);
}
if ($user->closet()->where('tid', $request->tid)->count() > 0) {
return json(trans('user.closet.add.repeated'), 1);
}
$user->closet()->attach($tid, ['item_name' => $request->name]);
$user->score -= option('score_per_closet_item');
$user->save();
$texture->likes++;
$texture->save();
$dispatcher->dispatch('closet.added', [$texture, $name, $user]);
$uploader = User::find($texture->uploader);
if ($uploader && $uploader->uid != $user->uid) {
$uploader->score += option('score_award_per_like', 0);
$uploader->save();
}
return json(trans('user.closet.add.success', ['name' => $request->input('name')]), 0);
}
public function rename(
Request $request,
Dispatcher $dispatcher,
Filter $filter,
$tid,
) {
['name' => $name] = $request->validate(['name' => 'required']);
/** @var User */
$user = auth()->user();
$name = $filter->apply('rename_closet_item_name', $name, [$tid]);
$dispatcher->dispatch('closet.renaming', [$tid, $name, $user]);
$item = $user->closet()->find($tid);
if (empty($item)) {
return json(trans('user.closet.remove.non-existent'), 1);
}
$previousName = $item->pivot->item_name;
$can = $filter->apply('can_rename_closet_item', true, [$item, $name]);
if ($can instanceof Rejection) {
return json($can->getReason(), 1);
}
$user->closet()->updateExistingPivot($tid, ['item_name' => $name]);
$dispatcher->dispatch('closet.renamed', [$item, $previousName, $user]);
return json(trans('user.closet.rename.success', ['name' => $name]), 0);
}
public function remove(Dispatcher $dispatcher, Filter $filter, $tid)
{
/** @var User */
$user = auth()->user();
$dispatcher->dispatch('closet.removing', [$tid, $user]);
$item = $user->closet()->find($tid);
if (empty($item)) {
return json(trans('user.closet.remove.non-existent'), 1);
}
$can = $filter->apply('can_remove_closet_item', true, [$item]);
if ($can instanceof Rejection) {
return json($can->getReason(), 1);
}
$user->closet()->detach($tid);
if (option('return_score')) {
$user->score += option('score_per_closet_item');
$user->save();
}
$texture = Texture::find($tid);
$texture->likes--;
$texture->save();
$dispatcher->dispatch('closet.removed', [$texture, $user]);
$uploader = User::find($texture->uploader);
$uploader->score -= option('score_award_per_like', 0);
$uploader->save();
return json(trans('user.closet.remove.success'), 0);
}
}

View File

@ -0,0 +1,58 @@
<?php
namespace App\Http\Controllers;
use App\Models\Texture;
use App\Models\User;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Http\Request;
class ClosetManagementController extends Controller
{
public function list(User $user)
{
return $user->closet;
}
public function add(Request $request, Dispatcher $dispatcher, User $user)
{
$tid = $request->input('tid');
$texture = Texture::find($tid);
if (!$texture) {
return json(trans('user.closet.add.not-found'), 1);
}
if ($user->closet()->where('tid', $request->tid)->count() > 0) {
return json(trans('user.closet.add.repeated'), 1);
}
$name = $texture->name;
$dispatcher->dispatch('closet.adding', [$tid, $name, $user]);
$user->closet()->attach($texture->tid, ['item_name' => $name]);
$dispatcher->dispatch('closet.added', [$texture, $name, $user]);
return json('', 0, compact('user', 'texture'));
}
public function remove(Request $request, Dispatcher $dispatcher, User $user)
{
$tid = $request->input('tid');
$dispatcher->dispatch('closet.removing', [$tid, $user]);
$item = $user->closet()->find($tid);
if (empty($item)) {
return json(trans('user.closet.remove.non-existent'), 1);
}
$user->closet()->detach($tid);
$texture = Texture::find($tid);
$dispatcher->dispatch('closet.removed', [$texture, $user]);
return json('', 0, compact('user', 'texture'));
}
}

View File

@ -0,0 +1,13 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController
{
use DispatchesJobs;
use ValidatesRequests;
}

View File

@ -0,0 +1,42 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Arr;
class HomeController extends Controller
{
public function index()
{
return view('home')
->with('user', auth()->user())
->with('site_description', option_localized('site_description'))
->with('transparent_navbar', (bool) option('transparent_navbar', false))
->with('fixed_bg', option('fixed_bg'))
->with('hide_intro', option('hide_intro'))
->with('home_pic_url', option('home_pic_url') ?: config('options.home_pic_url'));
}
public function apiRoot()
{
$copyright = Arr::get(
[
'Powered with ❤ by Blessing Skin Server.',
'Powered by Blessing Skin Server.',
'Proudly powered by Blessing Skin Server.',
'由 Blessing Skin Server 强力驱动。',
'采用 Blessing Skin Server 搭建。',
'使用 Blessing Skin Server 稳定运行。',
'自豪地采用 Blessing Skin Server。',
],
option_localized('copyright_prefer', 0)
);
return response()->json([
'blessing_skin' => config('app.version'),
'spec' => 0,
'copyright' => $copyright,
'site_name' => option('site_name'),
]);
}
}

View File

@ -0,0 +1,100 @@
<?php
namespace App\Http\Controllers;
use App\Services\Plugin;
use App\Services\PluginManager;
use App\Services\Unzip;
use Composer\CaBundle\CaBundle;
use Composer\Semver\Comparator;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Http;
class MarketController extends Controller
{
public function marketData(PluginManager $manager)
{
$plugins = $this->fetch()->map(function ($item) use ($manager) {
$plugin = $manager->get($item['name']);
if ($plugin) {
$item['installed'] = $plugin->version;
$item['can_update'] = Comparator::greaterThan($item['version'], $item['installed']);
} else {
$item['installed'] = false;
}
$requirements = Arr::get($item, 'require', []);
unset($item['require']);
$item['dependencies'] = [
'all' => $requirements,
'unsatisfied' => $manager->getUnsatisfied(new Plugin('', $item)),
];
return $item;
});
return $plugins;
}
public function download(Request $request, PluginManager $manager, Unzip $unzip)
{
$name = $request->input('name');
$plugins = $this->fetch();
$metadata = $plugins->firstWhere('name', $name);
if (!$metadata) {
return json(trans('admin.plugins.market.non-existent', ['plugin' => $name]), 1);
}
$fakePlugin = new Plugin('', $metadata);
$unsatisfied = $manager->getUnsatisfied($fakePlugin);
$conflicts = $manager->getConflicts($fakePlugin);
if ($unsatisfied->isNotEmpty() || $conflicts->isNotEmpty()) {
$reason = $manager->formatUnresolved($unsatisfied, $conflicts);
return json(trans('admin.plugins.market.unresolved'), 1, compact('reason'));
}
$path = tempnam(sys_get_temp_dir(), $name);
$response = Http::withOptions([
'sink' => $path,
'verify' => CaBundle::getSystemCaRootBundlePath(),
])->get($metadata['dist']['url']);
if ($response->ok()) {
$unzip->extract($path, $manager->getPluginsDirs()->first());
return json(trans('admin.plugins.market.install-success'), 0);
} else {
return json(trans('admin.download.errors.download', ['error' => $response->status()]), 1);
}
}
protected function fetch(): Collection
{
$lang = in_array(app()->getLocale(), config('plugins.locales'))
? app()->getLocale()
: config('app.fallback_locale');
$plugins = collect(explode(',', config('plugins.registry')))
->map(function ($registry) use ($lang) {
$registry = str_replace('{lang}', $lang, $registry);
$response = Http::withOptions([
'verify' => CaBundle::getSystemCaRootBundlePath(),
])->get(trim($registry));
if ($response->ok()) {
return $response->json()['packages'];
} else {
throw new Exception(trans('admin.plugins.market.connection-error', ['error' => $response->status()]));
}
})
->flatten(1);
return $plugins;
}
}

View File

@ -0,0 +1,72 @@
<?php
namespace App\Http\Controllers;
use App\Models\User;
use App\Notifications;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Notification;
use League\CommonMark\GithubFlavoredMarkdownConverter;
class NotificationsController extends Controller
{
public function send(Request $request)
{
$data = $request->validate([
'receiver' => 'required|in:all,normal,uid,email',
'uid' => 'required_if:receiver,uid|nullable|integer|exists:users',
'email' => 'required_if:receiver,email|nullable|email|exists:users',
'title' => 'required|max:20',
'content' => 'string|nullable',
]);
$notification = new Notifications\SiteMessage($data['title'], $data['content']);
switch ($data['receiver']) {
case 'all':
$users = User::all();
break;
case 'normal':
$users = User::where('permission', User::NORMAL)->get();
break;
case 'uid':
$users = User::where('uid', $data['uid'])->get();
break;
case 'email':
$users = User::where('email', $data['email'])->get();
break;
}
Notification::send($users, $notification);
session(['sentResult' => trans('admin.notifications.send.success')]);
return redirect('/admin');
}
public function all()
{
return auth()->user()
->unreadNotifications
->map(fn ($notification) => [
'id' => $notification->id,
'title' => $notification->data['title'],
]);
}
public function read($id)
{
$notification = auth()
->user()
->unreadNotifications
->first(fn ($notification) => $notification->id === $id);
$notification->markAsRead();
$converter = new GithubFlavoredMarkdownConverter();
return [
'title' => $notification->data['title'],
'content' => $converter->convertToHtml($notification->data['content'] ?? '')->getContent(),
'time' => $notification->created_at->toDateTimeString(),
];
}
}

View File

@ -0,0 +1,270 @@
<?php
namespace App\Http\Controllers;
use App\Services\Facades\Option;
use App\Services\OptionForm;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Str;
class OptionsController extends Controller
{
public function customize(Request $request)
{
$homepage = Option::form('homepage', OptionForm::AUTO_DETECT, function ($form) {
$form->text('home_pic_url')->hint();
$form->text('favicon_url')->hint()->description();
$form->checkbox('transparent_navbar')->label();
$form->checkbox('hide_intro')->label();
$form->checkbox('fixed_bg')->label();
$form->select('copyright_prefer')
->option('0', 'Powered with ❤ by Blessing Skin Server.')
->option('1', 'Powered by Blessing Skin Server.')
->option('2', 'Proudly powered by Blessing Skin Server.')
->option('3', '由 Blessing Skin Server 强力驱动。')
->option('4', '采用 Blessing Skin Server 搭建。')
->option('5', '使用 Blessing Skin Server 稳定运行。')
->option('6', '自豪地采用 Blessing Skin Server。')
->description();
$form->textarea('copyright_text')->rows(6)->description();
})->handle(function () {
Option::set('copyright_prefer_'.config('app.locale'), request('copyright_prefer'));
Option::set('copyright_text_'.config('app.locale'), request('copyright_text'));
});
$customJsCss = Option::form('customJsCss', OptionForm::AUTO_DETECT, function ($form) {
$form->textarea('custom_css', 'CSS')->rows(6);
$form->textarea('custom_js', 'JavaScript')->rows(6);
})->addMessage()->handle();
if ($request->isMethod('post') && $request->input('action') === 'color') {
$navbar = $request->input('navbar');
if ($navbar) {
option(['navbar_color' => $navbar]);
}
$sidebar = $request->input('sidebar');
if ($sidebar) {
option(['sidebar_color' => $sidebar]);
}
}
return view('admin.customize', [
'colors' => [
'navbar' => [
'primary', 'secondary', 'success', 'danger', 'indigo',
'purple', 'pink', 'teal', 'cyan', 'dark', 'gray',
'fuchsia', 'maroon', 'olive', 'navy',
'lime', 'light', 'warning', 'white', 'orange',
],
'sidebar' => [
'primary', 'warning', 'info', 'danger', 'success', 'indigo',
'navy', 'purple', 'fuchsia', 'pink', 'maroon', 'orange',
'lime', 'teal', 'olive',
],
],
'forms' => [
'homepage' => $homepage,
'custom_js_css' => $customJsCss,
],
'extra' => [
'navbar' => option('navbar_color'),
'sidebar' => option('sidebar_color'),
],
]);
}
public function score()
{
$rate = Option::form('rate', OptionForm::AUTO_DETECT, function ($form) {
$form->group('score_per_storage')->text('score_per_storage')->addon();
$form->group('private_score_per_storage')
->text('private_score_per_storage')->addon()->hint();
$form->group('score_per_closet_item')
->text('score_per_closet_item')->addon();
$form->checkbox('return_score')->label();
$form->group('score_per_player')->text('score_per_player')->addon();
$form->text('user_initial_score');
})->handle();
$report = Option::form('report', OptionForm::AUTO_DETECT, function ($form) {
$form->text('reporter_score_modification')->description();
$form->text('reporter_reward_score');
})->handle();
$sign = Option::form('sign', OptionForm::AUTO_DETECT, function ($form) {
$form->group('sign_score')
->text('sign_score_from')->addon(trans('options.sign.sign_score.addon1'))
->text('sign_score_to')->addon(trans('options.sign.sign_score.addon2'));
$form->group('sign_gap_time')->text('sign_gap_time')->addon();
$form->checkbox('sign_after_zero')->label()->hint();
})->after(function () {
$sign_score = request('sign_score_from').','.request('sign_score_to');
Option::set('sign_score', $sign_score);
})->with([
'sign_score_from' => @explode(',', option('sign_score'))[0],
'sign_score_to' => @explode(',', option('sign_score'))[1],
])->handle();
$sharing = Option::form('sharing', OptionForm::AUTO_DETECT, function ($form) {
$form->group('score_award_per_texture')
->text('score_award_per_texture')
->addon(trans('general.user.score'));
$form->checkbox('take_back_scores_after_deletion')->label();
$form->group('score_award_per_like')
->text('score_award_per_like')
->addon(trans('general.user.score'));
})->handle();
return view('admin.score', ['forms' => compact('rate', 'report', 'sign', 'sharing')]);
}
public function options()
{
$general = Option::form('general', OptionForm::AUTO_DETECT, function ($form) {
$form->text('site_name');
$form->text('site_description')->description();
$form->text('site_url')
->hint()
->format(function ($url) {
if (Str::endsWith($url, '/')) {
$url = substr($url, 0, -1);
}
if (Str::endsWith($url, '/index.php')) {
$url = substr($url, 0, -10);
}
return $url;
});
$form->checkbox('register_with_player_name')->label();
$form->checkbox('require_verification')->label();
$form->text('regs_per_ip');
$form->group('max_upload_file_size')
->text('max_upload_file_size')->addon('KB')
->hint(trans('options.general.max_upload_file_size.hint', ['size' => ini_get('upload_max_filesize')]));
$form->group('max_texture_width')
->text('max_texture_width')->addon('px')
->hint(trans('options.general.max_texture_width.hint'));
$form->select('player_name_rule')
->option('official', trans('options.general.player_name_rule.official'))
->option('cjk', trans('options.general.player_name_rule.cjk'))
->option('utf8', trans('options.general.player_name_rule.utf8'))
->option('custom', trans('options.general.player_name_rule.custom'));
$form->text('custom_player_name_regexp')->hint()->placeholder();
$form->group('player_name_length')
->text('player_name_length_min')
->addon('~')
->text('player_name_length_max')
->addon(trans('options.general.player_name_length.suffix'));
$form->checkbox('auto_del_invalid_texture')->label()->hint();
$form->checkbox('allow_downloading_texture')->label();
$form->select('status_code_for_private')
->option('403', '403 Forbidden')
->option('404', '404 Not Found');
$form->text('texture_name_regexp')->hint()->placeholder();
$form->textarea('content_policy')->rows(3)->description();
})->handle(function () {
Option::set('site_name_'.config('app.locale'), request('site_name'));
Option::set('site_description_'.config('app.locale'), request('site_description'));
Option::set('content_policy_'.config('app.locale'), request('content_policy'));
});
$announ = Option::form('announ', OptionForm::AUTO_DETECT, function ($form) {
$form->textarea('announcement')->rows(10)->description();
})->renderWithoutTable()->handle(function () {
Option::set('announcement_'.config('app.locale'), request('announcement'));
});
$meta = Option::form('meta', OptionForm::AUTO_DETECT, function ($form) {
$form->text('meta_keywords')->hint();
$form->text('meta_description')->hint();
$form->textarea('meta_extras')->rows(6);
})->handle();
$recaptcha = Option::form('recaptcha', 'reCAPTCHA', function ($form) {
$form->text('recaptcha_sitekey', 'sitekey');
$form->text('recaptcha_secretkey', 'secretkey');
$form->checkbox('recaptcha_invisible')->label();
})->handle();
return view('admin.options')
->with('forms', compact('general', 'announ', 'meta', 'recaptcha'));
}
public function resource(Request $request)
{
$resources = Option::form('resources', OptionForm::AUTO_DETECT, function ($form) {
$form->checkbox('force_ssl')->label()->hint();
$form->checkbox('auto_detect_asset_url')->label()->description();
$form->text('cache_expire_time')->hint(OptionForm::AUTO_DETECT);
$form->text('cdn_address')
->hint(OptionForm::AUTO_DETECT)
->description(OptionForm::AUTO_DETECT);
})
->type('primary')
->hint(OptionForm::AUTO_DETECT)
->after(function () {
$cdnAddress = request('cdn_address');
if ($cdnAddress == null) {
$cdnAddress = '';
}
if (Str::endsWith($cdnAddress, '/')) {
$cdnAddress = substr($cdnAddress, 0, -1);
}
Option::set('cdn_address', $cdnAddress);
})
->handle();
$cache = Option::form('cache', OptionForm::AUTO_DETECT, function ($form) {
$form->checkbox('enable_avatar_cache')->label();
$form->checkbox('enable_preview_cache')->label();
})
->type('warning')
->addButton([
'text' => trans('options.cache.clear'),
'type' => 'a',
'class' => 'float-right',
'style' => 'warning',
'href' => '?clear-cache',
])
->addMessage(trans('options.cache.driver', ['driver' => config('cache.default')]), 'info');
if ($request->has('clear-cache')) {
Cache::flush();
$cache->addMessage(trans('options.cache.cleared'), 'success');
}
$cache->handle();
return view('admin.resource')->with('forms', compact('resources', 'cache'));
}
}

View File

@ -0,0 +1,260 @@
<?php
namespace App\Http\Controllers;
use App\Events\PlayerWasAdded;
use App\Events\PlayerWasDeleted;
use App\Events\PlayerWillBeAdded;
use App\Events\PlayerWillBeDeleted;
use App\Models\Player;
use App\Models\Texture;
use App\Models\User;
use App\Rules;
use Blessing\Filter;
use Blessing\Rejection;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\Rule;
class PlayerController extends Controller
{
public function __construct()
{
$this->middleware(function (Request $request, $next) {
/** @var Player */
$player = $request->route('player');
if ($player->user->isNot($request->user())) {
return json(trans('admin.players.no-permission'), 1)
->setStatusCode(403);
}
return $next($request);
}, [
'only' => ['delete', 'rename', 'setTexture', 'clearTexture'],
]);
}
public function index(Filter $filter)
{
$grid = [
'layout' => [
['md-6', 'md-6'],
],
'widgets' => [
[
[
'user.widgets.players.list',
'user.widgets.players.notice',
],
['shared.previewer'],
],
],
];
$grid = $filter->apply('grid:user.player', $grid);
/** @var User */
$user = auth()->user();
return view('user.player')
->with('grid', $grid)
->with('extra', [
'count' => $user->players()->count(),
'rule' => trans('user.player.player-name-rule.'.option('player_name_rule')),
'length' => trans(
'user.player.player-name-length',
['min' => option('player_name_length_min'), 'max' => option('player_name_length_max')]
),
'score' => auth()->user()->score,
'cost' => (int) option('score_per_player'),
]);
}
public function list()
{
return Auth::user()->players;
}
public function add(Request $request, Dispatcher $dispatcher, Filter $filter)
{
/** @var User */
$user = Auth::user();
$name = $request->validate([
'name' => [
'required',
new Rules\PlayerName(),
'min:'.option('player_name_length_min'),
'max:'.option('player_name_length_max'),
'unique:players',
],
])['name'];
$name = $filter->apply('new_player_name', $name);
$dispatcher->dispatch('player.add.attempt', [$name, $user]);
$can = $filter->apply('can_add_player', true, [$name]);
if ($can instanceof Rejection) {
return json($can->getReason(), 1);
}
if ($user->score < (int) option('score_per_player')) {
return json(trans('user.player.add.lack-score'), 7);
}
$dispatcher->dispatch('player.adding', [$name, $user]);
event(new PlayerWillBeAdded($name));
$player = new Player();
$player->uid = $user->uid;
$player->name = $name;
$player->tid_skin = 0;
$player->tid_cape = 0;
$player->save();
$user->score -= (int) option('score_per_player');
$user->save();
$dispatcher->dispatch('player.added', [$player, $user]);
event(new PlayerWasAdded($player));
return json(trans('user.player.add.success', ['name' => $name]), 0, $player->toArray());
}
public function delete(
Dispatcher $dispatcher,
Filter $filter,
Player $player,
) {
/** @var User */
$user = auth()->user();
$playerName = $player->name;
$dispatcher->dispatch('player.delete.attempt', [$player, $user]);
$can = $filter->apply('can_delete_player', true, [$player]);
if ($can instanceof Rejection) {
return json($can->getReason(), 1);
}
$dispatcher->dispatch('player.deleting', [$player, $user]);
event(new PlayerWillBeDeleted($player));
$player->delete();
if (option('return_score')) {
$user->score += (int) option('score_per_player');
$user->save();
}
$dispatcher->dispatch('player.deleted', [$player, $user]);
event(new PlayerWasDeleted($playerName));
return json(trans('user.player.delete.success', ['name' => $playerName]), 0);
}
public function rename(
Request $request,
Dispatcher $dispatcher,
Filter $filter,
Player $player,
) {
$name = $request->validate([
'name' => [
'required',
new Rules\PlayerName(),
'min:'.option('player_name_length_min'),
'max:'.option('player_name_length_max'),
Rule::unique('players')->ignoreModel($player),
],
])['name'];
$name = $filter->apply('new_player_name', $name);
$dispatcher->dispatch('player.renaming', [$player, $name]);
$can = $filter->apply('can_rename_player', true, [$player, $name]);
if ($can instanceof Rejection) {
return json($can->getReason(), 1);
}
$old = $player->replicate();
$player->name = $name;
$player->save();
$dispatcher->dispatch('player.renamed', [$player, $old]);
return json(
trans('user.player.rename.success', ['old' => $old->name, 'new' => $name]),
0,
$player->toArray()
);
}
public function setTexture(
Request $request,
Dispatcher $dispatcher,
Filter $filter,
Player $player,
) {
/** @var User */
$user = auth()->user();
foreach (['skin', 'cape'] as $type) {
$tid = $request->input($type);
$can = $filter->apply('can_set_texture', true, [$player, $type, $tid]);
if ($can instanceof Rejection) {
return json($can->getReason(), 1);
}
if ($tid) {
$texture = Texture::find($tid);
if (empty($texture)) {
return json(trans('skinlib.non-existent'), 1);
}
if ($user->closet()->where('texture_tid', $tid)->doesntExist()) {
return json(trans('user.closet.remove.non-existent'), 1);
}
$dispatcher->dispatch('player.texture.updating', [$player, $texture]);
$field = "tid_$type";
$player->$field = $tid;
$player->save();
$dispatcher->dispatch('player.texture.updated', [$player, $texture]);
}
}
return json(trans('user.player.set.success', ['name' => $player->name]), 0, $player->toArray());
}
public function clearTexture(
Request $request,
Dispatcher $dispatcher,
Filter $filter,
Player $player,
) {
$types = $request->input('type', []);
foreach (['skin', 'cape'] as $type) {
$can = $filter->apply('can_clear_texture', true, [$player, $type]);
if ($can instanceof Rejection) {
return json($can->getReason(), 1);
}
if ($request->has($type) || in_array($type, $types)) {
$dispatcher->dispatch('player.texture.resetting', [$player, $type]);
$field = "tid_$type";
$player->$field = 0;
$player->save();
$dispatcher->dispatch('player.texture.reset', [$player, $type]);
}
}
return json(trans('user.player.clear.success', ['name' => $player->name]), 0, $player->toArray());
}
}

Some files were not shown because too many files have changed in this diff Show More