diff --git a/Makefile b/Makefile
index dacc1a19bc..e59e03ee77 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ install:
@if [ $(shell docker ps | grep -ci mattermost-mysql) -eq 0 ]; then \
echo restoring go libs using godep; \
- ../../../../bin/godep restore; \
+ $(GOPATH)/bin/godep restore; \
echo starting mattermost-mysql; \
docker run --name mattermost-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=mostest \
-e MYSQL_USER=mmuser -e MYSQL_PASSWORD=mostest -e MYSQL_DATABASE=mattermost_test -d mysql > /dev/null; \
diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx
index be2a5e93c7..dad0a644ad 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 ?
: null;
var outter = this;
+ var moreChannels;
+
+ if (this.state.channels != null)
+ moreChannels = this.state.channels;
return (
@@ -75,25 +79,34 @@ module.exports = React.createClass({
- {this.state.channels.length ?
-
-
- {this.state.channels.map(function(channel) {
- return (
-
- |
- {channel.display_name}
- {channel.description}
- |
- |
-
- )
- })}
-
-
- :
-
No more channels to join
-
Click 'Create New Channel' to make a new one
+ {moreChannels ?
+ (moreChannels.length ?
+
+
+ {moreChannels.map(function(channel) {
+ return (
+
+ |
+ {channel.display_name}
+ {channel.description}
+ |
+ |
+
+ )
+ })}
+
+
+ :
+
No more channels to join
+
Click 'Create New Channel' to make a new one
+
)
+ :
}
{ server_error }
diff --git a/web/react/stores/channel_store.jsx b/web/react/stores/channel_store.jsx
index 3f259bc7db..387d526285 100644
--- a/web/react/stores/channel_store.jsx
+++ b/web/react/stores/channel_store.jsx
@@ -192,7 +192,7 @@ var ChannelStore = assign({}, EventEmitter.prototype, {
sessionStorage.setItem("more_channels", JSON.stringify(channels));
},
_getMoreChannels: function() {
- var channels = [];
+ var channels;
try {
channels = JSON.parse(sessionStorage.more_channels);
}
diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx
index 9383057c3c..a2a6f8db76 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/_loading.scss b/web/sass-files/sass/partials/_loading.scss
index 185a42180d..a078d3563b 100644
--- a/web/sass-files/sass/partials/_loading.scss
+++ b/web/sass-files/sass/partials/_loading.scss
@@ -66,3 +66,60 @@
}
}
}
+
+.channel-loading-screen {
+ position: absolute;
+ text-align: center;
+ padding: 2em 1em;
+}
+
+.channel-loading-message {
+ .loading__content {
+ .round {
+ background-color: #444;
+ width: 4px;
+ height: 4px;
+ display: inline-block;
+ margin: 0 1px;
+ opacity: 0.1;
+ @include border-radius(10px);
+ -moz-animation: move 0.75s infinite linear;
+ -webkit-animation: move 0.75s infinite linear;
+ }
+
+ #round_1 {
+ -moz-animation-delay: .2s;
+ -webkit-animation-delay: .2s;
+ }
+
+ #round_2 {
+ -moz-animation-delay: .4s;
+ -webkit-animation-delay: .4s;
+ }
+
+ #round_3 {
+ -moz-animation-delay: .6s;
+ -webkit-animation-delay: .6s;
+ }
+
+ @-moz-keyframes move {
+ 0% {
+ opacity: 1;
+ }
+
+ 100% {
+ opacity: 0.1;
+ };
+ }
+
+ @-webkit-keyframes move {
+ 0% {
+ opacity: 1;
+ }
+
+ 100% {
+ opacity: 0.1;
+ };
+ }
+ }
+}