|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- const ProfilRouter = {
- template: `
- <div>
- <div class="is-hidden-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 class="column is-three-quarters is-pulled-right is-hidden-touch content-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);
- },
- };
|