diff --git a/src/components/LeftSidebar/ConversationsList/Conversation.vue b/src/components/LeftSidebar/ConversationsList/Conversation.vue index e34360c7138..093a1babc12 100644 --- a/src/components/LeftSidebar/ConversationsList/Conversation.vue +++ b/src/components/LeftSidebar/ConversationsList/Conversation.vue @@ -82,6 +82,11 @@ + + {{ labelArchive }} + @@ -137,6 +142,7 @@ export default { type: 0, displayName: '', isFavorite: false, + isArchived: false, notificationLevel: 0, lastMessage: {}, } @@ -164,6 +170,14 @@ export default { return this.item.isFavorite ? t('spreed', 'Remove from favorites') : t('spreed', 'Add to favorites') }, + iconArchive() { + return this.item.isArchived ? 'icon-star-dark' : 'icon-starred' + }, + + labelArchive() { + return this.item.isArchived ? t('spreed', 'Remove from archive') : t('spreed', 'Archive conversation') + }, + isNotifyAlways() { return this.item.notificationLevel === PARTICIPANT.NOTIFY.ALWAYS }, @@ -345,6 +359,9 @@ export default { } } }, + async toggleArchiveConversation() { + this.$store.dispatch('toggleArchive', this.item) + }, async toggleFavoriteConversation() { this.$store.dispatch('toggleFavorite', this.item) }, diff --git a/src/components/LeftSidebar/LeftSidebar.vue b/src/components/LeftSidebar/LeftSidebar.vue index eab11fc755e..3610e4de422 100644 --- a/src/components/LeftSidebar/LeftSidebar.vue +++ b/src/components/LeftSidebar/LeftSidebar.vue @@ -31,6 +31,10 @@ @abort-search="abortSearch" /> +