diff --git a/website/client/components/userMenu/inbox.vue b/website/client/components/userMenu/inbox.vue index 58428090c7..e903868cc6 100644 --- a/website/client/components/userMenu/inbox.vue +++ b/website/client/components/userMenu/inbox.vue @@ -23,7 +23,7 @@ .empty-messages.text-center(v-if='filtersConversations.length === 0') .svg-icon.envelope(v-html="icons.messageIcon") h4(v-once) {{$t('emptyMessagesLine1')}} - p(v-once) {{$t('emptyMessagesLine2')}} + p(v-if="!user.flags.chatRevoked") {{$t('emptyMessagesLine2')}} .conversations(v-if='filtersConversations.length > 0') .conversation(v-for='conversation in filtersConversations', @click='selectConversation(conversation.key)', :class="{active: selectedConversation.key === conversation.key}") @@ -34,15 +34,15 @@ .col-8.messages .empty-messages.text-center(v-if='activeChat.length === 0 && !selectedConversation.key') .svg-icon.envelope(v-html="icons.messageIcon") - h4(v-once) Nothing Here Yet - p(v-once) Select a conversation on the left + h4 {{placeholderTexts.title}} + p(v-html="placeholderTexts.description") .empty-messages.text-center(v-if='activeChat.length === 0 && selectedConversation.key') p {{ $t('beginningOfConversation', {userName: selectedConversation.name})}} chat-message.message-scroll(:chat.sync='activeChat', :inbox='true', ref="chatscroll") // @TODO: Implement new message header here when we fix the above - .new-message-row(v-if='selectedConversation.key') + .new-message-row(v-if='selectedConversation.key && !user.flags.chatRevoked') textarea(v-model='newMessage') button.btn.btn-secondary(@click='sendPrivateMessage()') Send @@ -275,6 +275,18 @@ export default { return conversation.name.toLowerCase().indexOf(this.search.toLowerCase()) !== -1; }); }, + placeholderTexts () { + if (this.user.flags.chatRevoked) { + return { + title: this.$t('PMPlaceholderTitleRevoked'), + description: this.$t('PMPlaceholderDescriptionRevoked'), + }; + } + return { + title: this.$t('PMPlaceholderTitle'), + description: this.$t('PMPlaceholderDescription'), + }; + }, }, methods: { toggleClick () { diff --git a/website/common/locales/en/groups.json b/website/common/locales/en/groups.json index 42f77bbc20..2e1ef1f810 100644 --- a/website/common/locales/en/groups.json +++ b/website/common/locales/en/groups.json @@ -133,6 +133,10 @@ "clearAll": "Delete All Messages", "confirmDeleteAllMessages": "Are you sure you want to delete all messages in your inbox? Other users will still see messages you have sent to them.", "optOutPopover": "Don't like private messages? Click to completely opt out", + "PMPlaceholderTitle": "Nothing Here Yet", + "PMPlaceholderDescription": "Select a conversation on the left", + "PMPlaceholderTitleRevoked": "Your chat privileges have been revoked", + "PMPlaceholderDescriptionRevoked": "You are not able to send private messages because your chat privileges have been revoked. If you have questions or concerns about this, please email admin@habitica.com to discuss it with the staff.", "block": "Block", "unblock": "Un-block", "pm-reply": "Send a reply",