Add drafts to side drawer

This commit is contained in:
tusooa 2023-03-10 20:26:13 -05:00
parent 19b5bb06a0
commit 39b42da724
No known key found for this signature in database
GPG Key ID: 42AEC43D48433C51
2 changed files with 25 additions and 3 deletions

View File

@ -17,7 +17,8 @@ import {
faCog,
faInfoCircle,
faCompass,
faList
faList,
faFilePen
} from '@fortawesome/free-solid-svg-icons'
library.add(
@ -33,7 +34,8 @@ library.add(
faCog,
faInfoCircle,
faCompass,
faList
faList,
faFilePen
)
const SideDrawer = {
@ -98,7 +100,7 @@ const SideDrawer = {
pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable,
supportsAnnouncements: state => state.announcements.supportsAnnouncements
}),
...mapGetters(['unreadChatCount', 'unreadAnnouncementCount'])
...mapGetters(['unreadChatCount', 'unreadAnnouncementCount', 'draftCount'])
},
methods: {
toggleDrawer () {

View File

@ -211,6 +211,26 @@
</span>
</router-link>
</li>
<li
v-if="currentUser"
@click="toggleDrawer"
>
<router-link
:to="{ name: 'drafts' }"
>
<FAIcon
fixed-width
class="fa-scale-110 fa-old-padding"
icon="file-pen"
/> {{ $t('nav.drafts') }}
<span
v-if="draftCount"
class="badge badge-notification"
>
{{ draftCount }}
</span>
</router-link>
</li>
<li
v-if="currentUser"
@click="toggleDrawer"