From c2226f14f75ef8d31e58fe8b95a505569cefebf4 Mon Sep 17 00:00:00 2001 From: Lisa Passing Date: Mon, 4 May 2015 18:16:50 +0200 Subject: [PATCH] implement all of josh\'s feedback --- app/controllers/owner.coffee | 5 +-- app/styles/app/layouts/owner.sass | 43 ++++++++++++-------- app/templates/components/owner-repo-tile.hbs | 17 ++++---- 3 files changed, 37 insertions(+), 28 deletions(-) diff --git a/app/controllers/owner.coffee b/app/controllers/owner.coffee index 934efcd2..920ec1aa 100644 --- a/app/controllers/owner.coffee +++ b/app/controllers/owner.coffee @@ -33,10 +33,9 @@ Controller = Ember.Controller.extend data = @get('model') repos = data.repositories.filter (item, index) -> - if item.active && item.default_branch.last_build != null + if item.active && item.default_branch.last_build item - console.log(item) - repos.reverse() + repos.sortBy('default_branch.last_build.finished_at').reverse() ).property('model') diff --git a/app/styles/app/layouts/owner.sass b/app/styles/app/layouts/owner.sass index 86ad0fbd..5eaf4066 100644 --- a/app/styles/app/layouts/owner.sass +++ b/app/styles/app/layouts/owner.sass @@ -48,36 +48,45 @@ white-space: nowrap .tile-status .icon-status - margin-top: 1.3em + margin-top: 2.1em + width: 1.2em + height: 1.3em - .tile-single - position: relative + .tile-single, + .tile-double color: $grey1 - p - padding: .1em 0 - line-height: 3em - font-size: $font-size-m - .icon - margin-right: .3em - width: 1em - height: 1.1em - vertical-align: middle - &.icon-github - width: .9em - height: 1.2em + padding: .1em 0 + font-size: $font-size-m + .icon + margin-right: .3em + width: 1em + height: 1.1em + vertical-align: middle + &.icon-github + width: .9em + height: 1.2em + &.push + width: 1.1em + height: .6em + margin: 0 a color: $grey1 &:hover color: $grey1 text-decoration: underline + .tile-single + line-height: 3em + .tile-double + line-height: 1.5em + .tile-main position: relative overflow: hidden &:after content: "" @include fadeOut(right, -90deg, $cream-light, 20%) - & ~ .tile-single + & ~ div @media #{$medium-up} padding-left: 2em border-left: 1px solid $grey4 @@ -89,4 +98,4 @@ margin-bottom: 1.5rem @media #{$medium-up} height: 2.2em - border-bottom: solid 2px $grey4 \ No newline at end of file + border-bottom: solid 2px $grey4 diff --git a/app/templates/components/owner-repo-tile.hbs b/app/templates/components/owner-repo-tile.hbs index 27929e74..5fbdfe71 100644 --- a/app/templates/components/owner-repo-tile.hbs +++ b/app/templates/components/owner-repo-tile.hbs @@ -3,31 +3,32 @@ {{/if}}
-

{{ownerName}}

{{#link-to "repo" ownerName repoName }}{{repoName}}{{/link-to}}

-
+
{{#if repo.default_branch.last_build}} -

+

{{#link-to "build" ownerName repoName repo.default_branch.last_build.number}} {{!-- {{repo.last_build.number}} {{repo.last_build.state}} --}} {{repo.default_branch.last_build.number}} {{repo.default_branch.last_build.state}} {{/link-to}}

-
+
-

{{repo.default_branch.name}}

-

+

+ + {{repo.default_branch.name}}

+

{{format-sha repo.default_branch.last_build.commit.sha}}

-

+

{{format-duration repo.default_branch.last_build.duration}}

-

+

{{format-time repo.default_branch.last_build.finished_at}}