diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f778b495..057cb3487 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,28 @@ All notable changes to this project will be documented in this file. +## NOJ 0.17.4 Characinae Build Pack 4 - 2021-11-03 +This is a build version update for `0.17.0 Characinae`. + +**Important:** Rerun `npm ci` and `composer install` then `npm run production`. + +### Update Logs +* **New:** NOJ now supports `contest.exsits` middleware. +* **New:** NOJ now uses Github markdown style to render messages. +* **Fixed:** A PHP7.4 compatibility bug causing contest details to return 500 when users don't have clearance. +* **Improved:** Remastered contest routers. +* **Security:** `encore/laravel-admin` is now at `1.8.16`. +* **Security:** `laravel/framework` is now at `8.69.0`. +* **Security:** `laravel/passport` is now at `10.2.0`. +* **Security:** `laravel/ui` is now at `3.3.1`. +* **Security:** `phpseclib/phpseclib` is now at `3.0.11`. +* **Security:** `symfony/console` is now at `5.3.10`. +* **Security:** `symfony/http-foundation` is now at `5.3.10`. +* **Security:** `symfony/http-kernel` is now at `5.3.10`. +* **Security:** `symfony/string` is now at `5.3.10`. +* **Security:** `symfony/translation` is now at `5.3.10`. +* **Security:** `symfony/var-dumper` is now at `5.3.10`. + ## NOJ 0.17.3 Characinae Build Pack 3 - 2021-10-30 This is a build version update for `0.17.0 Characinae`. diff --git a/app/Http/Controllers/Contest/IndexController.php b/app/Http/Controllers/Contest/IndexController.php index 37863f304..c64939ede 100644 --- a/app/Http/Controllers/Contest/IndexController.php +++ b/app/Http/Controllers/Contest/IndexController.php @@ -70,7 +70,11 @@ public function detail($cid) if (Auth::check()) { $contest_detail=$contestModel->detail($cid, Auth::user()->id); $registration=$contestModel->registration($cid, Auth::user()->id); - $inGroup=$groupModel->isMember($contest_detail["data"]["contest_detail"]["gid"], Auth::user()->id); + if(filled($contest_detail["data"])) { + $inGroup=$groupModel->isMember($contest_detail["data"]["contest_detail"]["gid"], Auth::user()->id); + } else { + $inGroup = false; + } } else { $contest_detail=$contestModel->detail($cid); $registration=[]; diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 906187cdf..0e4c0f05a 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -66,6 +66,7 @@ class Kernel extends HttpKernel 'group.exist' => \App\Http\Middleware\Group\Exists::class, 'group.banned' => \App\Http\Middleware\Group\Banned::class, + 'contest.exists' => \App\Http\Middleware\Contest\Exists::class, 'contest.desktop' => \App\Http\Middleware\Contest\IsDesktop::class, 'contest.board.admin.pdfview.clearance' => \App\Http\Middleware\Contest\Board\Admin\PDFView\Clearance::class, diff --git a/app/Http/Middleware/Contest/Exists.php b/app/Http/Middleware/Contest/Exists.php new file mode 100644 index 000000000..9e249037b --- /dev/null +++ b/app/Http/Middleware/Contest/Exists.php @@ -0,0 +1,24 @@ +cid); + + if(blank($contest)) { + return redirect()->route('contest.index'); + } + + $request->merge([ + 'contestInstance' => $contest + ]); + + return $next($request); + } +} diff --git a/composer.lock b/composer.lock index 2fca77656..e4ac6117d 100644 --- a/composer.lock +++ b/composer.lock @@ -1201,20 +1201,20 @@ }, { "name": "encore/laravel-admin", - "version": "v1.8.14", + "version": "v1.8.16", "source": { "type": "git", "url": "https://github.com/z-song/laravel-admin.git", - "reference": "cb28d1f0f072f9cadb1589ea1a7dcf39e0fae413" + "reference": "0f7bafbd2acd4cdb2118c2a6105a6b2aa9dacb13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/z-song/laravel-admin/zipball/cb28d1f0f072f9cadb1589ea1a7dcf39e0fae413", - "reference": "cb28d1f0f072f9cadb1589ea1a7dcf39e0fae413", + "url": "https://api.github.com/repos/z-song/laravel-admin/zipball/0f7bafbd2acd4cdb2118c2a6105a6b2aa9dacb13", + "reference": "0f7bafbd2acd4cdb2118c2a6105a6b2aa9dacb13", "shasum": "" }, "require": { - "doctrine/dbal": "2.*", + "doctrine/dbal": "2.*|3.*", "laravel/framework": ">=5.5", "php": ">=7.0.0", "symfony/dom-crawler": "~3.1|~4.0|~5.0" @@ -1269,9 +1269,9 @@ ], "support": { "issues": "https://github.com/z-song/laravel-admin/issues", - "source": "https://github.com/z-song/laravel-admin/tree/v1.8.14" + "source": "https://github.com/z-song/laravel-admin/tree/v1.8.16" }, - "time": "2021-09-01T01:15:15+00:00" + "time": "2021-11-02T07:52:31+00:00" }, { "name": "ezyang/htmlpurifier", @@ -2999,16 +2999,16 @@ }, { "name": "laravel/framework", - "version": "v8.68.1", + "version": "v8.69.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "abe985ff1fb82dd04aab03bc1dc56e83fe61a59f" + "reference": "545181da688db64fed6d8427e55f630a90ca0d32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/abe985ff1fb82dd04aab03bc1dc56e83fe61a59f", - "reference": "abe985ff1fb82dd04aab03bc1dc56e83fe61a59f", + "url": "https://api.github.com/repos/laravel/framework/zipball/545181da688db64fed6d8427e55f630a90ca0d32", + "reference": "545181da688db64fed6d8427e55f630a90ca0d32", "shasum": "" }, "require": { @@ -3167,20 +3167,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-10-27T12:31:46+00:00" + "time": "2021-11-02T13:53:22+00:00" }, { "name": "laravel/passport", - "version": "v10.1.4", + "version": "v10.2.0", "source": { "type": "git", "url": "https://github.com/laravel/passport.git", - "reference": "c889d9c464fea409dffe283e9c4e7054ef7aca6f" + "reference": "1c69a010930a3ce8db348967d8ad9585be4d7d4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/passport/zipball/c889d9c464fea409dffe283e9c4e7054ef7aca6f", - "reference": "c889d9c464fea409dffe283e9c4e7054ef7aca6f", + "url": "https://api.github.com/repos/laravel/passport/zipball/1c69a010930a3ce8db348967d8ad9585be4d7d4d", + "reference": "1c69a010930a3ce8db348967d8ad9585be4d7d4d", "shasum": "" }, "require": { @@ -3244,7 +3244,7 @@ "issues": "https://github.com/laravel/passport/issues", "source": "https://github.com/laravel/passport" }, - "time": "2021-10-19T15:25:10+00:00" + "time": "2021-11-02T16:45:51+00:00" }, { "name": "laravel/serializable-closure", @@ -3444,16 +3444,16 @@ }, { "name": "laravel/ui", - "version": "v3.3.0", + "version": "v3.3.1", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "07d725813350c695c779382cbd6dac0ab8665537" + "reference": "a449e3364d9780a80a49894a3af9795c85af806f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/07d725813350c695c779382cbd6dac0ab8665537", - "reference": "07d725813350c695c779382cbd6dac0ab8665537", + "url": "https://api.github.com/repos/laravel/ui/zipball/a449e3364d9780a80a49894a3af9795c85af806f", + "reference": "a449e3364d9780a80a49894a3af9795c85af806f", "shasum": "" }, "require": { @@ -3496,9 +3496,9 @@ "ui" ], "support": { - "source": "https://github.com/laravel/ui/tree/v3.3.0" + "source": "https://github.com/laravel/ui/tree/v3.3.1" }, - "time": "2021-05-25T16:45:33+00:00" + "time": "2021-11-02T17:04:20+00:00" }, { "name": "laravelium/sitemap", @@ -3642,13 +3642,7 @@ "type": "zip", "url": "https://api.github.com/repos/lcobucci/jwt/zipball/55564265fddf810504110bd68ca311932324b0e9", "reference": "55564265fddf810504110bd68ca311932324b0e9", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "ext-mbstring": "*", @@ -6224,16 +6218,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.10", + "version": "3.0.11", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "62fcc5a94ac83b1506f52d7558d828617fac9187" + "reference": "6e794226a35159eb06f355efe59a0075a16551dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/62fcc5a94ac83b1506f52d7558d828617fac9187", - "reference": "62fcc5a94ac83b1506f52d7558d828617fac9187", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/6e794226a35159eb06f355efe59a0075a16551dd", + "reference": "6e794226a35159eb06f355efe59a0075a16551dd", "shasum": "" }, "require": { @@ -6315,7 +6309,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.10" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.11" }, "funding": [ { @@ -6331,7 +6325,7 @@ "type": "tidelift" } ], - "time": "2021-08-16T04:24:45+00:00" + "time": "2021-10-27T03:01:46+00:00" }, { "name": "predis/predis", @@ -7657,16 +7651,16 @@ }, { "name": "symfony/console", - "version": "v5.3.7", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a" + "reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8b1008344647462ae6ec57559da166c2bfa5e16a", - "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a", + "url": "https://api.github.com/repos/symfony/console/zipball/d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3", + "reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3", "shasum": "" }, "require": { @@ -7736,7 +7730,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.3.7" + "source": "https://github.com/symfony/console/tree/v5.3.10" }, "funding": [ { @@ -7752,7 +7746,7 @@ "type": "tidelift" } ], - "time": "2021-08-25T20:02:16+00:00" + "time": "2021-10-26T09:30:15+00:00" }, { "name": "symfony/css-selector", @@ -8336,16 +8330,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.3.7", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e36c8e5502b4f3f0190c675f1c1f1248a64f04e5" + "reference": "9f34f02e8a5fdc7a56bafe011cea1ce97300e54c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e36c8e5502b4f3f0190c675f1c1f1248a64f04e5", - "reference": "e36c8e5502b4f3f0190c675f1c1f1248a64f04e5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/9f34f02e8a5fdc7a56bafe011cea1ce97300e54c", + "reference": "9f34f02e8a5fdc7a56bafe011cea1ce97300e54c", "shasum": "" }, "require": { @@ -8389,7 +8383,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.3.7" + "source": "https://github.com/symfony/http-foundation/tree/v5.3.10" }, "funding": [ { @@ -8405,20 +8399,20 @@ "type": "tidelift" } ], - "time": "2021-08-27T11:20:35+00:00" + "time": "2021-10-11T15:41:55+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.3.9", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "ceaf46a992f60e90645e7279825a830f733a17c5" + "reference": "703e4079920468e9522b72cf47fd76ce8d795e86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ceaf46a992f60e90645e7279825a830f733a17c5", - "reference": "ceaf46a992f60e90645e7279825a830f733a17c5", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/703e4079920468e9522b72cf47fd76ce8d795e86", + "reference": "703e4079920468e9522b72cf47fd76ce8d795e86", "shasum": "" }, "require": { @@ -8501,7 +8495,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.3.9" + "source": "https://github.com/symfony/http-kernel/tree/v5.3.10" }, "funding": [ { @@ -8517,7 +8511,7 @@ "type": "tidelift" } ], - "time": "2021-09-28T10:25:11+00:00" + "time": "2021-10-29T08:36:48+00:00" }, { "name": "symfony/mime", @@ -9731,16 +9725,16 @@ }, { "name": "symfony/string", - "version": "v5.3.7", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5" + "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8d224396e28d30f81969f083a58763b8b9ceb0a5", - "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5", + "url": "https://api.github.com/repos/symfony/string/zipball/d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", + "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", "shasum": "" }, "require": { @@ -9794,7 +9788,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.3.7" + "source": "https://github.com/symfony/string/tree/v5.3.10" }, "funding": [ { @@ -9810,20 +9804,20 @@ "type": "tidelift" } ], - "time": "2021-08-26T08:00:08+00:00" + "time": "2021-10-27T18:21:46+00:00" }, { "name": "symfony/translation", - "version": "v5.3.9", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "6e69f3551c1a3356cf6ea8d019bf039a0f8b6886" + "reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/6e69f3551c1a3356cf6ea8d019bf039a0f8b6886", - "reference": "6e69f3551c1a3356cf6ea8d019bf039a0f8b6886", + "url": "https://api.github.com/repos/symfony/translation/zipball/6ef197aea2ac8b9cd63e0da7522b3771714035aa", + "reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa", "shasum": "" }, "require": { @@ -9889,7 +9883,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.3.9" + "source": "https://github.com/symfony/translation/tree/v5.3.10" }, "funding": [ { @@ -9905,7 +9899,7 @@ "type": "tidelift" } ], - "time": "2021-08-26T08:22:53+00:00" + "time": "2021-10-10T06:43:24+00:00" }, { "name": "symfony/translation-contracts", @@ -9987,16 +9981,16 @@ }, { "name": "symfony/var-dumper", - "version": "v5.3.8", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "eaaea4098be1c90c8285543e1356a09c8aa5c8da" + "reference": "875432adb5f5570fff21036fd22aee244636b7d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/eaaea4098be1c90c8285543e1356a09c8aa5c8da", - "reference": "eaaea4098be1c90c8285543e1356a09c8aa5c8da", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/875432adb5f5570fff21036fd22aee244636b7d1", + "reference": "875432adb5f5570fff21036fd22aee244636b7d1", "shasum": "" }, "require": { @@ -10055,7 +10049,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.3.8" + "source": "https://github.com/symfony/var-dumper/tree/v5.3.10" }, "funding": [ { @@ -10071,7 +10065,7 @@ "type": "tidelift" } ], - "time": "2021-09-24T15:59:58+00:00" + "time": "2021-10-26T09:30:15+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", diff --git a/config/version.php b/config/version.php index 344e3f9d7..02ab6af1a 100644 --- a/config/version.php +++ b/config/version.php @@ -14,7 +14,7 @@ 'number' => [ 'major' => 0, 'minor' => 17, - 'build' => 3, + 'build' => 4, ], /* @@ -37,7 +37,7 @@ | */ - 'build' => 'Build Pack 3', + 'build' => 'Build Pack 4', /* |-------------------------------------------------------------------------- diff --git a/package-lock.json b/package-lock.json index bd39c460b..81b448a37 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4582,6 +4582,11 @@ "integrity": "sha1-omLY7vZ6ztV8KFKtYWdSakPL97c=", "dev": true }, + "github-markdown-css": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/github-markdown-css/download/github-markdown-css-5.0.0.tgz?cache=0&sync_timestamp=1634473559070&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fgithub-markdown-css%2Fdownload%2Fgithub-markdown-css-5.0.0.tgz", + "integrity": "sha1-gplmknZDQm8KQ6q+6ZkaPtUyKA0=" + }, "glob": { "version": "7.2.0", "resolved": "https://registry.npmmirror.com/glob/download/glob-7.2.0.tgz", diff --git a/package.json b/package.json index bb602dc3a..cf88429a4 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "clipboard": "^2.0", "codemirror": "^5.58", "dompurify": "^2.0", + "github-markdown-css": "^5.0.0", "highlight.js": "^11.2.0", "ignore-emit-webpack-plugin": "^2.0.6", "ignore-loader": "^0.1.2", diff --git a/resources/views/message/detail.blade.php b/resources/views/message/detail.blade.php index f14bc95cf..d4b15388e 100644 --- a/resources/views/message/detail.blade.php +++ b/resources/views/message/detail.blade.php @@ -19,40 +19,34 @@ box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 40px; } - paper-card > div.sender{ + paper-card > div.sender { display: flex; justify-content: flex-start; align-items: center; color: rgba(0, 0, 0, 0.62); } - .sender_name{ + .sender_name { font-weight: bolder; margin: 0; } - div.content img{ - max-width: calc(100% - 4rem); - } - - h5.msg-title { + h5.msg-title { font-weight: bold; font-family: 'Roboto Slab'; margin-bottom: 1rem; color: #000; } - div.content p{ - word-wrap:break-word; - word-break:break-all; - text-indent: 2rem; - } - - .cm-avatar{ + .cm-avatar { width:2.5rem; height:2.5rem; border-radius: 2000px; } + + .message-container { + padding: 1rem; + }
@@ -65,8 +59,10 @@

