diff --git a/app/components/branch-row.coffee b/app/components/branch-row.coffee index d6759804..fc702671 100644 --- a/app/components/branch-row.coffee +++ b/app/components/branch-row.coffee @@ -1,5 +1,19 @@ `import Ember from 'ember'` +`import { gravatarImage } from 'travis/utils/urls'` +`import { githubCommit as githubCommitUrl } from 'travis/utils/urls'` -BranchRowComponent = Ember.Component.extend() +BranchRowComponent = Ember.Component.extend + + tagName: 'li' + classNameBindings: ['build.state'] + classNames: ['branch-row'] + + urlAuthorGravatarImage: (-> + gravatarImage(@get('build.commit.authorEmail'), 15) + ).property('build.commit.authorEmail') + + urlGithubCommit: (-> + githubCommitUrl(@get('build.repo.slug'), @get('build.commit.sha')) + ).property('build.commit.sha') `export default BranchRowComponent` diff --git a/app/styles/app/layouts/branches.sass b/app/styles/app/layouts/branches.sass index b71b2afd..63dfdda9 100644 --- a/app/styles/app/layouts/branches.sass +++ b/app/styles/app/layouts/branches.sass @@ -1,8 +1,35 @@ +@mixin statusColors($color, $status) + &.#{$status} + background: linear-gradient(to right, $color 0%, $color 9px, transparent 10px, transparent 100%) no-repeat + .branch-name, + .branch-request a + color: $color + &:hover + border-color: $color + +@mixin buildTileColors($color, $bg, $status) + .#{$status} + background-color: $bg + a + color: $color + @media #{$medium-up} + .dropup--status + border-color: $color + &:before + background-color: $bg + +.tabbody + ul + padding: 0 + margin: 0 + list-style: none .branch-row border: 1px solid $cream-dark font-size: 16px text-align: right + margin-bottom: .3rem + color: $grey-dark span width: 1em @@ -13,14 +40,16 @@ vertical-align: middle .avatar - border-radius: 50% + width: 15px margin-right: .5em + border-radius: 50% vertical-align: middle .row-item margin: .2em font-size: 16px font-weight: 400 + white-space: nowrap a color: $grey-dark text-decoration: none @@ -39,6 +68,16 @@ & > div:nth-of-type(5) width: 26% + @include statusColors($green-dark, 'passed') + @include statusColors($red-dark, 'failed') + @include statusColors($red-dark, 'errored') + @include statusColors($grey-medium, 'canceled') + @include statusColors(#ECCE4B, 'started') + @include statusColors(#ECCE4B, 'queued') + @include statusColors(#ECCE4B, 'booting') + @include statusColors(#ECCE4B, 'received') + @include statusColors(#ECCE4B, 'created') + %row-element vertical-align: middle @@ -144,7 +183,7 @@ padding: 1em 0 .build-tiles - height: 4.8rem + height: 5.6rem margin: 0 padding: 0 list-style: none @@ -153,7 +192,6 @@ display: inline-block height: 100% width: 18.8% - background-color: #999 .icon-status position: absolute top: 0 @@ -168,4 +206,14 @@ height: 100% text-align: center + @include buildTileColors(#44A662, #F5FBF6, 'passed') + @include buildTileColors(#D94341, #FFF7F5, 'failed') + @include buildTileColors(#D94341, #FFF7F5, 'errored') + @include buildTileColors(#A1A0A0, #F5F5F5, 'canceled') + @include buildTileColors(#ECCE4B, #eeeeee, 'started') + @include buildTileColors(#ECCE4B, #eeeeee, 'queued') + @include buildTileColors(#ECCE4B, #eeeeee, 'booting') + @include buildTileColors(#ECCE4B, #eeeeee, 'received') + @include buildTileColors(#ECCE4B, #eeeeee, 'created') + diff --git a/app/templates/builds.hbs b/app/templates/builds.hbs index 95670fc6..6c2d69de 100644 --- a/app/templates/builds.hbs +++ b/app/templates/builds.hbs @@ -1,15 +1,17 @@ {{#if content.isLoaded}} - {{#each controller as |build|}} +
{{show-more-button isLoading=isLoading showMore=(action 'showMoreBuilds')}} diff --git a/app/templates/components/branch-row.hbs b/app/templates/components/branch-row.hbs index 669b6ab8..b6d176ea 100644 --- a/app/templates/components/branch-row.hbs +++ b/app/templates/components/branch-row.hbs @@ -1,68 +1,75 @@ -