From a964272df2c44407f16a920d37dd56506a521ba2 Mon Sep 17 00:00:00 2001 From: Lisa P Date: Tue, 22 Sep 2015 17:49:11 +0200 Subject: [PATCH] change some styles on dashboard --- app/routes/dashboard/repositories.coffee | 2 +- app/styles/app/layouts/dashboard.sass | 22 ++++++++++--- app/styles/app/modules/dropdown.sass | 9 ++++-- app/styles/app/modules/icons.sass | 2 +- app/templates/components/dashboard-row.hbs | 36 ++++++++++------------ app/templates/dashboard/repositories.hbs | 2 +- 6 files changed, 44 insertions(+), 29 deletions(-) diff --git a/app/routes/dashboard/repositories.coffee b/app/routes/dashboard/repositories.coffee index 93976fd5..252f9a6a 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=build.commit', { + $.ajax(apiEndpoint + '/v3/repos?repository.active=true&include=user.repositories,organization.repositories,build.commit', { headers: { Authorization: 'token ' + @auth.token() } diff --git a/app/styles/app/layouts/dashboard.sass b/app/styles/app/layouts/dashboard.sass index 5a8aec0a..58e56f48 100644 --- a/app/styles/app/layouts/dashboard.sass +++ b/app/styles/app/layouts/dashboard.sass @@ -11,12 +11,13 @@ margin: auto max-width: 1024px -.dashboard-active li - +.dashboard-active padding: 0 - margin: 0 + margin: 3rem 0 5rem list-style-type: none +.dashboard-active li + border: 1px solid $cream-dark font-size: 16px text-align: left @@ -39,8 +40,11 @@ font-size: 16px h2 - padding-left: 1.5em font-size: 18px + .one-line + margin-left: 2em + .two-line + padding: .1em 0 .row-item margin: .2em @@ -71,6 +75,16 @@ & > div:nth-of-type(5) width: 10% + h2 + padding-left: 1.5em + .one-line + margin-left: 0 + + .dropup--blue + li + border: none + transform: translate(-19%, -170%) + @include statusColors($green-dark, 'passed') @include statusColors($red-dark, 'failed') diff --git a/app/styles/app/modules/dropdown.sass b/app/styles/app/modules/dropdown.sass index 1f1ea8a1..ee34d863 100644 --- a/app/styles/app/modules/dropdown.sass +++ b/app/styles/app/modules/dropdown.sass @@ -55,6 +55,8 @@ $dropdown-border: #C3D9DB .filter-current padding: .9em 0 cursor: pointer + a + color: $teal-dark .filter-dropdown @include resetul @@ -62,9 +64,10 @@ $dropdown-border: #C3D9DB top: 3em min-width: 14em background-color: $white - border-radius: 4px + border-radius: 2px overflow: hidden - box-shadow: 2px 1px 4px 0px rgba(148,145,138,0.4) + border: 1px solid $cream-dark + border-top: none z-index: 40 display: none li @@ -75,7 +78,7 @@ $dropdown-border: #C3D9DB padding: 10px 10px 10px 20px &:hover color: $white - background : #5e869a + background : $teal-dark .is-selected a font-weight: 600 diff --git a/app/styles/app/modules/icons.sass b/app/styles/app/modules/icons.sass index a31b007c..bab6eaf2 100644 --- a/app/styles/app/modules/icons.sass +++ b/app/styles/app/modules/icons.sass @@ -217,7 +217,7 @@ margin-left : 5px border-left : 5px solid transparent border-right : 5px solid transparent - border-top : 5px solid $dashboard-text-color + border-top : 5px solid $teal-dark .icon-flag background-image: inline-image('svg/notice-flag.svg') diff --git a/app/templates/components/dashboard-row.hbs b/app/templates/components/dashboard-row.hbs index 11c9066f..b5302446 100644 --- a/app/templates/components/dashboard-row.hbs +++ b/app/templates/components/dashboard-row.hbs @@ -1,7 +1,7 @@
-

{{status-icon status=repo.last_build.state}} {{repo.owner.login}}

+

{{status-icon status=repo.default_branch.last_build.state}} {{repo.owner.login}}

{{repo.name}}

@@ -9,10 +9,8 @@
- {{!-- {{#link-to "build" repo.slug repo.default_branch.last_build.id}} --}} - {{request-icon build=repo.last_build}} - #{{repo.last_build.number}} {{repo.last_build.state}} on {{repo.default_branch.name}} - {{!-- {{/link-to}} --}} + {{request-icon build=repo.default_branch.last_build}} + #{{repo.default_branch.last_build.number}} {{repo.default_branch.last_build.state}} on {{repo.default_branch.name}}
@@ -47,7 +45,9 @@ - {{format-sha repo.last_build.commit.sha}} + + {{format-sha repo.default_branch.last_build.commit.sha}} + @@ -55,7 +55,7 @@
-
+
@@ -73,8 +73,8 @@ - {{#if repo.last_build}} - {{format-time repo.last_build.finished_at}} + {{#if repo.default_branch.last_build}} + {{format-time repo.default_branch.last_build.finished_at}} {{else}} - {{/if}} @@ -98,21 +98,19 @@
- {{!--
+
-
--}} +
diff --git a/app/templates/dashboard/repositories.hbs b/app/templates/dashboard/repositories.hbs index 235821f3..622738dc 100644 --- a/app/templates/dashboard/repositories.hbs +++ b/app/templates/dashboard/repositories.hbs @@ -21,7 +21,7 @@ {{dashboard-row repo=repo}} {{/each}} -
+ {{!--
--}}