PLT-5021 Order System Console Teams section by Display Name (#4831)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
f96173528f
Коммит
98d96f5457
@@ -1527,6 +1527,10 @@
|
|||||||
"id": "api.reaction.delete_reaction.mismatched_channel_id.app_error",
|
"id": "api.reaction.delete_reaction.mismatched_channel_id.app_error",
|
||||||
"translation": "Failed to delete reaction when channel id in URL doesn't match post id in URL"
|
"translation": "Failed to delete reaction when channel id in URL doesn't match post id in URL"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "api.reaction.init.debug",
|
||||||
|
"translation": "Initializing reactions api routes"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "api.reaction.list_reactions.mismatched_channel_id.app_error",
|
"id": "api.reaction.list_reactions.mismatched_channel_id.app_error",
|
||||||
"translation": "Failed to get reactions when channel id in URL doesn't match post id in URL"
|
"translation": "Failed to get reactions when channel id in URL doesn't match post id in URL"
|
||||||
|
|||||||
@@ -114,6 +114,19 @@ export default class AdminSidebar extends React.Component {
|
|||||||
document.title = Utils.localizeMessage('sidebar_right_menu.console', 'System Console') + ' - ' + currentSiteName;
|
document.title = Utils.localizeMessage('sidebar_right_menu.console', 'System Console') + ' - ' + currentSiteName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sortTeams(a, b) {
|
||||||
|
const teamA = a.display_name.toLowerCase();
|
||||||
|
const teamB = b.display_name.toLowerCase();
|
||||||
|
|
||||||
|
if (teamA < teamB) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (teamA > teamB) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
renderAddTeamButton() {
|
renderAddTeamButton() {
|
||||||
const addTeamTooltip = (
|
const addTeamTooltip = (
|
||||||
<Tooltip id='add-team-tooltip'>
|
<Tooltip id='add-team-tooltip'>
|
||||||
@@ -146,18 +159,18 @@ export default class AdminSidebar extends React.Component {
|
|||||||
|
|
||||||
renderTeams() {
|
renderTeams() {
|
||||||
const teams = [];
|
const teams = [];
|
||||||
|
const teamsArray = [];
|
||||||
|
|
||||||
for (const key in this.state.selectedTeams) {
|
Reflect.ownKeys(this.state.selectedTeams).forEach((key) => {
|
||||||
if (!this.state.selectedTeams.hasOwnProperty(key)) {
|
if (this.state.teams[key]) {
|
||||||
continue;
|
teamsArray.push(this.state.teams[key]);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const team = this.state.teams[key];
|
teamsArray.sort(this.sortTeams);
|
||||||
|
|
||||||
if (!team) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
for (let i = 0; i < teamsArray.length; i++) {
|
||||||
|
const team = teamsArray[i];
|
||||||
teams.push(
|
teams.push(
|
||||||
<AdminSidebarTeam
|
<AdminSidebarTeam
|
||||||
key={team.id}
|
key={team.id}
|
||||||
|
|||||||
@@ -464,7 +464,10 @@ export default class AdminTeamMembersDropdown extends React.Component {
|
|||||||
<br/>
|
<br/>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='admin.user_item.confirmDemotionCmd'
|
id='admin.user_item.confirmDemotionCmd'
|
||||||
defaultMessage='platform -assign_role -team_name="yourteam" -email="name@yourcompany.com" -role="system_admin"'
|
defaultMessage='platform roles system_admin {username}'
|
||||||
|
values={{
|
||||||
|
username: me.username
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
{serverError}
|
{serverError}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export default class SelectTeamModal extends React.Component {
|
|||||||
doCancel() {
|
doCancel() {
|
||||||
this.props.onModalDismissed();
|
this.props.onModalDismissed();
|
||||||
}
|
}
|
||||||
|
|
||||||
compare(a, b) {
|
compare(a, b) {
|
||||||
const teamA = a.display_name.toLowerCase();
|
const teamA = a.display_name.toLowerCase();
|
||||||
const teamB = b.display_name.toLowerCase();
|
const teamB = b.display_name.toLowerCase();
|
||||||
|
|||||||
@@ -326,7 +326,10 @@ export default class TeamMembersDropdown extends React.Component {
|
|||||||
<br/>
|
<br/>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='team_members_dropdown.confirmDemotionCmd'
|
id='team_members_dropdown.confirmDemotionCmd'
|
||||||
defaultMessage='platform -assign_role -team_name="yourteam" -email="name@yourcompany.com" -role="system_admin"'
|
defaultMessage='platform roles system_admin {username}'
|
||||||
|
vallues={{
|
||||||
|
username: me.username
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
{serverError}
|
{serverError}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -857,7 +857,7 @@
|
|||||||
"admin.user_item.confirmDemoteDescription": "If you demote yourself from the System Admin role and there is not another user with System Admin privileges, you'll need to re-assign a System Admin by accessing the Mattermost server through a terminal and running the following command.",
|
"admin.user_item.confirmDemoteDescription": "If you demote yourself from the System Admin role and there is not another user with System Admin privileges, you'll need to re-assign a System Admin by accessing the Mattermost server through a terminal and running the following command.",
|
||||||
"admin.user_item.confirmDemoteRoleTitle": "Confirm demotion from System Admin role",
|
"admin.user_item.confirmDemoteRoleTitle": "Confirm demotion from System Admin role",
|
||||||
"admin.user_item.confirmDemotion": "Confirm Demotion",
|
"admin.user_item.confirmDemotion": "Confirm Demotion",
|
||||||
"admin.user_item.confirmDemotionCmd": "platform -assign_role -team_name=\"yourteam\" -email=\"name@yourcompany.com\" -role=\"system_admin\"",
|
"admin.user_item.confirmDemotionCmd": "platform roles system_admin {username}",
|
||||||
"admin.user_item.emailTitle": "<strong>Email:</strong> {email}",
|
"admin.user_item.emailTitle": "<strong>Email:</strong> {email}",
|
||||||
"admin.user_item.inactive": "Inactive",
|
"admin.user_item.inactive": "Inactive",
|
||||||
"admin.user_item.makeActive": "Make Active",
|
"admin.user_item.makeActive": "Make Active",
|
||||||
@@ -1839,7 +1839,7 @@
|
|||||||
"team_members_dropdown.confirmDemoteDescription": "If you demote yourself from the System Admin role and there is not another user with System Admin privileges, you'll need to re-assign a System Admin by accessing the Mattermost server through a terminal and running the following command.",
|
"team_members_dropdown.confirmDemoteDescription": "If you demote yourself from the System Admin role and there is not another user with System Admin privileges, you'll need to re-assign a System Admin by accessing the Mattermost server through a terminal and running the following command.",
|
||||||
"team_members_dropdown.confirmDemoteRoleTitle": "Confirm demotion from System Admin role",
|
"team_members_dropdown.confirmDemoteRoleTitle": "Confirm demotion from System Admin role",
|
||||||
"team_members_dropdown.confirmDemotion": "Confirm Demotion",
|
"team_members_dropdown.confirmDemotion": "Confirm Demotion",
|
||||||
"team_members_dropdown.confirmDemotionCmd": "platform -assign_role -team_name=\"yourteam\" -email=\"name@yourcompany.com\" -role=\"system_admin\"",
|
"team_members_dropdown.confirmDemotionCmd": "platform roles system_admin {username}",
|
||||||
"team_members_dropdown.inactive": "Inactive",
|
"team_members_dropdown.inactive": "Inactive",
|
||||||
"team_members_dropdown.leave_team": "Remove From Team",
|
"team_members_dropdown.leave_team": "Remove From Team",
|
||||||
"team_members_dropdown.makeActive": "Make Active",
|
"team_members_dropdown.makeActive": "Make Active",
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user