Added smooth fade-in animation.

This commit is contained in:
Sean Li 2015-02-24 10:02:10 -08:00
parent 3b13a068ad
commit 1efad51881
8 changed files with 24 additions and 3 deletions

View File

@ -31,7 +31,7 @@ var ContainerListItem = React.createClass({
}); });
ContainerStore.remove(this.props.container.Name, () => { ContainerStore.remove(this.props.container.Name, () => {
var containers = ContainerStore.sorted(); var containers = ContainerStore.sorted();
if (containers.length === 0) { if (containers.length === 1) {
$(document.body).find('.new-container-item').parent().fadeIn(); $(document.body).find('.new-container-item').parent().fadeIn();
} }
}); });

View File

@ -52,7 +52,7 @@ var Setup = React.createClass({
<div className="contents"> <div className="contents">
<RetinaImage src={img} checkIfRetinaImgExists={false}/> <RetinaImage src={img} checkIfRetinaImgExists={false}/>
<div className="detail"> <div className="detail">
<Radial progress={SetupStore.percent()} thick={true} gray={true}/> <Radial progress={this.state.progress} thick={true} gray={true}/>
</div> </div>
</div> </div>
); );
@ -87,7 +87,7 @@ var Setup = React.createClass({
<h1>Couldn&#39;t Install</h1> <h1>Couldn&#39;t Install</h1>
<p>Kitematic didn&#39;t receive the administrative privileges required to install or upgrade VirtualBox &amp; Docker.</p> <p>Kitematic didn&#39;t receive the administrative privileges required to install or upgrade VirtualBox &amp; Docker.</p>
<p>Please retry or download &amp; install VirutalBox manually from the <a onClick={this.handleOpenWebsite}>official Oracle website</a>.</p> <p>Please retry or download &amp; install VirutalBox manually from the <a onClick={this.handleOpenWebsite}>official Oracle website</a>.</p>
<button className="btn btn-action" onClick={this.handleRetry}>Retry</button> <p><button className="btn btn-action" onClick={this.handleRetry}>Retry</button></p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -34,3 +34,12 @@
-webkit-transform: translateY(20px); -webkit-transform: translateY(20px);
} }
} }
@-webkit-keyframes fadein {
from {
opacity:0;
}
to {
opacity:1;
}
}

View File

@ -19,6 +19,7 @@
position: relative; position: relative;
top: 10px; top: 10px;
left: 15px; left: 15px;
z-index: 1000;
&:hover { &:hover {
.button-minimize.enabled { .button-minimize.enabled {
.at2x('minimize.png', 10px, 10px); .at2x('minimize.png', 10px, 10px);

View File

@ -1,6 +1,7 @@
/* Sidebar */ /* Sidebar */
.sidebar { .sidebar {
.fade-in();
padding-top: 28px; padding-top: 28px;
background-color: white; background-color: white;
margin: 0; margin: 0;

View File

@ -28,3 +28,10 @@
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.fade-in() {
opacity: 0;
-webkit-animation: fadein ease-in 1;
-webkit-animation-fill-mode: forwards;
-webkit-animation-duration: 0.3s;
}

View File

@ -1,4 +1,6 @@
.details { .details {
.fade-in();
-webkit-animation-delay: 0.3s;
background-color: @color-background; background-color: @color-background;
margin: 0; margin: 0;
padding: 0; padding: 0;

View File

@ -1,4 +1,5 @@
.setup { .setup {
.fade-in();
display: flex; display: flex;
height: 100%; height: 100%;
width: 100%; width: 100%;