summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--i18n/en.json4
-rw-r--r--webapp/components/admin_console/admin_sidebar.jsx29
-rw-r--r--webapp/components/admin_console/admin_team_members_dropdown.jsx5
-rw-r--r--webapp/components/admin_console/select_team_modal.jsx1
-rw-r--r--webapp/components/team_members_dropdown.jsx5
-rw-r--r--webapp/i18n/en.json4
6 files changed, 36 insertions, 12 deletions
diff --git a/i18n/en.json b/i18n/en.json
index d4d026d64..856a24693 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1528,6 +1528,10 @@
"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",
"translation": "Failed to get reactions when channel id in URL doesn't match post id in URL"
},
diff --git a/webapp/components/admin_console/admin_sidebar.jsx b/webapp/components/admin_console/admin_sidebar.jsx
index 2b304f11d..e8303ea0c 100644
--- a/webapp/components/admin_console/admin_sidebar.jsx
+++ b/webapp/components/admin_console/admin_sidebar.jsx
@@ -114,6 +114,19 @@ export default class AdminSidebar extends React.Component {
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() {
const addTeamTooltip = (
<Tooltip id='add-team-tooltip'>
@@ -146,18 +159,18 @@ export default class AdminSidebar extends React.Component {
renderTeams() {
const teams = [];
+ const teamsArray = [];
- for (const key in this.state.selectedTeams) {
- if (!this.state.selectedTeams.hasOwnProperty(key)) {
- continue;
+ Reflect.ownKeys(this.state.selectedTeams).forEach((key) => {
+ if (this.state.teams[key]) {
+ teamsArray.push(this.state.teams[key]);
}
+ });
- const team = this.state.teams[key];
-
- if (!team) {
- continue;
- }
+ teamsArray.sort(this.sortTeams);
+ for (let i = 0; i < teamsArray.length; i++) {
+ const team = teamsArray[i];
teams.push(
<AdminSidebarTeam
key={team.id}
diff --git a/webapp/components/admin_console/admin_team_members_dropdown.jsx b/webapp/components/admin_console/admin_team_members_dropdown.jsx
index 028effe66..253259493 100644
--- a/webapp/components/admin_console/admin_team_members_dropdown.jsx
+++ b/webapp/components/admin_console/admin_team_members_dropdown.jsx
@@ -464,7 +464,10 @@ export default class AdminTeamMembersDropdown extends React.Component {
<br/>
<FormattedMessage
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}
</div>
diff --git a/webapp/components/admin_console/select_team_modal.jsx b/webapp/components/admin_console/select_team_modal.jsx
index a661dd2f0..e407e61b4 100644
--- a/webapp/components/admin_console/select_team_modal.jsx
+++ b/webapp/components/admin_console/select_team_modal.jsx
@@ -24,6 +24,7 @@ export default class SelectTeamModal extends React.Component {
doCancel() {
this.props.onModalDismissed();
}
+
compare(a, b) {
const teamA = a.display_name.toLowerCase();
const teamB = b.display_name.toLowerCase();
diff --git a/webapp/components/team_members_dropdown.jsx b/webapp/components/team_members_dropdown.jsx
index 1ae1b8f76..b2fae4585 100644
--- a/webapp/components/team_members_dropdown.jsx
+++ b/webapp/components/team_members_dropdown.jsx
@@ -326,7 +326,10 @@ export default class TeamMembersDropdown extends React.Component {
<br/>
<FormattedMessage
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}
</div>
diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json
index 4fa66fa66..fa8fa67b9 100644
--- a/webapp/i18n/en.json
+++ b/webapp/i18n/en.json
@@ -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.confirmDemoteRoleTitle": "Confirm demotion from System Admin role",
"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.inactive": "Inactive",
"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.confirmDemoteRoleTitle": "Confirm demotion from System Admin role",
"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.leave_team": "Remove From Team",
"team_members_dropdown.makeActive": "Make Active",