announcements (#42)

Reviewed-on: https://akkoma.dev/AkkomaGang/pleroma-fe/pulls/42
This commit is contained in:
floatingghost 2022-07-18 13:08:50 +00:00
parent 2977edc04d
commit fab72940c4
58 changed files with 1514 additions and 175 deletions

View file

@ -13,7 +13,8 @@ import {
faBell,
faInfoCircle,
faStream,
faList
faList,
faBullhorn
} from '@fortawesome/free-solid-svg-icons'
library.add(
@ -27,7 +28,8 @@ library.add(
faBell,
faInfoCircle,
faStream,
faList
faList,
faBullhorn
)
const NavPanel = {
@ -57,7 +59,7 @@ const NavPanel = {
federating: state => state.instance.federating,
pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable
}),
...mapGetters(['unreadChatCount'])
...mapGetters(['unreadChatCount', 'unreadAnnouncementCount'])
}
}

View file

@ -97,6 +97,24 @@
/>{{ $t("nav.about") }}
</router-link>
</li>
<li v-if="currentUser">
<router-link
class="menu-item"
:to="{ name: 'announcements' }"
>
<FAIcon
fixed-width
class="fa-scale-110"
icon="bullhorn"
/>{{ $t('nav.announcements') }}
<span
v-if="unreadAnnouncementCount > 0"
class="badge badge-notification"
>
{{ unreadAnnouncementCount }}
</span>
</router-link>
</li>
</ul>
</div>
</div>