diff --git a/webapp/channels/src/components/reset_status_modal/__snapshots__/reset_status_modal.test.tsx.snap b/webapp/channels/src/components/reset_status_modal/__snapshots__/reset_status_modal.test.tsx.snap index 85ff2ebfff..2ac7cce4b6 100644 --- a/webapp/channels/src/components/reset_status_modal/__snapshots__/reset_status_modal.test.tsx.snap +++ b/webapp/channels/src/components/reset_status_modal/__snapshots__/reset_status_modal.test.tsx.snap @@ -12,7 +12,7 @@ exports[`components/ResetStatusModal should match snapshot 1`] = ` confirmButtonClass="btn btn-primary" confirmButtonText={ } @@ -43,13 +43,13 @@ exports[`components/ResetStatusModal should match snapshot, render modal for OOF confirmButtonClass="btn btn-primary" confirmButtonText={ } message={ } diff --git a/webapp/channels/src/components/reset_status_modal/reset_status_modal.tsx b/webapp/channels/src/components/reset_status_modal/reset_status_modal.tsx index b43ddbd0aa..47f2138601 100644 --- a/webapp/channels/src/components/reset_status_modal/reset_status_modal.tsx +++ b/webapp/channels/src/components/reset_status_modal/reset_status_modal.tsx @@ -19,15 +19,15 @@ const messages: Record> = { away: defineMessages({ auto_responder_message: { id: 'modal.manual_status.auto_responder.message_away', - defaultMessage: 'Would you like to switch your status to "Away" and disable Automatic Replies?', + defaultMessage: 'Would you like to switch your status to "Away" and disable automatic replies?', }, button: { id: 'modal.manual_status.button_away', - defaultMessage: 'Yes, set my status to "Away"', + defaultMessage: 'Set status to "Away"', }, cancel: { id: 'modal.manual_status.cancel_away', - defaultMessage: 'No, keep it as "Away"', + defaultMessage: 'Stay as "Away"', }, message: { id: 'modal.manual_status.message_away', @@ -35,43 +35,43 @@ const messages: Record> = { }, title: { id: 'modal.manual_status.title_away', - defaultMessage: 'Your Status is Set to "Away"', + defaultMessage: 'Your status is set to "Away"', }, }), dnd: defineMessages({ auto_responder_message: { id: 'modal.manual_status.auto_responder.message_dnd', - defaultMessage: 'Would you like to switch your status to "Do Not Disturb" and disable Automatic Replies?', + defaultMessage: 'Would you like to switch your status to "Do not disturb" and disable automatic replies?', }, button: { id: 'modal.manual_status.button_dnd', - defaultMessage: 'Yes, set my status to "Do Not Disturb"', + defaultMessage: 'Set status to "Do not disturb"', }, cancel: { id: 'modal.manual_status.cancel_dnd', - defaultMessage: 'No, keep it as "Do Not Disturb"', + defaultMessage: 'Stay as "Do not disturb"', }, message: { id: 'modal.manual_status.message_dnd', - defaultMessage: 'Would you like to switch your status to "Do Not Disturb"?', + defaultMessage: 'Would you like to switch your status to "Do not disturb"?', }, title: { id: 'modal.manual_status.title_dnd', - defaultMessage: 'Your Status is Set to "Do Not Disturb"', + defaultMessage: 'Your status is set to "Do not disturb"', }, }), offline: defineMessages({ auto_responder_message: { id: 'modal.manual_status.auto_responder.message_offline', - defaultMessage: 'Would you like to switch your status to "Offline" and disable Automatic Replies?', + defaultMessage: 'Would you like to switch your status to "Offline" and disable automatic replies?', }, button: { id: 'modal.manual_status.button_offline', - defaultMessage: 'Yes, set my status to "Offline"', + defaultMessage: 'Set status to "Offline"', }, cancel: { id: 'modal.manual_status.cancel_offline', - defaultMessage: 'No, keep it as "Offline"', + defaultMessage: 'Stay "Offline"', }, message: { id: 'modal.manual_status.message_offline', @@ -79,17 +79,17 @@ const messages: Record> = { }, title: { id: 'modal.manual_status.title_offline', - defaultMessage: 'Your Status is Set to "Offline"', + defaultMessage: 'Your status is set to "Offline"', }, }), online: defineMessages({ auto_responder_message: { id: 'modal.manual_status.auto_responder.message_online', - defaultMessage: 'Would you like to switch your status to "Online" and disable Automatic Replies?', + defaultMessage: 'Would you like to switch your status to "Online" and disable automatic replies?', }, button: { id: 'modal.manual_status.button_online', - defaultMessage: 'Yes, set my status to "Online"', + defaultMessage: 'Set status to "Online"', }, message: { id: 'modal.manual_status.message_online', @@ -99,11 +99,11 @@ const messages: Record> = { ooo: defineMessages({ cancel: { id: 'modal.manual_status.cancel_ooo', - defaultMessage: 'No, keep it as "Out of Office"', + defaultMessage: 'Stay "Out of office"', }, title: { id: 'modal.manual_status.title_ooo', - defaultMessage: 'Your Status is Set to "Out of Office"', + defaultMessage: 'Your status is set to "Out of office"', }, }), }; diff --git a/webapp/channels/src/components/status_dropdown/__snapshots__/status_dropdown.test.tsx.snap b/webapp/channels/src/components/status_dropdown/__snapshots__/status_dropdown.test.tsx.snap index e4d793f5db..203d60e8db 100644 --- a/webapp/channels/src/components/status_dropdown/__snapshots__/status_dropdown.test.tsx.snap +++ b/webapp/channels/src/components/status_dropdown/__snapshots__/status_dropdown.test.tsx.snap @@ -62,7 +62,18 @@ exports[`components/StatusDropdown should match snapshot in default state 1`] = + } onClick={[Function]} + rightDecorator={ + + } show={false} text="Out of office" /> @@ -309,7 +320,18 @@ exports[`components/StatusDropdown should match snapshot with custom status and + } onClick={[Function]} + rightDecorator={ + + } show={false} text="Out of office" /> @@ -625,7 +647,18 @@ exports[`components/StatusDropdown should match snapshot with custom status enab + } onClick={[Function]} + rightDecorator={ + + } show={false} text="Out of office" /> @@ -904,7 +937,18 @@ exports[`components/StatusDropdown should match snapshot with custom status expi + } onClick={[Function]} + rightDecorator={ + + } show={false} text="Out of office" /> @@ -1183,7 +1227,18 @@ exports[`components/StatusDropdown should match snapshot with custom status puls + } onClick={[Function]} + rightDecorator={ + + } show={false} text="Out of office" /> @@ -1471,7 +1526,18 @@ exports[`components/StatusDropdown should match snapshot with profile picture UR + } onClick={[Function]} + rightDecorator={ + + } show={false} text="Out of office" /> @@ -1718,7 +1784,18 @@ exports[`components/StatusDropdown should match snapshot with status dropdown op + } onClick={[Function]} + rightDecorator={ + + } show={false} text="Out of office" /> @@ -1965,7 +2042,18 @@ exports[`components/StatusDropdown should not show clear status button when cust + } onClick={[Function]} + rightDecorator={ + + } show={false} text="Out of office" /> @@ -2244,7 +2332,18 @@ exports[`components/StatusDropdown should show clear status button when custom s + } onClick={[Function]} + rightDecorator={ + + } show={false} text="Out of office" /> diff --git a/webapp/channels/src/components/status_dropdown/status_dropdown.tsx b/webapp/channels/src/components/status_dropdown/status_dropdown.tsx index f3f406d888..529e406824 100644 --- a/webapp/channels/src/components/status_dropdown/status_dropdown.tsx +++ b/webapp/channels/src/components/status_dropdown/status_dropdown.tsx @@ -11,7 +11,7 @@ import type {IntlShape, MessageDescriptor} from 'react-intl'; import StatusIcon from '@mattermost/compass-components/components/status-icon'; // eslint-disable-line no-restricted-imports import Text from '@mattermost/compass-components/components/text'; // eslint-disable-line no-restricted-imports import type {TUserStatus} from '@mattermost/compass-components/shared'; // eslint-disable-line no-restricted-imports -import {AccountOutlineIcon, CheckIcon, ExitToAppIcon} from '@mattermost/compass-icons/components'; +import {AccountOutlineIcon, CancelIcon, CheckIcon, ExitToAppIcon} from '@mattermost/compass-icons/components'; import {PulsatingDot} from '@mattermost/components'; import type {PreferenceType} from '@mattermost/types/preferences'; import {CustomStatusDuration} from '@mattermost/types/users'; @@ -585,10 +585,16 @@ export class StatusDropdown extends React.PureComponent { null} + onClick={setOnline} ariaLabel={this.props.intl.formatMessage(statusDropdownMessages.ooo.name)} text={this.props.intl.formatMessage(statusDropdownMessages.ooo.name)} + icon={( + + )} extraText={this.props.intl.formatMessage(statusDropdownMessages.ooo.extra)} + rightDecorator={selectedIndicator} /> {customStatusComponent} diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json index e8dd4213ca..6c07079a00 100644 --- a/webapp/channels/src/i18n/en.json +++ b/webapp/channels/src/i18n/en.json @@ -4179,26 +4179,26 @@ "mobile.set_status.offline.icon": "Offline Icon", "mobile.set_status.online.icon": "Online Icon", "modal.manual_status.ask": "Do not ask me again", - "modal.manual_status.auto_responder.message_away": "Would you like to switch your status to \"Away\" and disable Automatic Replies?", - "modal.manual_status.auto_responder.message_dnd": "Would you like to switch your status to \"Do Not Disturb\" and disable Automatic Replies?", - "modal.manual_status.auto_responder.message_offline": "Would you like to switch your status to \"Offline\" and disable Automatic Replies?", - "modal.manual_status.auto_responder.message_online": "Would you like to switch your status to \"Online\" and disable Automatic Replies?", - "modal.manual_status.button_away": "Yes, set my status to \"Away\"", - "modal.manual_status.button_dnd": "Yes, set my status to \"Do Not Disturb\"", - "modal.manual_status.button_offline": "Yes, set my status to \"Offline\"", - "modal.manual_status.button_online": "Yes, set my status to \"Online\"", - "modal.manual_status.cancel_away": "No, keep it as \"Away\"", - "modal.manual_status.cancel_dnd": "No, keep it as \"Do Not Disturb\"", - "modal.manual_status.cancel_offline": "No, keep it as \"Offline\"", - "modal.manual_status.cancel_ooo": "No, keep it as \"Out of Office\"", + "modal.manual_status.auto_responder.message_away": "Would you like to switch your status to \"Away\" and disable automatic replies?", + "modal.manual_status.auto_responder.message_dnd": "Would you like to switch your status to \"Do not disturb\" and disable automatic replies?", + "modal.manual_status.auto_responder.message_offline": "Would you like to switch your status to \"Offline\" and disable automatic replies?", + "modal.manual_status.auto_responder.message_online": "Would you like to switch your status to \"Online\" and disable automatic replies?", + "modal.manual_status.button_away": "Set status to \"Away\"", + "modal.manual_status.button_dnd": "Set status to \"Do not disturb\"", + "modal.manual_status.button_offline": "Set status to \"Offline\"", + "modal.manual_status.button_online": "Set status to \"Online\"", + "modal.manual_status.cancel_away": "Stay as \"Away\"", + "modal.manual_status.cancel_dnd": "Stay as \"Do not disturb\"", + "modal.manual_status.cancel_offline": "Stay \"Offline\"", + "modal.manual_status.cancel_ooo": "Stay \"Out of office\"", "modal.manual_status.message_away": "Would you like to switch your status to \"Away\"?", - "modal.manual_status.message_dnd": "Would you like to switch your status to \"Do Not Disturb\"?", + "modal.manual_status.message_dnd": "Would you like to switch your status to \"Do not disturb\"?", "modal.manual_status.message_offline": "Would you like to switch your status to \"Offline\"?", "modal.manual_status.message_online": "Would you like to switch your status to \"Online\"?", - "modal.manual_status.title_away": "Your Status is Set to \"Away\"", - "modal.manual_status.title_dnd": "Your Status is Set to \"Do Not Disturb\"", - "modal.manual_status.title_offline": "Your Status is Set to \"Offline\"", - "modal.manual_status.title_ooo": "Your Status is Set to \"Out of Office\"", + "modal.manual_status.title_away": "Your status is set to \"Away\"", + "modal.manual_status.title_dnd": "Your status is set to \"Do not disturb\"", + "modal.manual_status.title_offline": "Your status is set to \"Offline\"", + "modal.manual_status.title_ooo": "Your status is set to \"Out of office\"", "more_channels.channel_purpose": "Channel Information: Membership Indicator: Joined, Member count {memberCount} , Purpose: {channelPurpose}", "more_channels.count": "{count} Results", "more_channels.count_one": "1 Result",