2018-12-12 14:31:54 +01:00
|
|
|
const ProfilRouter = {
|
|
|
|
template: `
|
2019-07-19 23:12:38 +02:00
|
|
|
<div>
|
2019-07-22 18:51:02 +02:00
|
|
|
<div class="column pull-right-sm is-four-fifths-desktop">
|
2019-07-23 17:22:01 +02:00
|
|
|
<div v-if="isAuth">
|
|
|
|
<profil-card></profil-card>
|
|
|
|
</div>
|
|
|
|
<div v-else>
|
|
|
|
<button class="button is-primary is-medium"
|
|
|
|
@click="isLPVisible = true">
|
|
|
|
Login
|
|
|
|
</button>
|
2019-07-21 15:20:32 +02:00
|
|
|
|
2019-07-23 17:22:01 +02:00
|
|
|
<b-modal :active.sync="isLPVisible"
|
|
|
|
@close-login-panel="closeLoginPanel"
|
|
|
|
@show-login-panel="showLoginPanel"
|
|
|
|
has-modal-card>
|
|
|
|
<login-panel></login-panel>
|
|
|
|
</b-modal>
|
|
|
|
</div>
|
2019-07-21 15:20:32 +02:00
|
|
|
</div>
|
2019-07-19 23:12:38 +02:00
|
|
|
</div>`,
|
2018-12-12 14:31:54 +01:00
|
|
|
data: function () {
|
2019-04-16 21:21:35 +02:00
|
|
|
return {
|
2019-07-19 23:12:38 +02:00
|
|
|
isAuth: false,
|
|
|
|
isLPVisible: false,
|
2019-06-18 14:18:20 +02:00
|
|
|
};
|
2018-12-12 14:31:54 +01:00
|
|
|
},
|
2019-07-19 23:12:38 +02:00
|
|
|
methods: {
|
|
|
|
closeLoginPanel: function() {
|
|
|
|
this.isLPVisible = false;
|
|
|
|
},
|
|
|
|
showLoginPanel: function() {
|
|
|
|
this.isLPVisible = true;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created: function() {
|
|
|
|
//console.info(auth);
|
|
|
|
},
|
|
|
|
beforeMount: function() {
|
|
|
|
this.isAuth = (auth != null && auth.mail != '');
|
|
|
|
//console.info('beforeMount: '+this.isAuth);
|
|
|
|
},
|
2018-12-12 14:31:54 +01:00
|
|
|
};
|