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

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. const ProfilRouter = {
  2. template: `
  3. <div>
  4. <div v-if="isAuthentified">
  5. <ProfilCard
  6. v-for="(profil, index) in profilcard"
  7. :key="profil.id"
  8. :profil="profil"
  9. ></ProfilCard>
  10. <b-button type="button" class="btn btn-primary" data-dismiss="modal" v-on:click="logOut()">Logout</b-button>
  11. </div>
  12. <div v-else-if="!isAuthentified">
  13. <button class="button is-primary is-medium"
  14. @click="showLoginModal = true">
  15. Login
  16. </button>
  17. <b-modal :active.sync="showLoginModal" has-modal-card>
  18. <login-panel></login-panel>
  19. </b-modal>
  20. </div>
  21. </div>`,
  22. data: function () {
  23. return {
  24. showLoginModal: false,
  25. isAuthentified: false,
  26. profilcard: _profilcard,
  27. };
  28. },
  29. };
  30. /*
  31. $('#myModal').on('show.bs.modal', function (event) {
  32. console.log("Modal Opened")
  33. var button = $(event.relatedTarget) // Button that triggered the modal
  34. var recipient = button.data('whatever') // Extract info from data-* attributes
  35. // If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
  36. // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
  37. var modal = $(this)
  38. modal.find('.modal-title').text('New message to ' + recipient)
  39. modal.find('.modal-body input').val(recipient)
  40. })
  41. */