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.3KB

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