diff --git a/app/components/landing-row.coffee b/app/components/landing-row.coffee new file mode 100644 index 00000000..cdc405a8 --- /dev/null +++ b/app/components/landing-row.coffee @@ -0,0 +1,12 @@ +`import Ember from 'ember'` +`import { githubCommit as githubCommitUrl } from 'travis/utils/urls'` +`import TravisRoute from 'travis/routes/basic'` +`import config from 'travis/config/environment'` + +LandingRowComponent = Ember.Component.extend + + tagName: 'li' + classNameBindings: ['repo.lastBuildState'] + classNames: ['landing-row', 'row-li'] + +`export default LandingRowComponent` diff --git a/app/routes/dashboard/repositories.coffee b/app/routes/dashboard/repositories.coffee index 252f9a6a..93976fd5 100644 --- a/app/routes/dashboard/repositories.coffee +++ b/app/routes/dashboard/repositories.coffee @@ -7,7 +7,7 @@ Route = TravisRoute.extend filter: { replace: true } model: -> apiEndpoint = config.apiEndpoint - $.ajax(apiEndpoint + '/v3/repos?repository.active=true&include=user.repositories,organization.repositories,build.commit', { + $.ajax(apiEndpoint + '/v3/repos?repository.active=true&include=build.commit', { headers: { Authorization: 'token ' + @auth.token() } diff --git a/app/styles/app/landing.sass b/app/styles/app/landing.sass index fce7bb90..3af2d3c2 100644 --- a/app/styles/app/landing.sass +++ b/app/styles/app/landing.sass @@ -462,41 +462,17 @@ overflow: auto transform: translateY(7%) - -.tiles-landing - .db - padding: .4em 0 - background-color: $white - border-radius: 4px - p - font-size: $font-size-m - line-height: 1.6 - color: #828282 - .db-controls - padding-left: 3.7rem - .icon - width: 1em - height: 1.1em - .icon-branch - width: 1.2em - height: .7em - .db-status - .icon - width: 1.2em - height: 1.2em - .db-repo - padding-left: 3.7rem - h2 - font-size: 22px - line-height: 25px - margin-bottom: .5em - .db-job, .db-branch, .db-commit, .db-timeago - padding-left: 1.4em - .db-job a - color: #828282 !important - &:hover - text-decoration: underline - .landing-page .navigation-nested background-color: $white + +.landing-rows + list-style: none + margin: 0 + +.landing-row + .two-line + padding-left: 2rem + h2 + padding-left: .5rem + font-size: 18px diff --git a/app/styles/app/modules/row.sass b/app/styles/app/modules/row.sass index 66fe4670..06fd5619 100644 --- a/app/styles/app/modules/row.sass +++ b/app/styles/app/modules/row.sass @@ -18,6 +18,14 @@ color: $grey-dark background: linear-gradient(to right, #CACECE 0%, #CACECE 9px, white 10px, white 100%) no-repeat + h2, h3 + margin: 0 + font-weight: $font-weight-normal + font-size: 16px + + .row-header + width: 100% + .row-item margin: .2em font-size: 16px @@ -30,10 +38,7 @@ text-decoration: none &:hover text-decoration: underline - h2, h3 - margin: 0 - font-weight: $font-weight-normal - font-size: 16px + @media #{$medium-up} display: inline-block padding-left: 0 @@ -79,4 +84,4 @@ @include statusColors(#bfb502, 'queued', #e5da3f) @include statusColors(#bfb502, 'booting', #e5da3f) @include statusColors(#bfb502, 'received', #e5da3f) - @include statusColors(#bfb502, 'created', #e5da3f) \ No newline at end of file + @include statusColors(#bfb502, 'created', #e5da3f) diff --git a/app/templates/components/landing-row.hbs b/app/templates/components/landing-row.hbs new file mode 100644 index 00000000..b1ee129c --- /dev/null +++ b/app/templates/components/landing-row.hbs @@ -0,0 +1,108 @@ + +
+
+

{{#link-to "owner" repo.owner}} + {{status-icon status=repo.lastBuildState}} + {{repo.owner}}{{/link-to}} +

+

{{#link-to "repo" repo.owner repo.name}} + {{repo.name}} + {{/link-to}} +

+
+
+ +
+
+
+ {{#link-to "build" repo repo.lastBuildId}} + + + + + + + {{repo.lastBuildNumber}} {{repo.lastBuildState}} + {{/link-to}} +
+
+ +
+
+ + + + + + + + + + + {{landing-page-last-build-time repo.lastBuildFinishedAt}} +
+
+
+ +
+
+
+ + + + + + + + + {{format-sha repo.lastBuild.commit.sha}} +
+
+
+
+ + + + + + + {{repo.lastBuild.commit.branch}} +
+
+
diff --git a/app/templates/home.hbs b/app/templates/home.hbs index f9322a87..cc41929d 100644 --- a/app/templates/home.hbs +++ b/app/templates/home.hbs @@ -51,35 +51,9 @@
-