diff options
Diffstat (limited to 'web/react')
-rw-r--r-- | web/react/components/channel_invite_modal.jsx | 2 | ||||
-rw-r--r-- | web/react/components/edit_channel_modal.jsx | 2 | ||||
-rw-r--r-- | web/react/components/new_channel.jsx | 4 | ||||
-rw-r--r-- | web/react/components/post.jsx | 2 | ||||
-rw-r--r-- | web/react/components/setting_picture.jsx | 4 | ||||
-rw-r--r-- | web/react/utils/client.jsx | 17 |
6 files changed, 20 insertions, 11 deletions
diff --git a/web/react/components/channel_invite_modal.jsx b/web/react/components/channel_invite_modal.jsx index e446167ec..b70811db1 100644 --- a/web/react/components/channel_invite_modal.jsx +++ b/web/react/components/channel_invite_modal.jsx @@ -138,7 +138,7 @@ export default class ChannelInviteModal extends React.Component { <div className='modal-content'> <div className='modal-header'> <button type='button' className='close' data-dismiss='modal' aria-label='Close'><span aria-hidden='true'>×</span></button> - <h4 className='modal-title'>Add New Members to <span className='name'>{this.state.channel_name}</span></h4> + <h4 className='modal-title'>Add New Members to <span className='name'>{this.state.channelName}</span></h4> </div> <div className='modal-body'> {inviteError} diff --git a/web/react/components/edit_channel_modal.jsx b/web/react/components/edit_channel_modal.jsx index 1a633b193..fc303bbc2 100644 --- a/web/react/components/edit_channel_modal.jsx +++ b/web/react/components/edit_channel_modal.jsx @@ -56,7 +56,7 @@ module.exports = React.createClass({ <div className="modal-content"> <div className="modal-header"> <button type="button" className="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> - <h4 className="modal-title" ref="title">Edit Description for {this.state.title}</h4> + <h4 className="modal-title" ref="title">Edit Description for <span className='name'>{this.state.title}</span></h4> </div> <div className="modal-body"> <textarea className="form-control no-resize" rows="6" ref="channelDesc" maxLength="1024" value={this.state.description} onChange={this.handleUserInput}></textarea> diff --git a/web/react/components/new_channel.jsx b/web/react/components/new_channel.jsx index b00376758..38c9ea76d 100644 --- a/web/react/components/new_channel.jsx +++ b/web/react/components/new_channel.jsx @@ -127,12 +127,12 @@ module.exports = React.createClass({ <div className='modal-body'> <div className={displayNameClass}> <label className='control-label'>Display Name</label> - <input onKeyUp={this.displayNameKeyUp} type='text' ref='display_name' className='form-control' placeholder='Enter display name' maxLength='64' /> + <input onKeyUp={this.displayNameKeyUp} type='text' ref='display_name' className='form-control' placeholder='Enter display name' maxLength='22' /> {displayNameError} </div> <div className={nameClass}> <label className='control-label'>Handle</label> - <input type='text' className='form-control' ref='channel_name' placeholder="lowercase alphanumeric's only" maxLength='64' /> + <input type='text' className='form-control' ref='channel_name' placeholder="lowercase alphanumeric's only" maxLength='22' /> {nameError} </div> <div className='form-group'> diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx index 7bc6a8c01..53ffeb400 100644 --- a/web/react/components/post.jsx +++ b/web/react/components/post.jsx @@ -102,7 +102,7 @@ module.exports = React.createClass({ currentUserCss = "current--user"; } - var timestamp = UserStore.getCurrentUser().update_at; + var timestamp = UserStore.getProfile(post.user_id).update_at; return ( <div> diff --git a/web/react/components/setting_picture.jsx b/web/react/components/setting_picture.jsx index e97b67706..5b12ad7e9 100644 --- a/web/react/components/setting_picture.jsx +++ b/web/react/components/setting_picture.jsx @@ -48,6 +48,7 @@ module.exports = React.createClass({ } confirmButton = <a className={confirmButtonClass} onClick={this.props.submit}>Save</a>; } + var helpText = 'Upload a profile picture in either JPG or PNG format, at least ' + config.ProfileWidth + 'px in width and ' + config.ProfileHeight + 'px height.' var self = this; return ( @@ -59,6 +60,9 @@ module.exports = React.createClass({ {img} </li> <li className='setting-list-item'> + {helpText} + </li> + <li className='setting-list-item'> {serverError} {clientError} <span className='btn btn-sm btn-primary btn-file sel-btn'>Select<input ref='input' accept='.jpg,.png,.bmp' type='file' onChange={this.props.pictureChange}/></span> diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index 103292abf..754843697 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -252,6 +252,7 @@ module.exports.revokeSession = function(altId, success, error) { module.exports.getSessions = function(userId, success, error) { $.ajax({ + cache: false, url: '/api/v1/users/' + userId + '/sessions', dataType: 'json', contentType: 'application/json', @@ -282,6 +283,7 @@ module.exports.getMeSynchronous = function(success, error) { var currentUser = null; $.ajax({ async: false, + cache: false, url: '/api/v1/users/me', dataType: 'json', contentType: 'application/json', @@ -293,12 +295,9 @@ module.exports.getMeSynchronous = function(success, error) { } }, error: function onError(xhr, status, err) { - var ieChecker = window.navigator.userAgent; // This and the condition below is used to check specifically for browsers IE10 & 11 to suppress a 200 'OK' error from appearing on login - if (xhr.status !== 200 || !(ieChecker.indexOf('Trident/7.0') > 0 || ieChecker.indexOf('Trident/6.0') > 0)) { - if (error) { - var e = handleError('getMeSynchronous', xhr, status, err); - error(e); - } + if (error) { + var e = handleError('getMeSynchronous', xhr, status, err); + error(e); } } }); @@ -566,6 +565,7 @@ module.exports.updateLastViewedAt = function(channelId, success, error) { function getChannels(success, error) { $.ajax({ + cache: false, url: '/api/v1/channels/', dataType: 'json', type: 'GET', @@ -581,6 +581,7 @@ module.exports.getChannels = getChannels; module.exports.getChannel = function(id, success, error) { $.ajax({ + cache: false, url: '/api/v1/channels/' + id + '/', dataType: 'json', type: 'GET', @@ -610,6 +611,7 @@ module.exports.getMoreChannels = function(success, error) { function getChannelCounts(success, error) { $.ajax({ + cache: false, url: '/api/v1/channels/counts', dataType: 'json', type: 'GET', @@ -653,6 +655,7 @@ module.exports.executeCommand = function(channelId, command, suggest, success, e module.exports.getPosts = function(channelId, offset, limit, success, error, complete) { $.ajax({ + cache: false, url: '/api/v1/channels/' + channelId + '/posts/' + offset + '/' + limit, dataType: 'json', type: 'GET', @@ -668,6 +671,7 @@ module.exports.getPosts = function(channelId, offset, limit, success, error, com module.exports.getPost = function(channelId, postId, success, error) { $.ajax({ + cache: false, url: '/api/v1/channels/' + channelId + '/post/' + postId, dataType: 'json', type: 'GET', @@ -791,6 +795,7 @@ module.exports.removeChannelMember = function(id, data, success, error) { module.exports.getProfiles = function(success, error) { $.ajax({ + cache: false, url: '/api/v1/users/profiles', dataType: 'json', contentType: 'application/json', |