Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

profil.js 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. const ProfilRouter = {
  2. template: `
  3. <div>
  4. <div v-if="isAuth">
  5. <profil-card></profil-card>
  6. </div>
  7. <div v-else>
  8. <button class="button is-primary is-medium"
  9. @click="isLPVisible = true">
  10. Login
  11. </button>
  12. <b-modal :active.sync="isLPVisible"
  13. @close-login-panel="closeLoginPanel"
  14. @show-login-panel="showLoginPanel"
  15. has-modal-card>
  16. <login-panel></login-panel>
  17. </b-modal>
  18. </div>
  19. </div>`,
  20. data: function () {
  21. return {
  22. isAuth: false,
  23. isLPVisible: false,
  24. };
  25. },
  26. methods: {
  27. closeLoginPanel: function() {
  28. this.isLPVisible = false;
  29. },
  30. showLoginPanel: function() {
  31. this.isLPVisible = true;
  32. },
  33. },
  34. created: function() {
  35. //console.info(auth);
  36. },
  37. beforeMount: function() {
  38. this.isAuth = (auth != null && auth.mail != '');
  39. //console.info('beforeMount: '+this.isAuth);
  40. },
  41. };