logo

pleroma-fe

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

announcements_page.vue (1912B)


  1. <template>
  2. <div class="panel panel-default announcements-page">
  3. <div class="panel-heading">
  4. <span>
  5. {{ $t('announcements.page_header') }}
  6. </span>
  7. </div>
  8. <div class="panel-body">
  9. <section
  10. v-if="canPostAnnouncement"
  11. >
  12. <div class="post-form">
  13. <div class="heading">
  14. <h4>{{ $t('announcements.post_form_header') }}</h4>
  15. </div>
  16. <div class="body">
  17. <announcement-editor
  18. :announcement="newAnnouncement"
  19. :disabled="posting"
  20. />
  21. </div>
  22. <div class="footer">
  23. <button
  24. class="btn button-default post-button"
  25. :disabled="posting"
  26. @click.prevent="postAnnouncement"
  27. >
  28. {{ $t('announcements.post_action') }}
  29. </button>
  30. <div
  31. v-if="error"
  32. class="alert error"
  33. >
  34. {{ $t('announcements.post_error', { error }) }}
  35. <button
  36. class="button-unstyled"
  37. @click="clearError"
  38. >
  39. <FAIcon
  40. class="fa-scale-110 fa-old-padding"
  41. icon="times"
  42. :title="$t('announcements.close_error')"
  43. />
  44. </button>
  45. </div>
  46. </div>
  47. </div>
  48. </section>
  49. <section
  50. v-for="announcement in announcements"
  51. :key="announcement.id"
  52. >
  53. <announcement
  54. :announcement="announcement"
  55. />
  56. </section>
  57. </div>
  58. </div>
  59. </template>
  60. <script src="./announcements_page.js"></script>
  61. <style lang="scss">
  62. .announcements-page {
  63. .post-form {
  64. padding: var(--status-margin);
  65. .heading,
  66. .body {
  67. margin-bottom: var(--status-margin);
  68. }
  69. .post-button {
  70. min-width: 10em;
  71. }
  72. }
  73. }
  74. </style>