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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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" @click="isModalActive = true">
  14. Login
  15. </button>
  16. <!--<login-panel v-if="showLoginModal" @clicked="closeModal" ></login-panel>-->
  17. <b-modal :active.sync="showLoginModal" has-modal-card>
  18. <login-panel v-bind="formProps"></login-panel>
  19. </b-modal>
  20. </div>
  21. </div>`,
  22. data: function () {
  23. return {
  24. isModalActive: false,
  25. profilcard: _profilcard,
  26. };
  27. },
  28. methods: {
  29. checkAuthentication (value) {
  30. this.showLoginModal = value;
  31. this.isAuthentified = !this.isAuthentified;
  32. },
  33. },
  34. };
  35. /*
  36. $('#myModal').on('show.bs.modal', function (event) {
  37. console.log("Modal Opened")
  38. var button = $(event.relatedTarget) // Button that triggered the modal
  39. var recipient = button.data('whatever') // Extract info from data-* attributes
  40. // If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
  41. // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
  42. var modal = $(this)
  43. modal.find('.modal-title').text('New message to ' + recipient)
  44. modal.find('.modal-body input').val(recipient)
  45. })
  46. */