1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- 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);
- },
- };
|