PLT-6695 - Mobile web view: Add "Create Team" option to main menu (#6524)
* PLT-6695 - Mobile web view: Add "Create Team" option to main menu * change to isSystemAdmin
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
613a873611
Коммит
dc5e7b805c
@@ -173,6 +173,7 @@ export default class SidebarRightMenu extends React.Component {
|
||||
let joinAnotherTeamLink;
|
||||
let isAdmin = false;
|
||||
let isSystemAdmin = false;
|
||||
let createTeam = null;
|
||||
|
||||
if (currentUser != null) {
|
||||
isAdmin = TeamStore.isTeamAdminForCurrentTeam() || UserStore.isSystemAdminForCurrentUser();
|
||||
@@ -264,6 +265,25 @@ export default class SidebarRightMenu extends React.Component {
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
if (global.window.mm_config.EnableTeamCreation === 'true' || isSystemAdmin) {
|
||||
createTeam = (
|
||||
<li key='newTeam_li'>
|
||||
<Link
|
||||
id='createTeam'
|
||||
key='newTeam_a'
|
||||
to='/create_team'
|
||||
onClick={this.handleClick}
|
||||
>
|
||||
<i className='icon fa fa-plus-square'/>
|
||||
<FormattedMessage
|
||||
id='navbar_dropdown.create'
|
||||
defaultMessage='Create a New Team'
|
||||
/>
|
||||
</Link>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
manageLink = (
|
||||
@@ -410,7 +430,7 @@ export default class SidebarRightMenu extends React.Component {
|
||||
}
|
||||
|
||||
let teamDivider = null;
|
||||
if (teamSettingsLink || manageLink || joinAnotherTeamLink) {
|
||||
if (teamSettingsLink || manageLink || joinAnotherTeamLink || createTeam) {
|
||||
teamDivider = <li className='divider'/>;
|
||||
}
|
||||
|
||||
@@ -480,6 +500,7 @@ export default class SidebarRightMenu extends React.Component {
|
||||
{teamDivider}
|
||||
{teamSettingsLink}
|
||||
{manageLink}
|
||||
{createTeam}
|
||||
{joinAnotherTeamLink}
|
||||
{consoleDivider}
|
||||
{consoleLink}
|
||||
|
||||
Ссылка в новой задаче
Block a user