diff --git a/src/components/Account.vue b/src/components/Account.vue
new file mode 100644
index 0000000..6e6c4be
--- /dev/null
+++ b/src/components/Account.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/MesComptes.vue b/src/components/MesComptes.vue
index e98149b..6b1919b 100644
--- a/src/components/MesComptes.vue
+++ b/src/components/MesComptes.vue
@@ -22,7 +22,7 @@
{{account.name}}
- Voir
+ Voir
Supprimer
diff --git a/src/components/SocialLogin.vue b/src/components/SocialLogin.vue
index 8fd4aab..d2cd97b 100644
--- a/src/components/SocialLogin.vue
+++ b/src/components/SocialLogin.vue
@@ -20,11 +20,12 @@ export default {
.signIn()
.then(GoogleUser => {
return logWithGoogle(GoogleUser.getAuthResponse().id_token).then(data => {
+ console.log( GoogleUser.getBasicProfile())
let userInfoMapped = {
nosComptesId: data.id,
- googleId: GoogleUser.wa,
- firstName: GoogleUser.mt.Re,
- email: data.email,
+ googleId: GoogleUser.getBasicProfile().getId(),
+ firstName: GoogleUser.getBasicProfile().getGivenName(),
+ email: GoogleUser.getBasicProfile().getEmail(),
oauth_token: GoogleUser.getAuthResponse().id_token,
}
this.$store.commit('setLoginUser', userInfoMapped)
diff --git a/src/config/google_oAuth.js b/src/config/google_oAuth.js
index 8e5c569..c271d35 100644
--- a/src/config/google_oAuth.js
+++ b/src/config/google_oAuth.js
@@ -25,7 +25,6 @@ var googleAuth = (function () {
})
})
}
-
function Auth () {
if (!(this instanceof Auth))
return new Auth()
@@ -38,7 +37,9 @@ var googleAuth = (function () {
console.warn('isLoaded() will be deprecated. You can use "this.$gAuth.isInit"')
return !!this.GoogleAuth
}
-
+ this.currentUser = () => {
+ return this.GoogleAuth.currentUser;
+ }
this.load = (config, prompt) => {
installClient()
.then(() => {
@@ -143,4 +144,4 @@ var googleAuth = (function () {
Vue.gAuth.load(GoogleAuthConfig, prompt)
}
- export default installGoogleAuthPlugin
\ No newline at end of file
+ export default installGoogleAuthPlugin
diff --git a/src/router/router.js b/src/router/router.js
index a12004b..577e373 100644
--- a/src/router/router.js
+++ b/src/router/router.js
@@ -3,6 +3,8 @@ import Router from 'vue-router'
import Home from '@/views/Home'
import Login from '@/views/Login'
import store from "../store/store";
+import MesComptes from "@/components/MesComptes";
+import Account from "@/components/Account"
Vue.use(Router)
let baseRoutes = [
@@ -10,17 +12,19 @@ let baseRoutes = [
path: '/',
name: 'Home',
component: Home,
- },
- {
- path: '/home',
- name: 'Home',
- component: Home,
+ children: [{
+ path: "accounts",
+ component: MesComptes,
+ }, {
+ path: 'account/:accountId',
+ component: Account,
+ }]
},
{
path: '/login',
name: 'Login',
component: Login
- }
+ },
]
const router = new Router({
diff --git a/src/views/Home.vue b/src/views/Home.vue
index d2f7e75..7a400ce 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -4,7 +4,7 @@
- Mes comptes
+ Mes comptes
Nos comptes
@@ -20,13 +20,12 @@
-
+