diff --git a/app/Infrastructure/Http/Controllers/GoogleController.php b/app/Infrastructure/Http/Controllers/GoogleController.php index 2f419f3..6f15e8d 100644 --- a/app/Infrastructure/Http/Controllers/GoogleController.php +++ b/app/Infrastructure/Http/Controllers/GoogleController.php @@ -29,7 +29,9 @@ class GoogleController extends Controller } catch (ModelNotFoundException) { return redirect() ->route("login") - ->with("error", __("User does not exist.")); + ->withErrors([ + "oauth" => __("User does not exist."), + ]); } $auth->guard()->login($user, true); diff --git a/package-lock.json b/package-lock.json index 7795438..958999c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,8 @@ "vue": "^3.2.26", "vue-echarts": "^6.0.2", "vue-flatpickr-component": "^9.0.5", - "vue-loader": "^17.0.0" + "vue-loader": "^17.0.0", + "vue-toastification": "^2.0.0-rc.5" }, "devDependencies": { "eslint": "^8.6.0", @@ -8943,6 +8944,14 @@ "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=" }, + "node_modules/vue-toastification": { + "version": "2.0.0-rc.5", + "resolved": "https://registry.npmjs.org/vue-toastification/-/vue-toastification-2.0.0-rc.5.tgz", + "integrity": "sha512-q73e5jy6gucEO/U+P48hqX+/qyXDozAGmaGgLFm5tXX4wJBcVsnGp4e/iJqlm9xzHETYOilUuwOUje2Qg1JdwA==", + "peerDependencies": { + "vue": "^3.0.2" + } + }, "node_modules/watchpack": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", @@ -16100,6 +16109,12 @@ } } }, + "vue-toastification": { + "version": "2.0.0-rc.5", + "resolved": "https://registry.npmjs.org/vue-toastification/-/vue-toastification-2.0.0-rc.5.tgz", + "integrity": "sha512-q73e5jy6gucEO/U+P48hqX+/qyXDozAGmaGgLFm5tXX4wJBcVsnGp4e/iJqlm9xzHETYOilUuwOUje2Qg1JdwA==", + "requires": {} + }, "watchpack": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", diff --git a/package.json b/package.json index c69812f..9588eff 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,8 @@ "vue": "^3.2.26", "vue-echarts": "^6.0.2", "vue-flatpickr-component": "^9.0.5", - "vue-loader": "^17.0.0" + "vue-loader": "^17.0.0", + "vue-toastification": "^2.0.0-rc.5" }, "devDependencies": { "eslint": "^8.6.0", diff --git a/resources/css/app.css b/resources/css/app.css index 350af46..3c5c746 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -1,4 +1,5 @@ @import 'flatpickr/dist/themes/light.css'; +@import 'vue-toastification/dist/index.css'; @tailwind base; @tailwind components; diff --git a/resources/js/Pages/Login.vue b/resources/js/Pages/Login.vue index b379630..e73c659 100644 --- a/resources/js/Pages/Login.vue +++ b/resources/js/Pages/Login.vue @@ -1,5 +1,41 @@