implement all of josh\'s feedback

This commit is contained in:
Lisa Passing 2015-05-04 18:16:50 +02:00
parent fe13a44237
commit c2226f14f7
3 changed files with 37 additions and 28 deletions

View File

@ -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')

View File

@ -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
border-bottom: solid 2px $grey4

View File

@ -3,31 +3,32 @@
{{/if}}
<div class="tile-status">
<span {{bind-attr class=":icon :icon-status repo.default_branch.last_build.state"}}></span>
<span {{bind-attr class=":icon :request-kind repo.default_branch.last_build.event_type"}}></span>
</div>
<div class="tile-main tile-header column medium-3">
<h3>{{ownerName}}</h3>
<h2>{{#link-to "repo" ownerName repoName }}{{repoName}}{{/link-to}}</h2>
</div>
<div class="tile-single column medium-9 end">
<div class="column medium-9 end">
{{#if repo.default_branch.last_build}}
<p class="tile-job build-status column medium-3 small-6"><span class="icon icon-hash"></span>
<p class="tile-single tile-job build-status column medium-4 small-6"><span class="icon icon-hash"></span>
{{#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}}</p>
<div class="column medium-9">
<div class="column medium-8 tile-double">
<div class="column medium-6">
<p>{{repo.default_branch.name}}</p>
<p class="tile-commit column medium-3 small-6">
<p class="tile-branch">
<span {{bind-attr class=":icon :icon--grey :request-kind repo.default_branch.last_build.event_type"}}></span>
{{repo.default_branch.name}}</p>
<p class="tile-commit">
<span class="icon icon-github"></span><a {{bind-attr href="repo.default_branch.last_build.commit.compare_url"}}>{{format-sha repo.default_branch.last_build.commit.sha}}</a></p>
</div>
<div class="column medium-6">
<p class="tile-duration column medium-3 small-6">
<p class="tile-duration">
<span class="icon icon-clock"></span>
{{format-duration repo.default_branch.last_build.duration}}</p>
<p class="tile-timeago column medium-2 small-6">
<p class="tile-timeago">
<span class="icon icon-cal"></span>
{{format-time repo.default_branch.last_build.finished_at}}</p>
</div>