diff --git a/app/components/log-content.js b/app/components/log-content.js index 14110bc4..c557734d 100644 --- a/app/components/log-content.js +++ b/app/components/log-content.js @@ -60,6 +60,7 @@ Object.defineProperty(Log.Limit.prototype, 'limited', { export default Ember.Component.extend({ popup: Ember.inject.service(), + logIsVisible: false, currentUserBinding: 'auth.currentUser', didInsertElement() { @@ -220,6 +221,10 @@ export default Ember.Component.extend({ this.get('popup').open('remove-log-popup'); return false; } + }, + + toggleLog() { + this.toggleProperty('ligIsVisible'); } }, diff --git a/app/styles/app.scss b/app/styles/app.scss index 68e88824..dd07d913 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -14,7 +14,6 @@ @import "app/userlike"; -@import "app/main/log"; @import "app/misc"; @import "app/popup"; @@ -57,6 +56,7 @@ @import "app/layouts/repo"; @import "app/layouts/jobs"; @import "app/layouts/pull-requests"; +@import "app/main/log"; @import "app/layouts/requests"; @import "app/layouts/caches"; diff --git a/app/styles/app/main/log.sass b/app/styles/app/main/log.sass index 890dff13..d3fa9fcd 100644 --- a/app/styles/app/main/log.sass +++ b/app/styles/app/main/log.sass @@ -41,18 +41,18 @@ .tail-status position: relative display: inline-block - height: 20px; - width: 20px; + height: 20px + width: 20px vertical-align: middle background-color: $grey-light - border-radius: 50%; + border-radius: 50% &:after content: "" display: block - height: 10px; - width: 10px; - background: #f1f1f1; - border-radius: 50%; + height: 10px + width: 10px + background: #f1f1f1 + border-radius: 50% @extend %absolute-center &.active .tail-status @@ -81,13 +81,41 @@ a margin-left: .4em +.log-main + display: none + &.is-visible + display: block + @media #{$medium-up} + display: block + +[class^="toggle-log-button"] + @media #{$medium-up} + display: none !important + +.toggle-log-button + border: 1px solid $grey + padding: .5em 1em + border-radius: 2px + display: block + text-align: center + &.hidden + display: none + &:hover, + &:active + background: $grey + color: white + +.toggle-log-button--dark + @extend %log-button + @extend %icon-line-eye + background-size: auto 21px; + background-position: 6px 2px; + &:hover, + &:active + background-color: #999a98 + .log-body position: relative - max-height: 20vh - overflow: scroll - @media #{$medium-up} - max-height: none - overflow: auto pre clear: left diff --git a/app/styles/app/modules/buttons.sass b/app/styles/app/modules/buttons.sass index 9b51f96b..1825d03c 100644 --- a/app/styles/app/modules/buttons.sass +++ b/app/styles/app/modules/buttons.sass @@ -196,6 +196,9 @@ $button-border-color: #d4d4d4 &:hover, &:active background-color: #d94341 + display: none + @media #{$medium-up} + display: inline-block .download-log-button @extend %log-button diff --git a/app/templates/components/log-content.hbs b/app/templates/components/log-content.hbs index a71c5d2e..baa6cdae 100644 --- a/app/templates/components/log-content.hbs +++ b/app/templates/components/log-content.hbs @@ -1,5 +1,7 @@ {{remove-log-popup job=job}} + +
{{#if auth.signedIn}} @@ -28,13 +30,16 @@
Hang tight, the log cannot be shown until the build has started.
{{/if}} -
- + View log + +
+
+ Hide log {{#if canRemoveLog}} Remove log {{/if}} - Download log -
+ Raw log +
{{#if showTailing}}