mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-60834] Replace FormattedMarkdownMessage in 'webapp/channels/src/components/select_team/select_team.tsx' with FormattedMessage (#28621)
This commit is contained in:
parent
038bb6a2bb
commit
f7a7d76413
@ -48,7 +48,6 @@ function mapStateToProps(state: GlobalState) {
|
|||||||
canManageSystem: haveISystemPermission(state, {permission: Permissions.MANAGE_SYSTEM}),
|
canManageSystem: haveISystemPermission(state, {permission: Permissions.MANAGE_SYSTEM}),
|
||||||
canJoinPublicTeams: haveISystemPermission(state, {permission: Permissions.JOIN_PUBLIC_TEAMS}),
|
canJoinPublicTeams: haveISystemPermission(state, {permission: Permissions.JOIN_PUBLIC_TEAMS}),
|
||||||
canJoinPrivateTeams: haveISystemPermission(state, {permission: Permissions.JOIN_PRIVATE_TEAMS}),
|
canJoinPrivateTeams: haveISystemPermission(state, {permission: Permissions.JOIN_PRIVATE_TEAMS}),
|
||||||
siteURL: config.SiteURL,
|
|
||||||
totalTeamsCount: state.entities.teams.totalCount || 0,
|
totalTeamsCount: state.entities.teams.totalCount || 0,
|
||||||
isCloud,
|
isCloud,
|
||||||
isFreeTrial,
|
isFreeTrial,
|
||||||
|
@ -18,7 +18,6 @@ import AnnouncementBar from 'components/announcement_bar';
|
|||||||
import BackButton from 'components/common/back_button';
|
import BackButton from 'components/common/back_button';
|
||||||
import InfiniteScroll from 'components/common/infinite_scroll';
|
import InfiniteScroll from 'components/common/infinite_scroll';
|
||||||
import SiteNameAndDescription from 'components/common/site_name_and_description';
|
import SiteNameAndDescription from 'components/common/site_name_and_description';
|
||||||
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
|
|
||||||
import LoadingScreen from 'components/loading_screen';
|
import LoadingScreen from 'components/loading_screen';
|
||||||
import LearnAboutTeamsLink from 'components/main_menu/learn_about_teams_link';
|
import LearnAboutTeamsLink from 'components/main_menu/learn_about_teams_link';
|
||||||
import SystemPermissionGate from 'components/permissions_gates/system_permission_gate';
|
import SystemPermissionGate from 'components/permissions_gates/system_permission_gate';
|
||||||
@ -53,7 +52,6 @@ type Props = {
|
|||||||
canJoinPublicTeams: boolean;
|
canJoinPublicTeams: boolean;
|
||||||
canJoinPrivateTeams: boolean;
|
canJoinPrivateTeams: boolean;
|
||||||
history?: any;
|
history?: any;
|
||||||
siteURL?: string;
|
|
||||||
actions: Actions;
|
actions: Actions;
|
||||||
totalTeamsCount: number;
|
totalTeamsCount: number;
|
||||||
isCloud: boolean;
|
isCloud: boolean;
|
||||||
@ -117,7 +115,7 @@ export default class SelectTeam extends React.PureComponent<Props, State> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
handleTeamClick = async (team: Team) => {
|
handleTeamClick = async (team: Team) => {
|
||||||
const {siteURL, currentUserRoles} = this.props;
|
const {currentUserRoles} = this.props;
|
||||||
this.setState({loadingTeamId: team.id});
|
this.setState({loadingTeamId: team.id});
|
||||||
|
|
||||||
const {data, error} = await this.props.actions.addUserToTeam(team.id, this.props.currentUserId);
|
const {data, error} = await this.props.actions.addUserToTeam(team.id, this.props.currentUserId);
|
||||||
@ -129,15 +127,21 @@ export default class SelectTeam extends React.PureComponent<Props, State> {
|
|||||||
if (error.server_error_id === TEAM_MEMBERSHIP_DENIAL_ERROR_ID) {
|
if (error.server_error_id === TEAM_MEMBERSHIP_DENIAL_ERROR_ID) {
|
||||||
if (currentUserRoles !== undefined && currentUserRoles.includes(Constants.PERMISSIONS_SYSTEM_ADMIN)) {
|
if (currentUserRoles !== undefined && currentUserRoles.includes(Constants.PERMISSIONS_SYSTEM_ADMIN)) {
|
||||||
errorMsg = (
|
errorMsg = (
|
||||||
<FormattedMarkdownMessage
|
<FormattedMessage
|
||||||
id='join_team_group_constrained_denied_admin'
|
id='join_team_group_constrained_denied_adminText'
|
||||||
defaultMessage={`You need to be a member of a linked group to join this team. You can add a group to this team [here](${siteURL}/admin_console/user_management/groups).`}
|
defaultMessage={'You need to be a member of a linked group to join this team. You can add a group to this team <a>here</a>.'}
|
||||||
values={{siteURL}}
|
values={{
|
||||||
|
a: (chunks: string) => (
|
||||||
|
<Link to='/admin_console/user_management/groups'>
|
||||||
|
{chunks}
|
||||||
|
</Link>
|
||||||
|
),
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
errorMsg = (
|
errorMsg = (
|
||||||
<FormattedMarkdownMessage
|
<FormattedMessage
|
||||||
id='join_team_group_constrained_denied'
|
id='join_team_group_constrained_denied'
|
||||||
defaultMessage='You need to be a member of a linked group to join this team.'
|
defaultMessage='You need to be a member of a linked group to join this team.'
|
||||||
/>
|
/>
|
||||||
|
@ -4106,7 +4106,7 @@
|
|||||||
"invite.members.user-is-not-guest": "This person is already a member of the workspace. Invite them as a member instead of a guest.",
|
"invite.members.user-is-not-guest": "This person is already a member of the workspace. Invite them as a member instead of a guest.",
|
||||||
"invite.rate-limit-exceeded": "Invite emails rate limit exceeded.",
|
"invite.rate-limit-exceeded": "Invite emails rate limit exceeded.",
|
||||||
"join_team_group_constrained_denied": "You need to be a member of a linked group to join this team.",
|
"join_team_group_constrained_denied": "You need to be a member of a linked group to join this team.",
|
||||||
"join_team_group_constrained_denied_admin": "You need to be a member of a linked group to join this team. You can add a group to this team [here]({siteURL}/admin_console/user_management/groups).",
|
"join_team_group_constrained_denied_adminText": "You need to be a member of a linked group to join this team. You can add a group to this team <a>here</a>.",
|
||||||
"joinChannel.JoinButton": "Join",
|
"joinChannel.JoinButton": "Join",
|
||||||
"joinChannel.joiningButton": "Joining...",
|
"joinChannel.joiningButton": "Joining...",
|
||||||
"katex.error": "Couldn't compile your Latex code. Please review the syntax and try again.",
|
"katex.error": "Couldn't compile your Latex code. Please review the syntax and try again.",
|
||||||
|
Loading…
Reference in New Issue
Block a user