summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/react/components/more_channels.jsx54
-rw-r--r--web/react/components/post_right.jsx3
-rw-r--r--web/react/stores/channel_store.jsx2
-rw-r--r--web/react/utils/async_client.jsx2
-rw-r--r--web/sass-files/sass/partials/_files.scss2
-rw-r--r--web/sass-files/sass/partials/_loading.scss7
-rw-r--r--web/sass-files/sass/partials/_post.scss2
7 files changed, 45 insertions, 27 deletions
diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx
index be2a5e93c..1af259853 100644
--- a/web/react/components/more_channels.jsx
+++ b/web/react/components/more_channels.jsx
@@ -61,6 +61,10 @@ module.exports = React.createClass({
render: function() {
var server_error = this.state.server_error ? <div className='form-group has-error'><label className='control-label'>{ this.state.server_error }</label></div> : null;
var outter = this;
+ var moreChannels;
+
+ if (this.state.channels != null)
+ moreChannels = this.state.channels;
return (
<div className="modal fade" id="more_channels" ref="modal" tabIndex="-1" role="dialog" aria-hidden="true">
@@ -75,26 +79,36 @@ module.exports = React.createClass({
<button data-toggle="modal" data-target="#new_channel" data-channeltype={this.state.channel_type} type="button" className="btn btn-primary channel-create-btn" onClick={this.handleNewChannel}>Create New Channel</button>
</div>
<div className="modal-body">
- {this.state.channels.length ?
- <table className="more-channel-table table">
- <tbody>
- {this.state.channels.map(function(channel) {
- return (
- <tr key={channel.id}>
- <td>
- <p className="more-channel-name">{channel.display_name}</p>
- <p className="more-channel-description">{channel.description}</p>
- </td>
- <td className="td--action"><button onClick={outter.handleJoin.bind(outter, channel.id)} className="pull-right btn btn-primary">Join</button></td>
- </tr>
- )
- })}
- </tbody>
- </table>
- : <div className="no-channel-message">
- <p className="primary-message">No more channels to join</p>
- <p className="secondary-message">Click 'Create New Channel' to make a new one</p>
- </div>}
+ {moreChannels ?
+ (moreChannels.length ?
+ <table className="more-channel-table table">
+ <tbody>
+ {moreChannels.map(function(channel) {
+ return (
+ <tr key={channel.id}>
+ <td>
+ <p className="more-channel-name">{channel.display_name}</p>
+ <p className="more-channel-description">{channel.description}</p>
+ </td>
+ <td className="td--action"><button onClick={outter.handleJoin.bind(outter, channel.id)} className="pull-right btn btn-primary">Join</button></td>
+ </tr>
+ )
+ })}
+ </tbody>
+ </table>
+ : <div className="no-channel-message">
+ <p className="primary-message">No more channels to join</p>
+ <p className="secondary-message">Click 'Create New Channel' to make a new one</p>
+ </div>)
+ : <div ref="loadingscreen" className="loading-screen loading-screen--channel">
+ <div className="loading__content">
+ <h3>Loading</h3>
+ <div id="round_1" className="round"></div>
+ <div id="round_2" className="round"></div>
+ <div id="round_3" className="round"></div>
+ </div>
+ </div>
+ }
{ server_error }
</div>
<div className="modal-footer">
diff --git a/web/react/components/post_right.jsx b/web/react/components/post_right.jsx
index 2c28c5d9f..115ee87d4 100644
--- a/web/react/components/post_right.jsx
+++ b/web/react/components/post_right.jsx
@@ -282,7 +282,6 @@ module.exports = React.createClass({
componentDidMount: function() {
PostStore.addSelectedPostChangeListener(this._onChange);
PostStore.addChangeListener(this._onChangeAll);
- $(".post-right__scroll").perfectScrollbar();
this.resize();
var self = this;
$(window).resize(function(){
@@ -341,7 +340,7 @@ module.exports = React.createClass({
var height = $(window).height() - $('#error_bar').outerHeight() - 100;
$(".post-right__scroll").css("height", height + "px");
$(".post-right__scroll").scrollTop(100000);
- $(".post-right__scroll").perfectScrollbar('update');
+ $(".post-right__scroll").perfectScrollbar();
},
render: function() {
diff --git a/web/react/stores/channel_store.jsx b/web/react/stores/channel_store.jsx
index 77ab69ef8..340ce9922 100644
--- a/web/react/stores/channel_store.jsx
+++ b/web/react/stores/channel_store.jsx
@@ -202,7 +202,7 @@ var ChannelStore = assign({}, EventEmitter.prototype, {
BrowserStore.setItem("more_channels", JSON.stringify(channels));
},
_getMoreChannels: function() {
- var channels = [];
+ var channels;
try {
channels = JSON.parse(BrowserStore.getItem("more_channels"));
}
diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx
index 9383057c3..a2a6f8db7 100644
--- a/web/react/utils/async_client.jsx
+++ b/web/react/utils/async_client.jsx
@@ -104,7 +104,7 @@ module.exports.updateLastViewedAt = function() {
module.exports.getMoreChannels = function(force) {
if (isCallInProgress("getMoreChannels")) return;
- if (ChannelStore.getMoreAll().length == 0 || force) {
+ if (!ChannelStore.getMoreAll() || force) {
callTracker["getMoreChannels"] = utils.getTimestamp();
client.getMoreChannels(
diff --git a/web/sass-files/sass/partials/_files.scss b/web/sass-files/sass/partials/_files.scss
index 1268d8a07..79142176e 100644
--- a/web/sass-files/sass/partials/_files.scss
+++ b/web/sass-files/sass/partials/_files.scss
@@ -119,7 +119,7 @@
width: 120px;
height: 100px;
float: left;
- margin: 0 1em 1em 0;
+ margin: 5px 10px 5px 0;
&.custom-file {
width: 85px;
height: 100px;
diff --git a/web/sass-files/sass/partials/_loading.scss b/web/sass-files/sass/partials/_loading.scss
index 185a42180..b47594daf 100644
--- a/web/sass-files/sass/partials/_loading.scss
+++ b/web/sass-files/sass/partials/_loading.scss
@@ -5,10 +5,15 @@
position: absolute;
@include box-sizing(border-box);
text-align: center;
+ &.loading-screen--channel {
+ position: relative;
+ padding: 4em 0 3.5em;
+ }
.loading__content {
display: table-cell;
vertical-align: middle;
h3 {
+ font-size: 16px;
font-weight: 400;
margin: 0 0.2em 0;
display: inline-block;
@@ -23,7 +28,7 @@
width: 4px;
height: 4px;
display: inline-block;
- margin: 0 1px;
+ margin: 0;
opacity: 0.1;
@include border-radius(10px);
-moz-animation: move 0.75s infinite linear;
diff --git a/web/sass-files/sass/partials/_post.scss b/web/sass-files/sass/partials/_post.scss
index f33cedd16..4891fe67f 100644
--- a/web/sass-files/sass/partials/_post.scss
+++ b/web/sass-files/sass/partials/_post.scss
@@ -306,7 +306,7 @@ body.ios {
}
.post-image__columns {
@include legacy-pie-clearfix;
- margin-top: 1em;
+ padding-bottom: 5px;
}
.post-info--hidden {
display: none;