MM-46697 Fix out of office alignment on user menu and update confirmation modal button text (#28040)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a2a54af338
Коммит
eb5c746a24
@@ -12,7 +12,7 @@ exports[`components/ResetStatusModal should match snapshot 1`] = `
|
||||
confirmButtonClass="btn btn-primary"
|
||||
confirmButtonText={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Yes, set my status to \\"Online\\""
|
||||
defaultMessage="Set status to \\"Online\\""
|
||||
id="modal.manual_status.button_online"
|
||||
/>
|
||||
}
|
||||
@@ -43,13 +43,13 @@ exports[`components/ResetStatusModal should match snapshot, render modal for OOF
|
||||
confirmButtonClass="btn btn-primary"
|
||||
confirmButtonText={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Yes, set my status to \\"Online\\""
|
||||
defaultMessage="Set status to \\"Online\\""
|
||||
id="modal.manual_status.button_online"
|
||||
/>
|
||||
}
|
||||
message={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
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?"
|
||||
id="modal.manual_status.auto_responder.message_online"
|
||||
/>
|
||||
}
|
||||
|
||||
@@ -19,15 +19,15 @@ const messages: Record<string, Record<string, MessageDescriptor>> = {
|
||||
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<string, Record<string, MessageDescriptor>> = {
|
||||
},
|
||||
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<string, Record<string, MessageDescriptor>> = {
|
||||
},
|
||||
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<string, Record<string, MessageDescriptor>> = {
|
||||
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"',
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
@@ -62,7 +62,18 @@ exports[`components/StatusDropdown should match snapshot in default state 1`] =
|
||||
<MenuItemAction
|
||||
ariaLabel="Out of office"
|
||||
extraText="Automatic Replies are enabled"
|
||||
icon={
|
||||
<CancelIcon
|
||||
color="rgba(var(--center-channel-color-rgb), 0.56)"
|
||||
/>
|
||||
}
|
||||
onClick={[Function]}
|
||||
rightDecorator={
|
||||
<CheckIcon
|
||||
color="var(--button-bg)"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
show={false}
|
||||
text="Out of office"
|
||||
/>
|
||||
@@ -309,7 +320,18 @@ exports[`components/StatusDropdown should match snapshot with custom status and
|
||||
<MenuItemAction
|
||||
ariaLabel="Out of office"
|
||||
extraText="Automatic Replies are enabled"
|
||||
icon={
|
||||
<CancelIcon
|
||||
color="rgba(var(--center-channel-color-rgb), 0.56)"
|
||||
/>
|
||||
}
|
||||
onClick={[Function]}
|
||||
rightDecorator={
|
||||
<CheckIcon
|
||||
color="var(--button-bg)"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
show={false}
|
||||
text="Out of office"
|
||||
/>
|
||||
@@ -625,7 +647,18 @@ exports[`components/StatusDropdown should match snapshot with custom status enab
|
||||
<MenuItemAction
|
||||
ariaLabel="Out of office"
|
||||
extraText="Automatic Replies are enabled"
|
||||
icon={
|
||||
<CancelIcon
|
||||
color="rgba(var(--center-channel-color-rgb), 0.56)"
|
||||
/>
|
||||
}
|
||||
onClick={[Function]}
|
||||
rightDecorator={
|
||||
<CheckIcon
|
||||
color="var(--button-bg)"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
show={false}
|
||||
text="Out of office"
|
||||
/>
|
||||
@@ -904,7 +937,18 @@ exports[`components/StatusDropdown should match snapshot with custom status expi
|
||||
<MenuItemAction
|
||||
ariaLabel="Out of office"
|
||||
extraText="Automatic Replies are enabled"
|
||||
icon={
|
||||
<CancelIcon
|
||||
color="rgba(var(--center-channel-color-rgb), 0.56)"
|
||||
/>
|
||||
}
|
||||
onClick={[Function]}
|
||||
rightDecorator={
|
||||
<CheckIcon
|
||||
color="var(--button-bg)"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
show={false}
|
||||
text="Out of office"
|
||||
/>
|
||||
@@ -1183,7 +1227,18 @@ exports[`components/StatusDropdown should match snapshot with custom status puls
|
||||
<MenuItemAction
|
||||
ariaLabel="Out of office"
|
||||
extraText="Automatic Replies are enabled"
|
||||
icon={
|
||||
<CancelIcon
|
||||
color="rgba(var(--center-channel-color-rgb), 0.56)"
|
||||
/>
|
||||
}
|
||||
onClick={[Function]}
|
||||
rightDecorator={
|
||||
<CheckIcon
|
||||
color="var(--button-bg)"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
show={false}
|
||||
text="Out of office"
|
||||
/>
|
||||
@@ -1471,7 +1526,18 @@ exports[`components/StatusDropdown should match snapshot with profile picture UR
|
||||
<MenuItemAction
|
||||
ariaLabel="Out of office"
|
||||
extraText="Automatic Replies are enabled"
|
||||
icon={
|
||||
<CancelIcon
|
||||
color="rgba(var(--center-channel-color-rgb), 0.56)"
|
||||
/>
|
||||
}
|
||||
onClick={[Function]}
|
||||
rightDecorator={
|
||||
<CheckIcon
|
||||
color="var(--button-bg)"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
show={false}
|
||||
text="Out of office"
|
||||
/>
|
||||
@@ -1718,7 +1784,18 @@ exports[`components/StatusDropdown should match snapshot with status dropdown op
|
||||
<MenuItemAction
|
||||
ariaLabel="Out of office"
|
||||
extraText="Automatic Replies are enabled"
|
||||
icon={
|
||||
<CancelIcon
|
||||
color="rgba(var(--center-channel-color-rgb), 0.56)"
|
||||
/>
|
||||
}
|
||||
onClick={[Function]}
|
||||
rightDecorator={
|
||||
<CheckIcon
|
||||
color="var(--button-bg)"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
show={false}
|
||||
text="Out of office"
|
||||
/>
|
||||
@@ -1965,7 +2042,18 @@ exports[`components/StatusDropdown should not show clear status button when cust
|
||||
<MenuItemAction
|
||||
ariaLabel="Out of office"
|
||||
extraText="Automatic Replies are enabled"
|
||||
icon={
|
||||
<CancelIcon
|
||||
color="rgba(var(--center-channel-color-rgb), 0.56)"
|
||||
/>
|
||||
}
|
||||
onClick={[Function]}
|
||||
rightDecorator={
|
||||
<CheckIcon
|
||||
color="var(--button-bg)"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
show={false}
|
||||
text="Out of office"
|
||||
/>
|
||||
@@ -2244,7 +2332,18 @@ exports[`components/StatusDropdown should show clear status button when custom s
|
||||
<MenuItemAction
|
||||
ariaLabel="Out of office"
|
||||
extraText="Automatic Replies are enabled"
|
||||
icon={
|
||||
<CancelIcon
|
||||
color="rgba(var(--center-channel-color-rgb), 0.56)"
|
||||
/>
|
||||
}
|
||||
onClick={[Function]}
|
||||
rightDecorator={
|
||||
<CheckIcon
|
||||
color="var(--button-bg)"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
show={false}
|
||||
text="Out of office"
|
||||
/>
|
||||
|
||||
@@ -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<Props, State> {
|
||||
<Menu.Group>
|
||||
<Menu.ItemAction
|
||||
show={this.isUserOutOfOffice()}
|
||||
onClick={() => null}
|
||||
onClick={setOnline}
|
||||
ariaLabel={this.props.intl.formatMessage(statusDropdownMessages.ooo.name)}
|
||||
text={this.props.intl.formatMessage(statusDropdownMessages.ooo.name)}
|
||||
icon={(
|
||||
<CancelIcon
|
||||
color={'rgba(var(--center-channel-color-rgb), 0.56)'}
|
||||
/>
|
||||
)}
|
||||
extraText={this.props.intl.formatMessage(statusDropdownMessages.ooo.extra)}
|
||||
rightDecorator={selectedIndicator}
|
||||
/>
|
||||
</Menu.Group>
|
||||
{customStatusComponent}
|
||||
|
||||
@@ -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",
|
||||
|
||||
Ссылка в новой задаче
Block a user