mirror of
https://github.com/mattermost/focalboard.git
synced 2025-02-07 19:30:18 +02:00
Move invite users option to user menu
This commit is contained in:
parent
2bddb0cfc0
commit
98858f9d32
@ -23,6 +23,9 @@
|
||||
bottom: 25px;
|
||||
left: 25px;
|
||||
}
|
||||
&.bottom-right {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.hideOnWidescreen {
|
||||
|
@ -10,7 +10,7 @@ import './modal.scss'
|
||||
type Props = {
|
||||
onClose: () => void
|
||||
intl: IntlShape
|
||||
position?: 'top'|'bottom'
|
||||
position?: 'top'|'bottom'|'bottom-right'
|
||||
}
|
||||
|
||||
class Modal extends React.PureComponent<Props> {
|
||||
|
@ -3,6 +3,8 @@
|
||||
flex-direction: column;
|
||||
padding: 5px;
|
||||
color: rgb(var(--main-fg));
|
||||
font-weight: normal;
|
||||
line-height: normal;
|
||||
|
||||
> .row {
|
||||
display: flex;
|
||||
|
@ -42,7 +42,7 @@ class RegistrationLinkComponent extends React.PureComponent<Props, State> {
|
||||
|
||||
return (
|
||||
<Modal
|
||||
position='top'
|
||||
position='bottom-right'
|
||||
onClose={this.props.onClose}
|
||||
>
|
||||
<div className='RegistrationLinkComponent'>
|
||||
|
@ -284,7 +284,6 @@ class Sidebar extends React.Component<Props, State> {
|
||||
</Menu>
|
||||
</MenuWrapper>
|
||||
|
||||
<ModalWrapper>
|
||||
<MenuWrapper>
|
||||
<Button>
|
||||
<FormattedMessage
|
||||
@ -293,13 +292,6 @@ class Sidebar extends React.Component<Props, State> {
|
||||
/>
|
||||
</Button>
|
||||
<Menu position='top'>
|
||||
<Menu.Text
|
||||
id='invite'
|
||||
name={intl.formatMessage({id: 'Sidebar.invite-users', defaultMessage: 'Invite Users'})}
|
||||
onClick={async () => {
|
||||
this.setState({showRegistrationLinkDialog: true})
|
||||
}}
|
||||
/>
|
||||
<Menu.Text
|
||||
id='import'
|
||||
name={intl.formatMessage({id: 'Sidebar.import-archive', defaultMessage: 'Import archive'})}
|
||||
@ -349,14 +341,6 @@ class Sidebar extends React.Component<Props, State> {
|
||||
</Menu.SubMenu>
|
||||
</Menu>
|
||||
</MenuWrapper>
|
||||
{this.state.showRegistrationLinkDialog &&
|
||||
<RegistrationLinkComponent
|
||||
onClose={() => {
|
||||
this.setState({showRegistrationLinkDialog: false})
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</ModalWrapper>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -365,6 +349,7 @@ class Sidebar extends React.Component<Props, State> {
|
||||
const {intl} = this.props
|
||||
|
||||
return (
|
||||
<ModalWrapper>
|
||||
<MenuWrapper>
|
||||
<Button>
|
||||
{user.username}
|
||||
@ -385,8 +370,24 @@ class Sidebar extends React.Component<Props, State> {
|
||||
window.location.href = '/change_password'
|
||||
}}
|
||||
/>
|
||||
<Menu.Text
|
||||
id='invite'
|
||||
name={intl.formatMessage({id: 'Sidebar.invite-users', defaultMessage: 'Invite Users'})}
|
||||
onClick={async () => {
|
||||
this.setState({showRegistrationLinkDialog: true})
|
||||
}}
|
||||
/>
|
||||
</Menu>
|
||||
</MenuWrapper>
|
||||
|
||||
{this.state.showRegistrationLinkDialog &&
|
||||
<RegistrationLinkComponent
|
||||
onClose={() => {
|
||||
this.setState({showRegistrationLinkDialog: false})
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</ModalWrapper>
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user