Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 59b5cdc

Browse files
committed
Finishing auth
1 parent eac7a44 commit 59b5cdc

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

‎src/components/Shared/Alert.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<template>
2+
<v-alert error dismissible @input="onClose" :value="true">
3+
{{ text }}
4+
</v-alert>
5+
</template>
6+
7+
<script>
8+
export default {
9+
props: ['text'],
10+
methods: {
11+
onClose () {
12+
this.$emit('dismissed')
13+
}
14+
}
15+
}
16+
</script>

‎src/main.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ import App from './App'
66
import * as firebase from 'firebase'
77
import router from './router'
88
import { store } from './store'
9+
import AlertCmp from './components/Shared/Alert.vue'
910

1011
Vue.use(Vuetify)
1112
Vue.config.productionTip = false
1213

14+
Vue.component('app-alert', AlertCmp)
1315
/* eslint-disable no-new */
1416
new Vue({
1517
el: '#app',
@@ -25,5 +27,10 @@ new Vue({
2527
projectId: '',
2628
storageBucket: ''
2729
})
30+
firebase.auth().onAuthStateChanged((user) => {
31+
if (user) {
32+
this.$store.dispatch('autoSignIn', user)
33+
}
34+
})
2835
}
2936
})

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /