PLT-3270 Comment out max file size setting in system console (#3324)

* Comment out max file size settting in system console

* Remove pending post after successful create post request
Этот коммит содержится в:
Joram Wilander
2016-06-13 14:36:40 -04:00
коммит произвёл GitHub
родитель b353b9fbcf
Коммит 974238231b
2 изменённых файлов: 22 добавлений и 21 удалений

Просмотреть файл

@@ -22,8 +22,8 @@ export default class StorageSettings extends AdminSettings {
this.renderSettings = this.renderSettings.bind(this); this.renderSettings = this.renderSettings.bind(this);
//maxFileSize: props.config.FileSettings.MaxFileSize,
this.state = Object.assign(this.state, { this.state = Object.assign(this.state, {
maxFileSize: props.config.FileSettings.MaxFileSize,
driverName: props.config.FileSettings.DriverName, driverName: props.config.FileSettings.DriverName,
directory: props.config.FileSettings.Directory, directory: props.config.FileSettings.Directory,
amazonS3AccessKeyId: props.config.FileSettings.AmazonS3AccessKeyId, amazonS3AccessKeyId: props.config.FileSettings.AmazonS3AccessKeyId,
@@ -34,7 +34,7 @@ export default class StorageSettings extends AdminSettings {
} }
getConfigFromState(config) { getConfigFromState(config) {
config.FileSettings.MaxFileSize = this.parseInt(this.state.maxFileSize); //config.FileSettings.MaxFileSize = this.parseInt(this.state.maxFileSize);
config.FileSettings.DriverName = this.state.driverName; config.FileSettings.DriverName = this.state.driverName;
config.FileSettings.Directory = this.state.directory; config.FileSettings.Directory = this.state.directory;
config.FileSettings.AmazonS3AccessKeyId = this.state.amazonS3AccessKeyId; config.FileSettings.AmazonS3AccessKeyId = this.state.amazonS3AccessKeyId;
@@ -57,9 +57,7 @@ export default class StorageSettings extends AdminSettings {
} }
renderSettings() { renderSettings() {
return ( /*<TextSetting
<SettingsGroup>
<TextSetting
id='maxFileSize' id='maxFileSize'
label={ label={
<FormattedMessage <FormattedMessage
@@ -76,7 +74,10 @@ export default class StorageSettings extends AdminSettings {
} }
value={this.state.maxFileSize} value={this.state.maxFileSize}
onChange={this.handleChange} onChange={this.handleChange}
/> />*/
return (
<SettingsGroup>
<DropdownSetting <DropdownSetting
id='driverName' id='driverName'
values={[ values={[

Просмотреть файл

@@ -180,7 +180,7 @@ class CreatePost extends React.Component {
Client.createPost(post, Client.createPost(post,
() => { () => {
// DO nothing. Websockets will handle this. PostStore.removePendingPost(post.pending_post_id);
}, },
(err) => { (err) => {
if (err.id === 'api.post.create_post.root_id.app_error') { if (err.id === 'api.post.create_post.root_id.app_error') {