Added logic for loading animation to appear when posts have yet to be loaded. Added markup necessary for loading animation css. Removed a file that was no longer needed for the design.
Этот коммит содержится в:
@@ -1,3 +0,0 @@
|
|||||||
// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
|
|
||||||
// See License.txt for license information.
|
|
||||||
|
|
||||||
@@ -295,7 +295,7 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
render: function() {
|
render: function() {
|
||||||
var order = [];
|
var order = [];
|
||||||
var posts = {};
|
var posts;
|
||||||
|
|
||||||
var last_viewed = Number.MAX_VALUE;
|
var last_viewed = Number.MAX_VALUE;
|
||||||
|
|
||||||
@@ -408,7 +408,7 @@ module.exports = React.createClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
var postCtls = [];
|
var postCtls = [];
|
||||||
var previousPostDay = posts[order[order.length-1]] ? utils.getDateForUnixTicks(posts[order[order.length-1]].create_at): new Date();
|
var previousPostDay = posts && posts[order[order.length-1]] ? utils.getDateForUnixTicks(posts[order[order.length-1]].create_at): new Date();
|
||||||
var currentPostDay = new Date();
|
var currentPostDay = new Date();
|
||||||
|
|
||||||
for (var i = order.length-1; i >= 0; i--) {
|
for (var i = order.length-1; i >= 0; i--) {
|
||||||
@@ -459,6 +459,19 @@ module.exports = React.createClass({
|
|||||||
previousPostDay = utils.getDateForUnixTicks(post.create_at);
|
previousPostDay = utils.getDateForUnixTicks(post.create_at);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (posts == undefined) {
|
||||||
|
postCtls.push(
|
||||||
|
<div ref="loadingscreen" className="loading-screen">
|
||||||
|
<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>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref="postlist" className="post-list-holder-by-time">
|
<div ref="postlist" className="post-list-holder-by-time">
|
||||||
<div className="post-list__table">
|
<div className="post-list__table">
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user