om/public/routes/profil.js

45 lines
1.3 KiB
JavaScript
Raw Normal View History

2018-12-12 14:31:54 +01:00
const ProfilRouter = {
template: `
<div>
<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-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>
</div>
</div>`,
2018-12-12 14:31:54 +01:00
data: function () {
2019-04-16 21:21:35 +02:00
return {
isAuth: false,
isLPVisible: false,
2019-06-18 14:18:20 +02:00
};
2018-12-12 14:31:54 +01: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
};