logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git

global_notice_list.vue (1169B)


  1. <template>
  2. <div class="global-notice-list">
  3. <div
  4. v-for="(notice, index) in notices"
  5. :key="index"
  6. class="alert global-notice"
  7. :class="{ [notice.level]: true }"
  8. >
  9. <div class="notice-message">
  10. {{ $t(notice.messageKey, notice.messageArgs) }}
  11. </div>
  12. <button
  13. class="button-unstyled close-notice"
  14. @click="closeNotice(notice)"
  15. >
  16. <FAIcon
  17. class="fa-scale-110 fa-old-padding"
  18. icon="times"
  19. />
  20. </button>
  21. </div>
  22. </div>
  23. </template>
  24. <script src="./global_notice_list.js"></script>
  25. <style lang="scss">
  26. .global-notice-list {
  27. position: fixed;
  28. top: calc(var(--navbar-height) + 0.5em);
  29. width: 100%;
  30. pointer-events: none;
  31. z-index: var(--ZI_modals_popovers);
  32. display: flex;
  33. flex-direction: column;
  34. align-items: center;
  35. .global-notice {
  36. pointer-events: auto;
  37. text-align: center;
  38. width: 40em;
  39. max-width: calc(100% - 3em);
  40. display: flex;
  41. padding-left: 1.5em;
  42. line-height: 2;
  43. margin-bottom: 0.5em;
  44. .notice-message {
  45. flex: 1 1 100%;
  46. }
  47. }
  48. .close-notice {
  49. padding-right: 0.2em;
  50. }
  51. }
  52. </style>