From 630c3c4de4362e1fc850b98c12485cb24807eca7 Mon Sep 17 00:00:00 2001 From: "Grigorii K. Shartsev" Date: Tue, 18 Feb 2025 13:40:20 +0100 Subject: [PATCH] fix(conversations): remove Delete conversation from quick actions menu Signed-off-by: Grigorii K. Shartsev --- .../ConversationsList/Conversation.vue | 60 +------------------ 1 file changed, 3 insertions(+), 57 deletions(-) diff --git a/src/components/LeftSidebar/ConversationsList/Conversation.vue b/src/components/LeftSidebar/ConversationsList/Conversation.vue index fd895956450..3aeb112365f 100644 --- a/src/components/LeftSidebar/ConversationsList/Conversation.vue +++ b/src/components/LeftSidebar/ConversationsList/Conversation.vue @@ -105,17 +105,6 @@ {{ t('spreed', 'Leave conversation') }} - - - - {{ t('spreed', 'Delete conversation') }} - - - @@ -222,7 +197,6 @@ import IconArrowRight from 'vue-material-design-icons/ArrowRight.vue' import IconBell from 'vue-material-design-icons/Bell.vue' import IconCog from 'vue-material-design-icons/Cog.vue' import IconContentCopy from 'vue-material-design-icons/ContentCopy.vue' -import IconDelete from 'vue-material-design-icons/Delete.vue' import IconExitToApp from 'vue-material-design-icons/ExitToApp.vue' import IconEye from 'vue-material-design-icons/Eye.vue' import IconEyeOff from 'vue-material-design-icons/EyeOff.vue' @@ -270,7 +244,6 @@ export default { IconBell, IconCog, IconContentCopy, - IconDelete, IconExitToApp, IconEye, IconEyeOff, @@ -324,7 +297,6 @@ export default { setup(props) { const submenu = ref(null) const isLeaveDialogOpen = ref(false) - const isDeleteDialogOpen = ref(false) const { item, isSearchResult } = toRefs(props) const { counterType, conversationInformation } = useConversationInfo({ item, isSearchResult }) @@ -333,7 +305,6 @@ export default { supportsArchive, submenu, isLeaveDialogOpen, - isDeleteDialogOpen, counterType, conversationInformation, notificationLevels, @@ -367,13 +338,6 @@ export default { }) }, - dialogDeleteMessage() { - return t('spreed', 'Do you really want to delete "{displayName}"?', this.item, undefined, { - escape: false, - sanitize: false, - }) - }, - to() { return this.item?.token ? { name: 'conversation', params: { token: this.item.token } } @@ -428,24 +392,6 @@ export default { emit('show-conversation-settings', { token: this.item.token }) }, - /** - * Deletes the conversation. - */ - async deleteConversation() { - try { - this.isDeleteDialogOpen = false - if (this.isActive) { - await this.$store.dispatch('leaveConversation', { token: this.item.token }) - await this.$router.push({ name: 'root' }) - .catch((failure) => !isNavigationFailure(failure, NavigationFailureType.duplicated) && Promise.reject(failure)) - } - await this.$store.dispatch('deleteConversationFromServer', { token: this.item.token }) - } catch (error) { - console.error(`Error while deleting conversation ${error}`) - showError(t('spreed', 'Error while deleting conversation')) - } - }, - /** * Deletes the current user from the conversation. */