|
123456789101112131415161718192021222324252627282930313233343536373839404142 |
- const ProfilRouter = {
- template: `
- <div>
- <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>`,
- 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);
- },
- };
|