diff options
-rw-r--r-- | doc/developer/tests/test-attachments.md | 7 | ||||
-rw-r--r-- | web/react/components/center_panel.jsx | 2 | ||||
-rw-r--r-- | web/react/components/get_link_modal.jsx | 23 | ||||
-rw-r--r-- | web/react/components/get_team_invite_link_modal.jsx | 12 | ||||
-rw-r--r-- | web/react/components/team_general_tab.jsx | 4 | ||||
-rw-r--r-- | web/static/i18n/en.json | 1 |
6 files changed, 36 insertions, 13 deletions
diff --git a/doc/developer/tests/test-attachments.md b/doc/developer/tests/test-attachments.md index e2fda0eb6..75a2285f8 100644 --- a/doc/developer/tests/test-attachments.md +++ b/doc/developer/tests/test-attachments.md @@ -7,8 +7,9 @@ This test contains instructions for the core team to manually test common attach **Notes:** - All file types should upload and post. -- Read the expected for details on the behavior of the thumbnail and preview window. +- Read the expected for details on the behavior of the thumbnail and preview window. - The expected behavior of video and audio formats depends on the operating system, browser and plugins. View the permalinks to the Public Test Channel on Pre-Release Core to see the expected cases. +- If the browser can play the media file, media player controls should appear. If the browser cannot play the file, it should show appear as a regular attachment without the media controls. ### Images @@ -72,7 +73,7 @@ Expected: Generic Word thumbnail & preview window. **MP4** `Videos/MP4.mp4` -Expected: Generic video thumbnail & playable preview window. View Permalink. +Expected: Generic video thumbnail, view Permalink for preview window behavior. Expected depends on the operating system, browser and plugins. [Permalink](https://pre-release.mattermost.com/core/pl/5dx5qx9t9brqfnhohccxjynx7c) **AVI** @@ -114,7 +115,7 @@ Expected: Generic audio thumbnail & playable preview window **M4A** `Audio/M4a.m4a` -Expected: Generic audio thumbnail & playable preview window +Expected: Generic audio thumbnail, view Permalink for preview window behavior. Expected depends on the operating system, browser and plugins. [Permalink](https://pre-release.mattermost.com/core/pl/6c7qsw48ybd88bktgeykodsrrc) **AAC** diff --git a/web/react/components/center_panel.jsx b/web/react/components/center_panel.jsx index 53dad1306..443ecefde 100644 --- a/web/react/components/center_panel.jsx +++ b/web/react/components/center_panel.jsx @@ -69,7 +69,7 @@ export default class CenterPanel extends React.Component { onClick={handleClick} > <a href=''> - {'You are viewing the Archives. Click here to jump to recent messages. '} + {'Click here to jump to recent messages. '} {<i className='fa fa-arrow-down'></i>} </a> </div> diff --git a/web/react/components/get_link_modal.jsx b/web/react/components/get_link_modal.jsx index 3fc71ff96..de3387a35 100644 --- a/web/react/components/get_link_modal.jsx +++ b/web/react/components/get_link_modal.jsx @@ -41,6 +41,8 @@ export default class GetLinkModal extends React.Component { } render() { + const userCreationEnabled = global.window.mm_config.EnableUserCreation === 'true'; + let helpText = null; if (this.props.helpText) { helpText = ( @@ -53,7 +55,7 @@ export default class GetLinkModal extends React.Component { } let copyLink = null; - if (document.queryCommandSupported('copy')) { + if (userCreationEnabled && document.queryCommandSupported('copy')) { copyLink = ( <button data-copy-btn='true' @@ -69,6 +71,18 @@ export default class GetLinkModal extends React.Component { ); } + let linkText = null; + if (userCreationEnabled) { + linkText = ( + <textarea + className='form-control no-resize min-height' + readOnly='true' + ref='textarea' + value={this.props.link} + /> + ); + } + var copyLinkConfirm = null; if (this.state.copiedLink) { copyLinkConfirm = ( @@ -92,12 +106,7 @@ export default class GetLinkModal extends React.Component { </Modal.Header> <Modal.Body> {helpText} - <textarea - className='form-control no-resize min-height' - readOnly='true' - ref='textarea' - value={this.props.link} - /> + {linkText} </Modal.Body> <Modal.Footer> <button diff --git a/web/react/components/get_team_invite_link_modal.jsx b/web/react/components/get_team_invite_link_modal.jsx index 883871267..299729250 100644 --- a/web/react/components/get_team_invite_link_modal.jsx +++ b/web/react/components/get_team_invite_link_modal.jsx @@ -16,6 +16,10 @@ const holders = defineMessages({ help: { id: 'get_team_invite_link_modal.help', defaultMessage: 'Send teammates the link below for them to sign-up to this team site.' + }, + helpDisabled: { + id: 'get_team_invite_link_modal.helpDisabled', + defaultMessage: 'User creation has been disabled for your team. Please ask your team administrator for details.' } }); @@ -47,12 +51,18 @@ class GetTeamInviteLinkModal extends React.Component { render() { const {formatMessage} = this.props.intl; + let helpText = formatMessage(holders.helpDisabled); + + if (global.window.mm_config.EnableUserCreation === 'true') { + helpText = formatMessage(holders.help); + } + return ( <GetLinkModal show={this.state.show} onHide={() => this.setState({show: false})} title={formatMessage(holders.title)} - helpText={formatMessage(holders.help)} + helpText={helpText} link={TeamStore.getCurrentInviteLink()} /> ); diff --git a/web/react/components/team_general_tab.jsx b/web/react/components/team_general_tab.jsx index 0656d3b03..0a1b02853 100644 --- a/web/react/components/team_general_tab.jsx +++ b/web/react/components/team_general_tab.jsx @@ -575,6 +575,8 @@ class GeneralTab extends React.Component { </div> ); + const nameExtraInfo = <span>{formatMessage(holders.teamNameInfo)}</span>; + nameSection = ( <SettingItemMax title={formatMessage({id: 'general_tab.teamName'})} @@ -583,7 +585,7 @@ class GeneralTab extends React.Component { server_error={serverError} client_error={clientError} updateSection={this.onUpdateNameSection} - extraInfo={formatMessage(holders.teamNameInfo)} + extraInfo={nameExtraInfo} /> ); } else { diff --git a/web/static/i18n/en.json b/web/static/i18n/en.json index 7c32d856a..de955349e 100644 --- a/web/static/i18n/en.json +++ b/web/static/i18n/en.json @@ -530,6 +530,7 @@ "get_link.close": "Close", "get_team_invite_link_modal.title": "Team Invite Link", "get_team_invite_link_modal.help": "Send teammates the link below for them to sign-up to this team site.", + "get_team_invite_link_modal.helpDisabled": "User creation has been disabled for your team. Please ask your team administrator for details.", "invite_member.emailError": "Please enter a valid email address", "invite_member.firstname": "First name", "invite_member.lastname": "Last name", |