Skip to content

Commit

Permalink
feat(Login): add toasts
Browse files Browse the repository at this point in the history
  • Loading branch information
jkklapp committed May 31, 2022
1 parent 57f6395 commit ead342f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"moment": "^2.29.3",
"vue": "^3.2.13",
"vue-router": "^4.0.15",
"vue-toast-notification": "^3.0",
"vuex": "^4.0.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default {
this.$router.replace({ name: 'Dashboard' });
})
.catch((err) => {
this.error = err.message;
this.$root.$toast.error(err.message);
console.log(err);
});
},
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import store from './store';
import router from './routes/index';
import './index.css';
import { getAuth } from './auth';
import VueToast from 'vue-toast-notification';
import 'vue-toast-notification/dist/theme-default.css';

const firebaseConfig = {
apiKey: 'AIzaSyDzBNz_bMRHUTxdrhc4LCf4UMzTIyyRB5s',
Expand All @@ -30,4 +32,5 @@ getAuth().onAuthStateChanged((user) => {
const app = createApp(App);
app.use(store);
app.use(router);
app.use(VueToast);
app.mount('#app');
5 changes: 5 additions & 0 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8790,6 +8790,11 @@ vue-template-es2015-compiler@^1.9.0:
resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825"
integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==

vue-toast-notification@^3.0:
version "3.0.4"
resolved "https://registry.yarnpkg.com/vue-toast-notification/-/vue-toast-notification-3.0.4.tgz#dfd6ff37daa99be18f13c3e56dc0074fe3f3cdbe"
integrity sha512-rEhLtcKg8SVdBpdN7PrNst5nmY8dw0j3NkNImqurhlGurqR/QDKoou0t2PuCReEOCTKqHvfLCle2I3kwQWDWDQ==

vue@^3.2.13:
version "3.2.36"
resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.36.tgz#8daa996e2ced521708de97d066c7c998e8bc3378"
Expand Down

0 comments on commit ead342f

Please sign in to comment.