From cb9a1b4f7fb90e22d28f6d6c3a20e876969bc67b Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 6 Feb 2015 12:08:42 -0500 Subject: [PATCH] Better spinners --- src/ContainerDetails.react.js | 1 - src/ContainerList.react.js | 4 ++-- src/ContainerListItem.react.js | 2 +- src/Containers.react.js | 1 - src/NewContainer.react.js | 43 ++++++++++++++++++---------------- styles/containers.less | 35 ++++++++++++++++++--------- styles/main.less | 1 - styles/radial.less | 5 ++-- 8 files changed, 52 insertions(+), 40 deletions(-) diff --git a/src/ContainerDetails.react.js b/src/ContainerDetails.react.js index 39183fc230..e11f4d2092 100644 --- a/src/ContainerDetails.react.js +++ b/src/ContainerDetails.react.js @@ -418,7 +418,6 @@ var ContainerDetails = React.createClass({ if (this.state.progress) { body = (
-

Downloading

); diff --git a/src/ContainerList.react.js b/src/ContainerList.react.js index 7998ab347d..082bef2699 100644 --- a/src/ContainerList.react.js +++ b/src/ContainerList.react.js @@ -10,12 +10,12 @@ var ContainerList = React.createClass({ var self = this; var containers = this.props.containers.map(function (container) { return ( - + ); }); return (
    - + {containers}
); diff --git a/src/ContainerListItem.react.js b/src/ContainerListItem.react.js index 96baaa8b6e..175def45c8 100644 --- a/src/ContainerListItem.react.js +++ b/src/ContainerListItem.react.js @@ -66,7 +66,7 @@ var ContainerListItem = React.createClass({ } return ( - +
  • {state}
    diff --git a/src/Containers.react.js b/src/Containers.react.js index 81070e7ba2..11b6a3f177 100644 --- a/src/Containers.react.js +++ b/src/Containers.react.js @@ -61,7 +61,6 @@ var Containers = React.createClass({ } }, handleNewContainer: function () { - console.log($(this.getDOMNode()).find('.new-container-item')); $(this.getDOMNode()).find('.new-container-item').parent().fadeIn(); this.transitionTo('new'); }, diff --git a/src/NewContainer.react.js b/src/NewContainer.react.js index 3fbe6ac05c..d6512783ea 100644 --- a/src/NewContainer.react.js +++ b/src/NewContainer.react.js @@ -2,6 +2,7 @@ var $ = require('jquery'); var React = require('react/addons'); var RetinaImage = require('react-retina-image'); var ContainerStore = require('./ContainerStore'); +var Radial = require('./Radial.react'); var assign = require('object-assign'); var NewContainer = React.createClass({ @@ -118,10 +119,16 @@ var NewContainer = React.createClass({ var logoStyle = { backgroundImage: `linear-gradient(-180deg, ${r.gradient_start} 4%, ${r.gradient_end} 100%)` }; + var imgsrc; + if (r.img) { + imgsrc = `https://kitematic.com/recommended/${r.img}`; + } else { + imgsrc = 'https://kitematic.com/recommended/kitematic_html.png'; + } return (
    - +
    @@ -156,9 +163,7 @@ var NewContainer = React.createClass({ } else { results = (
    -

    - No Results -

    +
    ); } @@ -174,24 +179,22 @@ var NewContainer = React.createClass({ }); return (
    -
    -
    -
    -
    - Pick an image to create new container. -
    -
    -
    - -
    - -
    +
    +
    +
    + Pick an image to create new container. +
    +
    +
    + +
    +
    -
    -

    {title}

    - {results} -
    +
    +
    +

    {title}

    + {results}
    diff --git a/styles/containers.less b/styles/containers.less index 052b3d5c40..5fafe40909 100644 --- a/styles/containers.less +++ b/styles/containers.less @@ -23,10 +23,17 @@ display: flex; flex-flow: row wrap; justify-content: flex-start; - margin-top: 20px; + margin-top: 10px; overflow: auto; .image-item { display: flex; + width: 320px; + height: 170px; + border-radius: 4px; + border: 1px solid @gray-lightest; + background-color: white; + margin-right: 20px; + margin-bottom: 20px; .logo { flex: 1 auto; min-width: 90px; @@ -113,22 +120,28 @@ bottom: 0px; } } - width: 320px; - height: 170px; - border-radius: 4px; - border: 1px solid @gray-lightest; - background-color: white; - margin-right: 20px; - margin-bottom: 20px; } } .new-container { + display: flex; + flex: 1 auto; + flex-direction: column; padding: 35px 20px 32px 25px; - .new-container-header { - margin-bottom: 28px; + .results { display: flex; - flex: 1; + flex-direction: column; + flex: 1 auto; + .no-results { + flex: 1 auto; + display: flex; + align-items: center; + } + } + .new-container-header { + margin-bottom: 8px; + display: flex; + flex: 0 auto; .text { flex: 1 auto; width: 50%; diff --git a/styles/main.less b/styles/main.less index 1c23e621c5..55c669b146 100644 --- a/styles/main.less +++ b/styles/main.less @@ -15,7 +15,6 @@ html, body { height: 100%; width: 100%; overflow: hidden; - -webkit-font-smoothing: antialiased; -webkit-user-select: none; font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; diff --git a/styles/radial.less b/styles/radial.less index 4e989d16f8..4f68f23bfc 100644 --- a/styles/radial.less +++ b/styles/radial.less @@ -12,12 +12,12 @@ .radial-progress { &.radial-spinner { - -webkit-animation: rotating 2.4s linear infinite; + -webkit-animation: rotating 1.6s linear infinite; } @circle-size: 140px; @circle-background: #F2F2F2; - @inset-size: 136px; + @inset-size: @circle-size - 4; @inset-color: white; @transition-length: 1s; // @percentage-color: #3FD899; @@ -28,7 +28,6 @@ width: @circle-size; height: @circle-size; - background-color: @circle-background; border-radius: 100%; .circle { .mask, .fill, .shadow {