logo

pleroma-fe

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

extra_notifications.vue (2739B)


  1. <template>
  2. <div class="ExtraNotifications">
  3. <div
  4. v-if="shouldShowChats"
  5. class="notification unseen"
  6. >
  7. <div class="notification-overlay" />
  8. <router-link
  9. class="button-unstyled -link extra-notification"
  10. :to="{ name: 'chats', params: { username: currentUser.screen_name } }"
  11. >
  12. <FAIcon
  13. fixed-width
  14. class="fa-scale-110 icon"
  15. icon="comments"
  16. />
  17. {{ $tc('notifications.unread_chats', unreadChatCount, { num: unreadChatCount }) }}
  18. </router-link>
  19. </div>
  20. <div
  21. v-if="shouldShowAnnouncements"
  22. class="notification unseen"
  23. >
  24. <div class="notification-overlay" />
  25. <router-link
  26. class="button-unstyled -link extra-notification"
  27. :to="{ name: 'announcements' }"
  28. >
  29. <FAIcon
  30. fixed-width
  31. class="fa-scale-110 icon"
  32. icon="bullhorn"
  33. />
  34. {{ $tc('notifications.unread_announcements', unreadAnnouncementCount, { num: unreadAnnouncementCount }) }}
  35. </router-link>
  36. </div>
  37. <div
  38. v-if="shouldShowFollowRequests"
  39. class="notification unseen"
  40. >
  41. <div class="notification-overlay" />
  42. <router-link
  43. class="button-unstyled -link extra-notification"
  44. :to="{ name: 'friend-requests' }"
  45. >
  46. <FAIcon
  47. fixed-width
  48. class="fa-scale-110 icon"
  49. icon="user-plus"
  50. />
  51. {{ $tc('notifications.unread_follow_requests', followRequestCount, { num: followRequestCount }) }}
  52. </router-link>
  53. </div>
  54. <i18n-t
  55. v-if="shouldShowCustomizationTip"
  56. tag="span"
  57. class="notification tip extra-notification"
  58. keypath="notifications.configuration_tip"
  59. >
  60. <template #theSettings>
  61. <button
  62. class="button-unstyled -link"
  63. @click="openNotificationSettings"
  64. >
  65. {{ $t('notifications.configuration_tip_settings') }}
  66. </button>
  67. </template>
  68. <template #dismiss>
  69. <button
  70. class="button-unstyled -link"
  71. @click="dismissConfigurationTip"
  72. >
  73. {{ $t('notifications.configuration_tip_dismiss') }}
  74. </button>
  75. </template>
  76. </i18n-t>
  77. </div>
  78. </template>
  79. <script src="./extra_notifications.js" />
  80. <style lang="scss">
  81. .ExtraNotifications {
  82. width: 100%;
  83. display: flex;
  84. flex-direction: column;
  85. align-items: stretch;
  86. .notification {
  87. width: 100%;
  88. border-bottom: 1px solid;
  89. border-color: var(--border);
  90. display: flex;
  91. flex-direction: column;
  92. align-items: stretch;
  93. }
  94. .extra-notification {
  95. padding: 1em;
  96. }
  97. .icon {
  98. margin-right: 0.5em;
  99. }
  100. .tip {
  101. display: inline;
  102. }
  103. }
  104. </style>