Merge branch 'release-4.1'
Этот коммит содержится в:
@@ -68,6 +68,7 @@ export default class StorageSettings extends AdminSettings {
|
||||
}
|
||||
|
||||
renderSettings() {
|
||||
let amazonSSEComp;
|
||||
const mobileUploadDownloadSettings = [];
|
||||
if (window.mm_license.IsLicensed === 'true' && window.mm_license.Compliance === 'true') {
|
||||
mobileUploadDownloadSettings.push(
|
||||
@@ -113,6 +114,29 @@ export default class StorageSettings extends AdminSettings {
|
||||
disabled={!this.state.enableFileAttachments}
|
||||
/>
|
||||
);
|
||||
|
||||
amazonSSEComp =
|
||||
(
|
||||
<BooleanSetting
|
||||
id='amazonS3SSE'
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='admin.image.amazonS3SSETitle'
|
||||
defaultMessage='Enable Server-Side Encryption for Amazon S3:'
|
||||
/>
|
||||
}
|
||||
placeholder={Utils.localizeMessage('admin.image.amazonS3SSEExample', 'Ex "false"')}
|
||||
helpText={
|
||||
<FormattedHTMLMessage
|
||||
id='admin.image.amazonS3SSEDescription'
|
||||
defaultMessage='When true, encrypt files in Amazon S3 using server-side encryption with Amazon S3-managed keys. See <a href="https://about.mattermost.com/default-server-side-encryption" target="_blank">documentation</a> to learn more.'
|
||||
/>
|
||||
}
|
||||
value={this.state.amazonS3SSE}
|
||||
onChange={this.handleChange}
|
||||
disabled={this.state.driverName !== DRIVER_S3}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -254,25 +278,7 @@ export default class StorageSettings extends AdminSettings {
|
||||
onChange={this.handleChange}
|
||||
disabled={this.state.driverName !== DRIVER_S3}
|
||||
/>
|
||||
<BooleanSetting
|
||||
id='AmazonSSE'
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='admin.image.AmazonSSETitle'
|
||||
defaultMessage='Enable Server-Side Encryption for Amazon S3:'
|
||||
/>
|
||||
}
|
||||
placeholder={Utils.localizeMessage('admin.image.AmazonSSEExample', 'Ex "false"')}
|
||||
helpText={
|
||||
<FormattedMessage
|
||||
id='admin.image.AmazonSSEDescription'
|
||||
defaultMessage='When true, encrypt files in Amazon S3 using server-side encryption with Amazon S3-managed keys. See <a href="https://about.mattermost.com/default-server-side-encryption" target="_blank">documentation</a> to learn more.'
|
||||
/>
|
||||
}
|
||||
value={this.state.AmazonSSE}
|
||||
onChange={this.handleChange}
|
||||
disabled={this.state.driverName !== DRIVER_S3}
|
||||
/>
|
||||
{amazonSSEComp}
|
||||
<BooleanSetting
|
||||
id='enableFileAttachments'
|
||||
label={
|
||||
|
||||
@@ -14,6 +14,7 @@ import * as EmojiPicker from 'components/emoji_picker/emoji_picker.jsx';
|
||||
import AppDispatcher from 'dispatcher/app_dispatcher.jsx';
|
||||
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
import * as PostUtils from 'utils/post_utils.jsx';
|
||||
import * as UserAgent from 'utils/user_agent.jsx';
|
||||
import * as ChannelActions from 'actions/channel_actions.jsx';
|
||||
import * as PostActions from 'actions/post_actions.jsx';
|
||||
@@ -224,7 +225,7 @@ export default class CreatePost extends React.Component {
|
||||
const members = stats.member_count - 1;
|
||||
const updateChannel = ChannelStore.getCurrent();
|
||||
|
||||
if ((this.state.message.includes('@all') || this.state.message.includes('@channel')) && members >= Constants.NOTIFY_ALL_MEMBERS) {
|
||||
if ((PostUtils.containsAtMention(this.state.message, '@all') || PostUtils.containsAtMention(this.state.message, '@channel')) && members >= Constants.NOTIFY_ALL_MEMBERS) {
|
||||
this.setState({totalMembers: members});
|
||||
this.showNotifyAllModal();
|
||||
return;
|
||||
|
||||
@@ -71,6 +71,15 @@ export default class DotMenu extends Component {
|
||||
$('#' + this.props.idPrefix + '_dropdown' + this.props.post.id).on('hidden.bs.dropdown', () => this.props.handleDropdownOpened(false));
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (nextProps.post !== this.props.post) {
|
||||
this.state = {
|
||||
canDelete: PostUtils.canDeletePost(nextProps.post),
|
||||
canEdit: PostUtils.canEditPost(nextProps.post, this.editDisableAction)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.editDisableAction.cancel();
|
||||
}
|
||||
|
||||
@@ -85,15 +85,14 @@ class EditChannelHeaderModal extends React.Component {
|
||||
this.props.channel.id,
|
||||
this.state.header,
|
||||
() => {
|
||||
this.setState({serverError: ''});
|
||||
this.setState({serverError: '', submitted: false});
|
||||
this.onHide();
|
||||
},
|
||||
(err) => {
|
||||
if (err.id === 'api.context.invalid_param.app_error') {
|
||||
this.setState({serverError: this.props.intl.formatMessage(holders.error)});
|
||||
} else {
|
||||
this.setState({serverError: err.message});
|
||||
}
|
||||
this.setState({submitted: false});
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -189,6 +188,7 @@ class EditChannelHeaderModal extends React.Component {
|
||||
handlePostError={this.handlePostError}
|
||||
id='edit_textbox'
|
||||
ref='editChannelHeaderTextbox'
|
||||
characterLimit={1024}
|
||||
/>
|
||||
<br/>
|
||||
{serverError}
|
||||
|
||||
@@ -78,6 +78,7 @@ export default class PostBodyAdditionalContent extends React.PureComponent {
|
||||
return (
|
||||
<PostAttachmentList
|
||||
attachments={attachments}
|
||||
key={this.props.post.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -38,13 +38,15 @@ export default class Textbox extends React.Component {
|
||||
suggestionListStyle: PropTypes.string,
|
||||
emojiEnabled: PropTypes.bool,
|
||||
isRHS: PropTypes.bool,
|
||||
popoverMentionKeyClick: React.PropTypes.bool
|
||||
popoverMentionKeyClick: React.PropTypes.bool,
|
||||
characterLimit: React.PropTypes.number
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
supportsCommands: true,
|
||||
isRHS: false,
|
||||
popoverMentionKeyClick: false
|
||||
popoverMentionKeyClick: false,
|
||||
characterLimit: Constants.CHARACTER_LIMIT
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
@@ -93,14 +95,14 @@ export default class Textbox extends React.Component {
|
||||
|
||||
checkMessageLength = (message) => {
|
||||
if (this.props.handlePostError) {
|
||||
if (message.length > Constants.CHARACTER_LIMIT) {
|
||||
if (message.length > this.props.characterLimit) {
|
||||
const errorMessage = (
|
||||
<FormattedMessage
|
||||
id='create_post.error_message'
|
||||
defaultMessage='Your message is too long. Character count: {length}/{limit}'
|
||||
values={{
|
||||
length: message.length,
|
||||
limit: Constants.CHARACTER_LIMIT
|
||||
limit: this.props.characterLimit
|
||||
}}
|
||||
/>);
|
||||
this.props.handlePostError(errorMessage);
|
||||
|
||||
@@ -11,7 +11,8 @@ import * as GlobalActions from 'actions/global_actions.jsx';
|
||||
import * as FileUtils from 'utils/file_utils';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
|
||||
import {KeyCodes} from 'utils/constants.jsx';
|
||||
import Constants from 'utils/constants.jsx';
|
||||
const KeyCodes = Constants.KeyCodes;
|
||||
|
||||
import {getFileUrl, getFilePreviewUrl} from 'mattermost-redux/utils/file_utils';
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user