45 lines
1.3 KiB
JavaScript
45 lines
1.3 KiB
JavaScript
const ProfilRouter = {
|
|
template: `
|
|
<div>
|
|
<div class="column pull-right-sm is-four-fifths-desktop">
|
|
<div v-if="isAuth">
|
|
<profil-card></profil-card>
|
|
</div>
|
|
<div v-else>
|
|
<button class="button is-primary is-medium"
|
|
@click="isLPVisible = true">
|
|
Login
|
|
</button>
|
|
|
|
<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>`,
|
|
data: function () {
|
|
return {
|
|
isAuth: false,
|
|
isLPVisible: false,
|
|
};
|
|
},
|
|
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);
|
|
},
|
|
};
|