Fixed animation not syncing bug and added container icon.

This commit is contained in:
Sean Li 2015-02-04 12:54:43 -08:00
parent d6d436939b
commit a3e09c305a
9 changed files with 9 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 B

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 228 B

View File

@ -65,7 +65,7 @@ var ContainerDetails = React.createClass({
this.setState({ this.setState({
progress: ContainerStore.progress(this.getParams().name), progress: ContainerStore.progress(this.getParams().name),
env: ContainerUtil.env(container), env: ContainerUtil.env(container),
page: this.PAGE_LOGS page: this.PAGE_HOME
}); });
var ports = ContainerUtil.ports(container); var ports = ContainerUtil.ports(container);
var webPorts = ['80', '8000', '8080', '3000', '5000', '2368']; var webPorts = ['80', '8000', '8080', '3000', '5000', '2368'];

View File

@ -3,11 +3,15 @@ var ContainerListItem = require('./ContainerListItem.react');
var ContainerListNewItem = require('./ContainerListNewItem.react'); var ContainerListNewItem = require('./ContainerListNewItem.react');
var ContainerList = React.createClass({ var ContainerList = React.createClass({
componentWillMount: function () {
this._start = Date.now();
},
render: function () { render: function () {
var self = this;
var containers = this.props.containers.map(function (container) { var containers = this.props.containers.map(function (container) {
console.log(container); console.log(container);
return ( return (
<ContainerListItem container={container} /> <ContainerListItem container={container} start={self._start}/>
); );
}); });
return ( return (

View File

@ -7,9 +7,6 @@ var dialog = remote.require('dialog');
var ContainerStore = require('./ContainerStore'); var ContainerStore = require('./ContainerStore');
var ContainerListItem = React.createClass({ var ContainerListItem = React.createClass({
componentWillMount: function () {
this._start = Date.now();
},
handleItemMouseEnter: function () { handleItemMouseEnter: function () {
var $action = $(this.getDOMNode()).find('.action'); var $action = $(this.getDOMNode()).find('.action');
$action.show(); $action.show();
@ -49,7 +46,7 @@ var ContainerListItem = React.createClass({
// Synchronize all animations // Synchronize all animations
var style = { var style = {
WebkitAnimationDelay: (self._start - Date.now()) + 'ms' WebkitAnimationDelay: (self.props.start - Date.now()) + 'ms'
}; };
var state; var state;

View File

@ -98,7 +98,7 @@ var NewContainer = React.createClass({
render: function () { render: function () {
var self = this; var self = this;
var title = this.state.query ? 'Results' : 'Recommended'; var title = this.state.query ? 'Results' : 'Recommended';
var data = this.state.results.slice(0, 7); var data = this.state.results.slice(0, 6);
var results; var results;
if (data.length) { if (data.length) {

View File

@ -121,7 +121,7 @@
.new-container { .new-container {
padding: 35px 20px 32px 25px; padding: 35px 20px 32px 25px;
.new-container-header { .new-container-header {
margin-bottom: 20px; margin-bottom: 28px;
display: flex; display: flex;
flex: 1; flex: 1;
.text { .text {