Skip to content

Commit

Permalink
Moves toggle to inside
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Jun 30, 2023
1 parent 2c860e9 commit 534bf39
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion ui/app/styles/components/boxed-section.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,13 @@
.header-toggle {
display: inline-block;
position: relative;
top: $control-padding-vertical;
top: 0.2em;
margin-left: $control-padding-horizontal;
margin-right: $control-padding-horizontal;
}

&.task-log-head .header-toggle {
top: 0.5em;
}
}

Expand Down
12 changes: 6 additions & 6 deletions ui/app/templates/components/task-log.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,12 @@
</div>
</div>
{{/if}}
<div class="boxed-section-head">
<div class="boxed-section-head task-log-head">
<span>
<button data-test-log-action="stdout" class="button {{if (eq this.mode "stdout") "is-info"}}" {{action "setMode" "stdout"}} type="button">stdout</button>
<button data-test-log-action="stderr" class="button {{if (eq this.mode "stderr") "is-danger"}}" {{action "setMode" "stderr"}} type="button">stderr</button>
</span>
<span class="pull-right">
<button data-test-log-action="head" class="button is-white" onclick={{action "gotoHead"}} type="button">Head</button>
<button data-test-log-action="tail" class="button is-white" onclick={{action "gotoTail"}} type="button">Tail</button>
<button data-test-log-action="toggle-stream" class="button is-white" onclick={{action "toggleStream"}} type="button" title="{{if this.logger.isStreaming "Stop" "Start"}} log streaming">
{{x-icon (if this.logger.isStreaming "media-pause" "media-play") class="is-text"}}
</button>
<span class="header-toggle">
<Hds::Form::Toggle::Field
{{keyboard-shortcut label="Toggle word wrap" action=(action "toggleWrap") pattern=(array "w" "w") menuLevel=true }}
Expand All @@ -36,6 +31,11 @@
<F.Label>Word Wrap</F.Label>
</Hds::Form::Toggle::Field>
</span>
<button data-test-log-action="head" class="button is-white" onclick={{action "gotoHead"}} type="button">Head</button>
<button data-test-log-action="tail" class="button is-white" onclick={{action "gotoTail"}} type="button">Tail</button>
<button data-test-log-action="toggle-stream" class="button is-white" onclick={{action "toggleStream"}} type="button" title="{{if this.logger.isStreaming "Stop" "Start"}} log streaming">
{{x-icon (if this.logger.isStreaming "media-pause" "media-play") class="is-text"}}
</button>
</span>
</div>
<div data-test-log-box class="boxed-section-body is-dark is-full-bleed">
Expand Down

0 comments on commit 534bf39

Please sign in to comment.