diff --git a/website/client/src/pages/private-messages/index.vue b/website/client/src/pages/private-messages/index.vue index 55e64db352e..b0f9b3c58b3 100644 --- a/website/client/src/pages/private-messages/index.vue +++ b/website/client/src/pages/private-messages/index.vue @@ -361,6 +361,8 @@ $background: $white; align-items: center; justify-content: center; height: 44px; + + color: $yellow-1; background: $yellow-500; width: 100%; @@ -581,7 +583,6 @@ const UI_STATES = Object.freeze({ NO_CONVERSATIONS_SELECTED: 'NO_CONVERSATIONS_SELECTED', START_NEW_CONVERSATION: 'START_NEW_CONVERSATION', CONVERSATION_SELECTED: 'CONVERSATION_SELECTED', - DISABLED: 'DISABLED', }); export default defineComponent({ @@ -750,9 +751,7 @@ export default defineComponent({ description: this.$t('PMPlaceholderDescription'), }; }, - /** - * Any value return, switches the uiState to DISABLED - */ + disabledTexts () { if (this.user.flags.chatRevoked) { return { @@ -763,15 +762,6 @@ export default defineComponent({ }; } - if (this.user.inbox.optOut) { - return { - enableInput: true, - showBottomInfo: false, - title: this.$t('PMDisabledCaptionTitle'), - description: this.$t('PMDisabledCaptionText'), - }; - } - if (this.selectedConversation?.key) { if (this.user.inbox.blocks.includes(this.selectedConversation.key)) { return { @@ -792,6 +782,15 @@ export default defineComponent({ } } + if (this.user.inbox.optOut) { + return { + enableInput: true, + showBottomInfo: false, + title: this.$t('PMDisabledCaptionTitle'), + description: this.$t('PMDisabledCaptionText'), + }; + } + return null; }, optTextSet () { @@ -813,13 +812,12 @@ export default defineComponent({ return ''; }, newMessageDisabled () { - if (this.uiState === UI_STATES.DISABLED) { + if (this.disabledTexts) { return !this.disabledTexts.enableInput; } return [ UI_STATES.NO_CONVERSATIONS_SELECTED, - UI_STATES.DISABLED, UI_STATES.NO_CONVERSATIONS, UI_STATES.LOADING, ].includes(this.uiState); @@ -829,10 +827,6 @@ export default defineComponent({ return UI_STATES.LOADING; } - if (this.disabledTexts) { - return UI_STATES.DISABLED; - } - if (this.loadedConversations.length === 0) { return UI_STATES.NO_CONVERSATIONS; } @@ -855,8 +849,7 @@ export default defineComponent({ switch (currentUiState) { case UI_STATES.CONVERSATION_SELECTED: - case UI_STATES.START_NEW_CONVERSATION: - case UI_STATES.DISABLED: { + case UI_STATES.START_NEW_CONVERSATION: { return true; }