Skip to content

Commit

Permalink
Merge pull request #12118 from nextcloud/backport/12109/stable29
Browse files Browse the repository at this point in the history
[stable29] fix(NewMessage): make silent chat button appearance more obvious
  • Loading branch information
nickvergessen committed Apr 16, 2024
2 parents 2a8aed3 + 1ebbeae commit 992d891
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions src/components/NewMessage/NewMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,16 @@
<!-- Send buttons -->
<template v-else>
<NcActions v-if="!broadcast" :container="container" force-menu>
<template #icon>
<BellOffIcon v-if="silentChat" :size="16" />
</template>
<NcActionButton close-after-click
:model-value="silentChat"
:name="silentSendLabel"
@click="toggleSilentChat">
{{ silentSendInfo }}
<template #icon>
<BellIcon v-if="silentChat" :size="16" />
<BellOffIcon v-else :size="16" />
<BellOffIcon :size="16" />
</template>
</NcActionButton>
</NcActions>
Expand All @@ -159,8 +162,7 @@
:aria-label="sendMessageLabel"
@click="handleSubmit">
<template #icon>
<SendVariantOutlineIcon v-if="silentChat" :size="18" />
<SendIcon v-else :size="16" />
<SendIcon :size="16" />
</template>
</NcButton>
</template>
Expand Down Expand Up @@ -190,13 +192,11 @@
<script>
import debounce from 'debounce'
import BellIcon from 'vue-material-design-icons/Bell.vue'
import BellOffIcon from 'vue-material-design-icons/BellOff.vue'
import CheckIcon from 'vue-material-design-icons/Check.vue'
import CloseIcon from 'vue-material-design-icons/Close.vue'
import EmoticonOutline from 'vue-material-design-icons/EmoticonOutline.vue'
import SendIcon from 'vue-material-design-icons/Send.vue'
import SendVariantOutlineIcon from 'vue-material-design-icons/SendVariantOutline.vue'
import { getCapabilities } from '@nextcloud/capabilities'
import { showError, showWarning } from '@nextcloud/dialogs'
Expand Down Expand Up @@ -258,13 +258,11 @@ export default {
NewMessageTypingIndicator,
Quote,
// Icons
BellIcon,
BellOffIcon,
CheckIcon,
CloseIcon,
EmoticonOutline,
SendIcon,
SendVariantOutlineIcon,
},
props: {
Expand Down Expand Up @@ -440,21 +438,13 @@ export default {
},
silentSendLabel() {
return this.silentChat
? t('spreed', 'Send with notification')
: t('spreed', 'Send without notification')
return t('spreed', 'Send without notification')
},
silentSendInfo() {
if (this.isOneToOne) {
return this.silentChat
? t('spreed', 'The participant will be notified about new messages')
: t('spreed', 'The participant will not be notified about new messages')
} else {
return this.silentChat
? t('spreed', 'Participants will be notified about new messages')
: t('spreed', 'Participants will not be notified about new messages')
}
return this.isOneToOne
? t('spreed', 'The participant will not be notified about new messages')
: t('spreed', 'Participants will not be notified about new messages')
},
showAttachmentsMenu() {
Expand Down

0 comments on commit 992d891

Please sign in to comment.