diff --git a/src/components/LeftSidebar/ConversationsList/Conversation.vue b/src/components/LeftSidebar/ConversationsList/Conversation.vue
index a859a462cde..afd86719aa2 100644
--- a/src/components/LeftSidebar/ConversationsList/Conversation.vue
+++ b/src/components/LeftSidebar/ConversationsList/Conversation.vue
@@ -25,69 +25,114 @@
-
-
-
-
- {{ labelFavorite }}
-
-
-
-
-
-
- {{ t('spreed', 'Copy link') }}
-
-
-
-
-
-
-
- {{ labelRead }}
-
-
-
-
-
-
- {{ t('spreed', 'Conversation settings') }}
-
-
-
-
-
-
-
- {{ labelArchive }}
-
-
-
-
-
-
- {{ t('spreed', 'Leave conversation') }}
-
-
-
-
-
-
- {{ t('spreed', 'Delete conversation') }}
-
+
+
+
+
+
+ {{ labelFavorite }}
+
+
+
+
+
+
+ {{ t('spreed', 'Copy link') }}
+
+
+
+
+
+
+
+ {{ labelRead }}
+
+
+
+
+
+
+ {{ t('spreed', 'Notifications') }}
+
+
+
+
+
+
+ {{ t('spreed', 'Conversation settings') }}
+
+
+
+
+
+
+
+ {{ labelArchive }}
+
+
+
+
+
+
+ {{ t('spreed', 'Leave conversation') }}
+
+
+
+
+
+
+ {{ t('spreed', 'Delete conversation') }}
+
+
+
+
+
+
+
+ {{ t('spreed', 'Back') }}
+
+
+
+
+
+
+
+
+ {{ level.label }}
+
+
+
+
+
+
+
+
+ {{ t('spreed', 'Notify about calls') }}
+
+
@@ -151,22 +196,29 @@
import { toRefs, ref } from 'vue'
import { isNavigationFailure, NavigationFailureType } from 'vue-router'
+import IconAccount from 'vue-material-design-icons/Account.vue'
import IconArchive from 'vue-material-design-icons/Archive.vue'
import IconArchiveOff from 'vue-material-design-icons/ArchiveOff.vue'
+import IconArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'
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'
+import IconPhoneRing from 'vue-material-design-icons/PhoneRing.vue'
import IconStar from 'vue-material-design-icons/Star.vue'
+import IconVolumeHigh from 'vue-material-design-icons/VolumeHigh.vue'
+import IconVolumeOff from 'vue-material-design-icons/VolumeOff.vue'
import { showError } from '@nextcloud/dialogs'
import { emit } from '@nextcloud/event-bus'
import { t } from '@nextcloud/l10n'
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
+import NcActionSeparator from '@nextcloud/vue/dist/Components/NcActionSeparator.js'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcDialog from '@nextcloud/vue/dist/Components/NcDialog.js'
import NcListItem from '@nextcloud/vue/dist/Components/NcListItem.js'
@@ -180,25 +232,38 @@ import { copyConversationLinkToClipboard } from '../../../utils/handleUrl.ts'
const supportsArchive = hasTalkFeature('local', 'archived-conversations-v2')
+const notificationLevels = [
+ { value: PARTICIPANT.NOTIFY.ALWAYS, label: t('spreed', 'All messages') },
+ { value: PARTICIPANT.NOTIFY.MENTION, label: t('spreed', '@-mentions only') },
+ { value: PARTICIPANT.NOTIFY.NEVER, label: t('spreed', 'Off') },
+]
+
export default {
name: 'Conversation',
components: {
- NcButton,
ConversationIcon,
- NcActionButton,
- NcDialog,
- NcListItem,
+ IconAccount,
IconArchive,
IconArchiveOff,
+ IconArrowLeft,
IconArrowRight,
+ IconBell,
IconCog,
IconContentCopy,
IconDelete,
IconExitToApp,
- IconEyeOff,
IconEye,
+ IconEyeOff,
+ IconPhoneRing,
IconStar,
+ IconVolumeHigh,
+ IconVolumeOff,
+ NcActionButton,
+ NcActionSeparator,
+ NcButton,
+ NcDialog,
+ NcListItem,
},
props: {
@@ -219,7 +284,6 @@ export default {
type: 0,
displayName: '',
isFavorite: false,
- notificationLevel: 0,
lastMessage: {},
canDeleteConversation: false,
canLeaveConversation: false,
@@ -231,17 +295,25 @@ export default {
emits: ['click'],
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 })
+ const notificationLevel = ref(item.value.notificationLevel)
+ const notifyCalls = ref(item.value.notificationCalls === PARTICIPANT.NOTIFY_CALLS.ON)
+
return {
supportsArchive,
+ submenu,
isLeaveDialogOpen,
isDeleteDialogOpen,
counterType,
conversationInformation,
+ notificationLevels,
+ notificationLevel,
+ notifyCalls,
}
},
@@ -355,6 +427,18 @@ export default {
this.$store.dispatch('toggleArchive', this.item)
},
+ notificationLevelIcon(value) {
+ switch (value) {
+ case PARTICIPANT.NOTIFY.ALWAYS:
+ return IconVolumeHigh
+ case PARTICIPANT.NOTIFY.MENTION:
+ return IconAccount
+ case PARTICIPANT.NOTIFY.NEVER:
+ default:
+ return IconVolumeOff
+ }
+ },
+
/**
* Set the notification level for the conversation
*
@@ -365,6 +449,20 @@ export default {
token: this.item.token,
notificationLevel: level,
})
+ this.notificationLevel = level
+ },
+
+ /**
+ * Set the call notification level for the conversation
+ *
+ * @param {boolean} value Whether or not call notifications are enabled
+ */
+ async setNotificationCalls(value) {
+ await this.$store.dispatch('setNotificationCalls', {
+ token: this.item.token,
+ notificationCalls: value ? PARTICIPANT.NOTIFY_CALLS.ON : PARTICIPANT.NOTIFY_CALLS.OFF,
+ })
+ this.notifyCalls = value
},
onClick() {
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.vue b/src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.vue
index e474bc49da0..8458d12860c 100644
--- a/src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.vue
+++ b/src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.vue
@@ -67,7 +67,7 @@
@@ -753,16 +753,6 @@ export default {