diff --git a/app/components/dashboard-row.js b/app/components/dashboard-row.js index 96e6c625..c0bf2cc6 100644 --- a/app/components/dashboard-row.js +++ b/app/components/dashboard-row.js @@ -5,7 +5,7 @@ import { hasAdminPermission, hasPushPermission } from 'travis/utils/permission'; export default Ember.Component.extend({ tagName: 'li', - classNameBindings: ['repo.default_branch.last_build.state'], + classNameBindings: ['repo.default_branch.last_build.state', 'repo.active:is-active'], classNames: ['rows', 'rows--dashboard'], isLoading: false, isTriggering: false, diff --git a/app/controllers/dashboard/repositories.js b/app/controllers/dashboard/repositories.js index 2d648699..778c2d09 100644 --- a/app/controllers/dashboard/repositories.js +++ b/app/controllers/dashboard/repositories.js @@ -28,6 +28,7 @@ export default Ember.Controller.extend({ return item.slug.match(new RegExp(filter)); }); } + this.inactive(); }.property('filter', 'model', 'org'), updateFilter() { diff --git a/app/routes/dashboard/repositories.js b/app/routes/dashboard/repositories.js index e283ee93..66bcdb17 100644 --- a/app/routes/dashboard/repositories.js +++ b/app/routes/dashboard/repositories.js @@ -12,7 +12,7 @@ export default TravisRoute.extend({ model() { var apiEndpoint; apiEndpoint = config.apiEndpoint; - return $.ajax(apiEndpoint + '/v3/repos?repository.active=true&include=repository.default_branch,build.commit', { + return $.ajax(apiEndpoint + '/v3/repos?repository.active=false&include=repository.default_branch,build.commit', { headers: { Authorization: 'token ' + this.auth.token() } diff --git a/app/styles/app/layouts/dashboard.sass b/app/styles/app/layouts/dashboard.sass index 829d7e51..4f688567 100644 --- a/app/styles/app/layouts/dashboard.sass +++ b/app/styles/app/layouts/dashboard.sass @@ -47,6 +47,7 @@ fill: $canary-yellow .dash-header + position: relative order: 2 flex: 0 0 20% @@ -102,9 +103,9 @@ .dash-last-build display: flex order: 4 - flex: 0 0 55% + flex: 1 0 30% flex-flow: row nowrap - justify-content: space-between + justify-content: flex-start @media #{$small-only} margin-top: 2em @@ -114,3 +115,17 @@ > div flex: 0 0 33% + +.dash-button + order: 5 + +.activate-repo-button + @extend %button + background-color: $pebble-grey + color: $cement-grey + font-size: 14px + cursor: default + &.is-active:hover + background-color: $turf-green + color: white + cursor: pointer diff --git a/app/styles/app/modules/row.sass b/app/styles/app/modules/row.sass index 2d48ffac..1c0a8f17 100644 --- a/app/styles/app/modules/row.sass +++ b/app/styles/app/modules/row.sass @@ -16,8 +16,9 @@ display: flex flex-flow: column wrap margin-bottom: 1rem - @each $key, $value in $stateMap - +rowColor(#{$key}, map-get($value, color)) + &.is-active + @each $key, $value in $stateMap + +rowColor(#{$key}, map-get($value, color)) @media #{$medium-up} position: relative diff --git a/app/styles/app/modules/tooltips.sass b/app/styles/app/modules/tooltips.sass index 715b94cc..bc6309bf 100644 --- a/app/styles/app/modules/tooltips.sass +++ b/app/styles/app/modules/tooltips.sass @@ -123,3 +123,51 @@ white-space: normal &:before right: .8em + + +// trying to rewrite + +$tooltip-spacing: 4em +$tooltip-arrow-width: 1em + +[data-tooltip] + position: relative + background-color: pink + &:after + content: attr(data-tooltip) + display: block + position: absolute + background: $asphalt-grey + padding: 0.5em + color: white + border-radius: 2px + bottom: $tooltip-spacing + left: 0 + right: 0 + white-space: normal + margin: auto + font-size: 12px + &:before + content: "" + display: block + width: $tooltip-arrow-width + height: $tooltip-arrow-width + transform: rotate(45deg) + position: absolute + left: 0 + right: 0 + bottom: $tooltip-spacing - $tooltip-arrow-width + margin: auto + background-color: $asphalt-grey + + &:after, + &:before + display: none + + &:hover, + &:active + &:after, + &:before + display: block + + diff --git a/app/templates/components/dashboard-row.hbs b/app/templates/components/dashboard-row.hbs index 97ef60e4..92d35b05 100644 --- a/app/templates/components/dashboard-row.hbs +++ b/app/templates/components/dashboard-row.hbs @@ -24,12 +24,14 @@
{{request-icon event=repo.default_branch.last_build.event_type state=repo.default_branch.last_build.state}} {{repo.default_branch.name}} - {{#if repo.default_branch.last_build.state}}is {{repo.default_branch.last_build.state}}{{/if}} + {{#if repo.active}}is {{repo.default_branch.last_build.state}}{{/if}}
-{{#if repo.default_branch.last_build}} + {{#if repo.default_branch.last_build}}@@ -39,6 +41,8 @@ {{/link-to}}
@@ -63,8 +67,10 @@