MM-61721 - adjust scheduled messages channels legend (#29254)
* MM-61721 - adjust scheduled messages channels legend * consider the thread section of the schmsgs feature
Этот коммит содержится в:
@@ -34,7 +34,8 @@ export default function ScheduledPostIndicator({location, channelId, postId, rem
|
||||
// else, get those for the channel.
|
||||
// Fetch scheduled posts for the thread when opening a thread, and fetch for channel
|
||||
// when opening from center channel.
|
||||
const id = location === Locations.RHS_COMMENT ? postId : channelId;
|
||||
const isThread = location === Locations.RHS_COMMENT;
|
||||
const id = isThread ? postId : channelId;
|
||||
const scheduledPostData = useSelector((state: GlobalState) => showChannelOrThreadScheduledPostIndicator(state, id));
|
||||
|
||||
const currentTeamName = useSelector((state: GlobalState) => getCurrentTeam(state)?.name);
|
||||
@@ -77,10 +78,18 @@ export default function ScheduledPostIndicator({location, channelId, postId, rem
|
||||
|
||||
// display scheduled post count if there are more than one scheduled post
|
||||
if (scheduledPostData.count > 1) {
|
||||
scheduledPostText = (
|
||||
scheduledPostText = isThread ? (
|
||||
<FormattedMessage
|
||||
id='scheduled_post.channel_indicator.multiple'
|
||||
defaultMessage='You have {count} scheduled messages.'
|
||||
id='scheduled_post.channel_indicator.multiple_in_thread'
|
||||
defaultMessage='{count} scheduled messages in thread.'
|
||||
values={{
|
||||
count: scheduledPostData.count,
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<FormattedMessage
|
||||
id='scheduled_post.channel_indicator.multiple_in_channel'
|
||||
defaultMessage='{count} scheduled messages in channel.'
|
||||
values={{
|
||||
count: scheduledPostData.count,
|
||||
}}
|
||||
@@ -98,7 +107,7 @@ export default function ScheduledPostIndicator({location, channelId, postId, rem
|
||||
<Link to={scheduledPostLinkURL}>
|
||||
<FormattedMessage
|
||||
id='scheduled_post.channel_indicator.link_to_scheduled_posts.text'
|
||||
defaultMessage='See all scheduled messages'
|
||||
defaultMessage='See all.'
|
||||
/>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -4869,8 +4869,9 @@
|
||||
"scheduled_post.action.edit": "Edit scheduled post",
|
||||
"scheduled_post.action.reschedule": "Reschedule post",
|
||||
"scheduled_post.action.send_now": "Send now",
|
||||
"scheduled_post.channel_indicator.link_to_scheduled_posts.text": "See all scheduled messages",
|
||||
"scheduled_post.channel_indicator.multiple": "You have {count} scheduled messages.",
|
||||
"scheduled_post.channel_indicator.link_to_scheduled_posts.text": "See all.",
|
||||
"scheduled_post.channel_indicator.multiple_in_channel": "{count} scheduled messages in channel.",
|
||||
"scheduled_post.channel_indicator.multiple_in_thread": "{count} scheduled messages in thread.",
|
||||
"scheduled_post.channel_indicator.single": "Message scheduled for {dateTime}.",
|
||||
"scheduled_post.channel_indicator.with_other_user_late_time": "You have {count, plural, =1 {one} other {#}} <a>scheduled {count, plural, =1 {message} other {messages}}</a>.",
|
||||
"scheduled_post.delete_modal.body": "Are you sure you want to delete this scheduled post to <strong>{displayName}</strong>?",
|
||||
|
||||
Ссылка в новой задаче
Block a user