diff --git a/config/packages/sentry.yaml b/config/packages/sentry.yaml index babb935..ef371d1 100644 --- a/config/packages/sentry.yaml +++ b/config/packages/sentry.yaml @@ -7,5 +7,4 @@ sentry: - 'Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException' - 'Symfony\Component\Debug\Exception\FatalErrorException' - 'RuntimeException' - - 'Symfony\Component\Console\Exception\RuntimeException' - - + - 'Symfony\Component\Console\Exception\RuntimeException' diff --git a/config/packages/translation.yaml b/config/packages/translation.yaml index bc81d25..0202cf0 100644 --- a/config/packages/translation.yaml +++ b/config/packages/translation.yaml @@ -3,5 +3,4 @@ framework: translator: paths: - '%kernel.project_dir%/web/translation/backend' - fallbacks: - - 'zh' + fallbacks: ['zh'] diff --git a/package.json b/package.json index 5e1c65d..df7ad11 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,6 @@ "babel-preset-stage-2": "^6.22.0", "chalk": "^2.0.1", "copy-webpack-plugin": "^4.0.1", - "css-loader": "^0.28.0", "eslint": "^4.15.0", "eslint-config-standard": "^10.2.1", "eslint-friendly-formatter": "^3.0.0", @@ -85,7 +84,6 @@ "node-notifier": "^5.1.2", "node-sass": "^4.7.2", "optimize-css-assets-webpack-plugin": "^3.2.0", - "ora": "^1.2.0", "portfinder": "^1.0.13", "postcss-import": "^11.0.0", "postcss-loader": "^2.0.8", @@ -94,17 +92,14 @@ "sass-loader": "^6.0.6", "semver": "^5.3.0", "shelljs": "^0.7.6", - "style-loader": "^0.19.1", "uglifyjs-webpack-plugin": "^1.1.1", "url-loader": "^0.5.8", "vue-lazyload": "^1.2.1", "vue-loader": "^13.3.0", - "vue-style-loader": "^3.0.1", "vue-template-compiler": "^2.5.2", "webpack": "^3.6.0", "webpack-bundle-analyzer": "^2.9.0", - "webpack-dev-server": "^2.9.1", - "webpack-merge": "^4.1.0" + "webpack-dev-server": "^2.9.1" }, "engines": { "node": ">= 6.0.0", diff --git a/src/Controller/Basic/AboutController.php b/src/Controller/Basic/AboutController.php index 10a9f86..1ec1e16 100644 --- a/src/Controller/Basic/AboutController.php +++ b/src/Controller/Basic/AboutController.php @@ -32,12 +32,4 @@ public function version() return $this->response()->response($gitHashLong); } - /** - * @Route("/about/trans") - */ - public function trans(TranslatorInterface $translator) { - //$a = ; - return $this->response()->response($translator->trans("nihao")); - - } } diff --git a/src/Listener/LocaleListener.php b/src/Listener/LocaleListener.php index 427237a..ba7f161 100644 --- a/src/Listener/LocaleListener.php +++ b/src/Listener/LocaleListener.php @@ -7,9 +7,9 @@ class LocaleListener { public function onKernelRequest(GetResponseEvent $event) { $request = $event->getRequest(); - if($request->cookies->get("locale") === "zh") + if($request->cookies->get("lang") === "zh") $request->setLocale("zh"); - else if ($request->cookies->get("locale") === "en") + else if ($request->cookies->get("lang") === "en") $request->setLocale("en"); else if(strpos($request->headers->get("Accept-Language"),"zh") === false) $request->setLocale("en"); diff --git a/src/Security/OAuthAuthenticator.php b/src/Security/OAuthAuthenticator.php index 0b1b688..d2109e4 100644 --- a/src/Security/OAuthAuthenticator.php +++ b/src/Security/OAuthAuthenticator.php @@ -56,7 +56,7 @@ public function checkCredentials($credentials, UserInterface $user) public function onAuthenticationFailure(Request $request, AuthenticationException $exception) { - return new JsonResponse(array("code" => 400, "message" => "Incorrect Information"), 400); + return new JsonResponse(array("code" => 400, "message" => $exception->getMessage()), 400); } public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey) diff --git a/templates/admin/alumni/auth.html.twig b/templates/admin/alumni/auth.html.twig index 13784fb..a60311e 100644 --- a/templates/admin/alumni/auth.html.twig +++ b/templates/admin/alumni/auth.html.twig @@ -19,7 +19,7 @@ var len = (String(base || 10).length - String(this).length)+1; return len > 0? new Array(len).join(chr || '0')+this : this; }; - var d = new Date, + var d = new Date(val), dformat = [d.getFullYear(), (d.getMonth()+1).padLeft(), d.getDate().padLeft()].join('/') +' ' + diff --git a/templates/admin/media/comment.html.twig b/templates/admin/media/comment.html.twig index 0d51c3e..5d00b00 100644 --- a/templates/admin/media/comment.html.twig +++ b/templates/admin/media/comment.html.twig @@ -60,7 +60,7 @@ var len = (String(base || 10).length - String(this).length)+1; return len > 0? new Array(len).join(chr || '0')+this : this; }; - var d = new Date, + var d = new Date(val), dformat = [d.getFullYear(), (d.getMonth()+1).padLeft(), d.getDate().padLeft()].join('/') +' ' + diff --git a/templates/admin/media/gallery.html.twig b/templates/admin/media/gallery.html.twig index 059d961..e76ea68 100644 --- a/templates/admin/media/gallery.html.twig +++ b/templates/admin/media/gallery.html.twig @@ -148,7 +148,7 @@ var len = (String(base || 10).length - String(this).length)+1; return len > 0? new Array(len).join(chr || '0')+this : this; }; - var d = new Date, + var d = new Date(val), dformat = [d.getFullYear(), (d.getMonth()+1).padLeft(), d.getDate().padLeft()].join('/') +' ' + diff --git a/templates/admin/media/photo.php.twig b/templates/admin/media/photo.php.twig index 6b8ea4d..fc23016 100644 --- a/templates/admin/media/photo.php.twig +++ b/templates/admin/media/photo.php.twig @@ -135,7 +135,7 @@ var len = (String(base || 10).length - String(this).length)+1; return len > 0? new Array(len).join(chr || '0')+this : this; }; - var d = new Date, + var d = new Date(val), dformat = [d.getFullYear(), (d.getMonth()+1).padLeft(), d.getDate().padLeft()].join('/') +' ' + diff --git a/web/components/Components/App.vue b/web/components/Components/App.vue index 5fb2d53..af35d45 100644 --- a/web/components/Components/App.vue +++ b/web/components/Components/App.vue @@ -314,7 +314,7 @@ }, created: function () { document.getElementById('recaptcha').style.visibility = 'hidden'; }, mounted: function () { - this.username = this.$t('username') + this.username = this.$t('not-login') this.reload() this.initReCaptcha() this.loadWebP() diff --git a/web/components/School/Blackboard.vue b/web/components/School/Blackboard.vue index d89b8c2..91ffba2 100644 --- a/web/components/School/Blackboard.vue +++ b/web/components/School/Blackboard.vue @@ -1,6 +1,6 @@