summaryrefslogtreecommitdiffstats
path: root/web/react/components
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components')
-rw-r--r--web/react/components/channel_loader.jsx2
-rw-r--r--web/react/components/invite_member_modal.jsx22
-rw-r--r--web/react/components/mention_list.jsx4
-rw-r--r--web/react/components/post_list.jsx5
-rw-r--r--web/react/components/sidebar.jsx4
-rw-r--r--web/react/components/sidebar_right.jsx6
-rw-r--r--web/react/components/signup_user_complete.jsx2
7 files changed, 32 insertions, 13 deletions
diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx
index 1b389aa1d..b7cb248db 100644
--- a/web/react/components/channel_loader.jsx
+++ b/web/react/components/channel_loader.jsx
@@ -12,8 +12,6 @@ var Constants = require('../utils/constants.jsx');
module.exports = React.createClass({
componentDidMount: function() {
- // Initalize stores
- BrowserStore.initalize();
/* Start initial aysnc loads */
AsyncClient.getMe();
diff --git a/web/react/components/invite_member_modal.jsx b/web/react/components/invite_member_modal.jsx
index 9ff67ae1b..94be2acd6 100644
--- a/web/react/components/invite_member_modal.jsx
+++ b/web/react/components/invite_member_modal.jsx
@@ -162,25 +162,31 @@ module.exports = React.createClass({
invite_sections[index] = (
<div key={"key" + index}>
<div>
- <button type="button" className="btn remove__member" onClick={this.removeInviteFields.bind(this, index)}>×</button>
+ <button type="button" className="btn btn-link remove__member" onClick={this.removeInviteFields.bind(this, index)}><span className="fa fa-trash"></span></button>
</div>
<div className={ email_error ? "form-group invite has-error" : "form-group invite" }>
<input onKeyUp={this.displayNameKeyUp} type="text" ref={"email"+index} className="form-control" placeholder="email@domain.com" maxLength="64" />
{ email_error }
</div>
+ <div className="row--invite">
{ config.AllowInviteNames ?
- <div className={ first_name_error ? "form-group invite has-error" : "form-group invite" }>
- <input type="text" className="form-control" ref={"first_name"+index} placeholder="First name" maxLength="64" />
- { first_name_error }
+ <div className="col-sm-6">
+ <div className={ first_name_error ? "form-group has-error" : "form-group" }>
+ <input type="text" className="form-control" ref={"first_name"+index} placeholder="First name" maxLength="64" />
+ { first_name_error }
+ </div>
</div>
: "" }
{ config.AllowInviteNames ?
- <div className={ last_name_error ? "form-group invite has-error" : "form-group invite" }>
- <input type="text" className="form-control" ref={"last_name"+index} placeholder="Last name" maxLength="64" />
- { last_name_error }
+ <div className="col-sm-6">
+ <div className={ last_name_error ? "form-group has-error" : "form-group" }>
+ <input type="text" className="form-control" ref={"last_name"+index} placeholder="Last name" maxLength="64" />
+ { last_name_error }
+ </div>
</div>
: "" }
</div>
+ </div>
);
}
@@ -203,7 +209,7 @@ module.exports = React.createClass({
<button type="button" className="btn btn-default" onClick={this.addInviteFields}>Add another</button>
<br/>
<br/>
- <label className='control-label'>People invited automatically join Town Square channel.</label>
+ <span>People invited automatically join Town Square channel.</span>
</div>
<div className="modal-footer">
<button type="button" className="btn btn-default" data-dismiss="modal">Close</button>
diff --git a/web/react/components/mention_list.jsx b/web/react/components/mention_list.jsx
index 3fac41073..ba2c53612 100644
--- a/web/react/components/mention_list.jsx
+++ b/web/react/components/mention_list.jsx
@@ -129,7 +129,7 @@ module.exports = React.createClass({
if (numMentions < 1) return (<div/>);
- var height = (numMentions*37) + 2;
+ var height = (numMentions*36) + 4;
var width = $('#'+this.props.id).parent().width();
var bottom = $(window).height() - $('#'+this.props.id).offset().top;
var left = $('#'+this.props.id).offset().left;
@@ -137,7 +137,7 @@ module.exports = React.createClass({
return (
<div className="mentions--top" style={{height: height, width: width, bottom: bottom, left: left}}>
- <div ref="mentionlist" className="mentions-box" style={{maxHeight: max_height, height: height, width: width}}>
+ <div ref="mentionlist" className="mentions-box" style={{height: height, width: width}}>
{ mentions }
</div>
</div>
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx
index d6dc9ce30..177e4a1db 100644
--- a/web/react/components/post_list.jsx
+++ b/web/react/components/post_list.jsx
@@ -78,6 +78,7 @@ module.exports = React.createClass({
PostStore.addChangeListener(this._onChange);
ChannelStore.addChangeListener(this._onChange);
+ UserStore.addStatusesChangeListener(this._onChange);
SocketStore.addChangeListener(this._onSocketChange);
$(".post-list-holder-by-time").perfectScrollbar();
@@ -157,6 +158,7 @@ module.exports = React.createClass({
componentWillUnmount: function() {
PostStore.removeChangeListener(this._onChange);
ChannelStore.removeChangeListener(this._onChange);
+ UserStore.removeStatusesChangeListener(this._onChange);
SocketStore.removeChangeListener(this._onSocketChange);
$('body').off('click.userpopover');
},
@@ -193,6 +195,9 @@ module.exports = React.createClass({
this.scrolledToNew = false;
}
this.setState(newState);
+ } else {
+ // Updates the timestamp on each post
+ this.forceUpdate()
}
},
_onSocketChange: function(msg) {
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index 0e4d38fe0..2095978e8 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -263,6 +263,10 @@ var SidebarLoggedIn = React.createClass({
if (ChannelStore.getCurrentId() != msg.channel_id) {
AsyncClient.getChannels(true);
}
+ } else if (msg.action == "user_added") {
+ if (UserStore.getCurrentId() === msg.user_id) {
+ AsyncClient.getChannels(true);
+ }
}
},
updateTitle: function() {
diff --git a/web/react/components/sidebar_right.jsx b/web/react/components/sidebar_right.jsx
index 8334b345b..60c8ffae6 100644
--- a/web/react/components/sidebar_right.jsx
+++ b/web/react/components/sidebar_right.jsx
@@ -16,10 +16,16 @@ module.exports = React.createClass({
componentDidMount: function() {
PostStore.addSearchChangeListener(this._onSearchChange);
PostStore.addSelectedPostChangeListener(this._onSelectedChange);
+ UserStore.addStatusesChangeListener(this._onChange);
},
componentWillUnmount: function() {
PostStore.removeSearchChangeListener(this._onSearchChange);
PostStore.removeSelectedPostChangeListener(this._onSelectedChange);
+ UserStore.removeStatusesChangeListener(this._onChange);
+ },
+ _onChange: function() {
+ // Updates the timestamp on each post
+ this.forceUpdate();
},
_onSelectedChange: function(from_search) {
if (this.isMounted()) {
diff --git a/web/react/components/signup_user_complete.jsx b/web/react/components/signup_user_complete.jsx
index 124e617bd..fb96cc99f 100644
--- a/web/react/components/signup_user_complete.jsx
+++ b/web/react/components/signup_user_complete.jsx
@@ -130,7 +130,7 @@ module.exports = React.createClass({
</div>
{ email }
<label className="control-label">Password</label>
- <div className={ name_error ? "form-group has-error" : "form-group" }>
+ <div className={ password_error ? "form-group has-error" : "form-group" }>
<input type="password" ref="password" className="form-control" placeholder="" maxLength="128" />
{ password_error }
</div>