-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'max-user-in-pm' into 'master'
Feat: modal for max user in pm See merge request kchat/webapp!848
- Loading branch information
Showing
26 changed files
with
368 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
webapp/channels/src/components/create_channel_tip/create_channel_tip.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
import React from 'react'; | ||
import {FormattedMessage} from 'react-intl'; | ||
|
||
import type {OptionValue} from 'components/more_direct_channels/types'; | ||
|
||
import Constants from 'utils/constants'; | ||
|
||
interface Props { | ||
values: OptionValue[]; | ||
openModal: () => void; | ||
} | ||
|
||
const CreateChannelTip: React.FC<Props> = ({values, openModal}) => { | ||
const lampIcon = () => Constants.LAMP_ICON; | ||
|
||
return ( | ||
(values.length >= (Constants.MAX_USERS_IN_GM - 1)) ? ( | ||
<div className='create-new-channel'> | ||
<img src={lampIcon()}/> | ||
<FormattedMessage | ||
id='multiselect.new_channel' | ||
defaultMessage='Create a channel to communicate with more people' | ||
/> | ||
<a | ||
href='#' | ||
onClick={(e) => { | ||
e.preventDefault(); | ||
openModal(); | ||
}} | ||
> | ||
<FormattedMessage | ||
id='multiselect.new_channel_create' | ||
defaultMessage='Create a channel' | ||
/> | ||
</a> | ||
</div> | ||
|
||
) : null | ||
|
||
); | ||
}; | ||
|
||
export default CreateChannelTip; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.