-
-

{!! clean(convertMarkdownToHtml($message->content)) !!}

+
+
+

{!! clean(convertMarkdownToHtml($message->content)) !!}

+
{{-- @if($message['allow_reply'])
diff --git a/routes/web.php b/routes/web.php index 49191979e..8137c1f9f 100644 --- a/routes/web.php +++ b/routes/web.php @@ -94,36 +94,39 @@ }); }); -Route::group([ - 'namespace' => 'Contest', - 'prefix' => 'contest', - 'as' => 'contest.', - 'middleware' => [ - 'contest_account', - 'user.banned' - ] -], function () { +Route::group([ 'namespace' => 'Contest', 'prefix' => 'contest', 'as' => 'contest.', 'middleware' => [ 'contest_account', 'user.banned' ] ], function () { + Route::get('/', 'IndexController@index')->name('index'); - Route::get('/{cid}', 'IndexController@detail')->name('detail'); - - Route::group(['as' => 'board.'], function () { - Route::group(['middleware' => ['contest.desktop']], function () { - Route::get('/{cid}/board', 'BoardController@board')->middleware('auth')->name('index'); - Route::get('/{cid}/board/challenge', 'BoardController@challenge')->middleware('auth')->name('challenge'); - Route::get('/{cid}/board/challenge/{ncode}', 'BoardController@editor')->middleware('auth')->name('editor'); - Route::get('/{cid}/board/rank', 'BoardController@rank')->middleware('auth')->name('rank'); - Route::get('/{cid}/board/status', 'BoardController@status')->middleware('auth')->name('status'); - Route::get('/{cid}/board/clarification', 'BoardController@clarification')->middleware('auth')->name('clarification'); - Route::get('/{cid}/board/print', 'BoardController@print')->middleware('auth')->name('print'); - Route::get('/{cid}/board/analysis', 'BoardController@analysis')->middleware('auth')->name('analysis'); + + Route::group(['prefix' => '{cid}', 'middleware' => ['contest.exists']], function () { + + Route::get('/', 'IndexController@detail')->name('detail'); + + Route::group(['as' => 'board.', 'prefix' => 'board', 'middleware' => ['auth']], function () { + + Route::group(['middleware' => ['contest.desktop']], function () { + Route::get('/', 'BoardController@board')->name('index'); + Route::get('/challenge', 'BoardController@challenge')->name('challenge'); + Route::get('/challenge/{ncode}', 'BoardController@editor')->name('editor'); + Route::get('/rank', 'BoardController@rank')->name('rank'); + Route::get('/status', 'BoardController@status')->name('status'); + Route::get('/clarification', 'BoardController@clarification')->name('clarification'); + Route::get('/print', 'BoardController@print')->name('print'); + Route::get('/analysis', 'BoardController@analysis')->name('analysis'); + }); + + Route::group(['prefix' => 'admin'], function () { + Route::get('/', 'AdminController@admin')->middleware(['privileged'])->name('admin'); + Route::get('/scrollBoard', 'AdminController@scrollBoard')->middleware(['contest_account', 'privileged'])->name('admin.scrollboard'); + Route::get('/downloadContestAccountXlsx', 'AdminController@downloadContestAccountXlsx')->name('admin.download.contestaccountxlsx'); + Route::get('/refreshContestRank', 'AdminController@refreshContestRank')->name('admin.refresh.contestrank'); + Route::get('/pdfView', 'AdminController@pdfView')->middleware(['contest.board.admin.pdfview.clearance'])->name('admin.pdf.view'); + }); + }); - Route::get('/{cid}/board/admin', 'AdminController@admin')->middleware('auth', 'privileged')->name('admin'); - Route::get('/{cid}/board/admin/scrollBoard', 'AdminController@scrollBoard')->middleware('auth', 'contest_account', 'privileged')->name('admin.scrollboard'); - Route::get('/{cid}/board/admin/downloadContestAccountXlsx', 'AdminController@downloadContestAccountXlsx')->middleware('auth')->name('admin.download.contestaccountxlsx'); - Route::get('/{cid}/board/admin/refreshContestRank', 'AdminController@refreshContestRank')->middleware('auth')->name('admin.refresh.contestrank'); - Route::get('/{cid}/board/admin/pdfView', 'AdminController@pdfView')->middleware('contest.board.admin.pdfview.clearance')->name('admin.pdf.view'); }); + }); Route::group(['prefix' => 'system', 'middleware' => ['user.banned']], function () { diff --git a/webpack.mix.js b/webpack.mix.js index 35beeba5c..b155132d2 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -32,6 +32,7 @@ mix.styles([ 'node_modules/codemirror/lib/codemirror.css', 'node_modules/codemirror/addon/hint/show-hint.css', 'node_modules/highlight.js/styles/vs.css', + 'node_modules/github-markdown-css/github-markdown-light.css', ], 'public/static/css/build/app.admin.css'); // Compile NOJ Admin Portal JS Libraries Bundle - app.admin.js @@ -71,6 +72,7 @@ mix.styles([ 'resources/css/main.css', 'node_modules/jquery-datetimepicker/build/jquery.datetimepicker.min.css', 'node_modules/simplemde/dist/simplemde.min.css', + 'node_modules/github-markdown-css/github-markdown-light.css', ], 'public/static/css/build/app.css'); // Compile NOJ Editor - app.editor.js