diff --git a/esphome/dashboard/static/esphome.css b/esphome/dashboard/static/esphome.css index baf92e42b1..c0cf46ecf4 100644 --- a/esphome/dashboard/static/esphome.css +++ b/esphome/dashboard/static/esphome.css @@ -46,17 +46,8 @@ i.very-large { font-family: "SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace; } -.autoscroll { - display: flex; - flex-direction: column-reverse; - flex-basis: auto; -} - -.autoscroll div { - flex-basis: 100%; -} - .log { + max-height: calc(100% - 56px); background-color: #1c1c1c; margin-top: 0; margin-bottom: 0; @@ -161,6 +152,10 @@ ul.stepper:not(.horizontal) .step.active::before, ul.stepper:not(.horizontal) .s height: auto !important; } +.tap-target-wrapper { + position: fixed !important; +} + /* https://github.com/tnhu/status-indicator/blob/master/styles.css */ .status-indicator .status-indicator-icon { display: inline-block; @@ -223,9 +218,8 @@ ul.stepper:not(.horizontal) .step.active::before, ul.stepper:not(.horizontal) .s #editor { margin-top: 0; margin-bottom: 0; - padding: 16px; border-radius: 3px; - height: 100% + height: calc(100% - 56px); } .update-available i { diff --git a/esphome/dashboard/static/esphome.js b/esphome/dashboard/static/esphome.js index efc81354ff..ca33231a06 100644 --- a/esphome/dashboard/static/esphome.js +++ b/esphome/dashboard/static/esphome.js @@ -168,6 +168,7 @@ const colorReplace = (pre, state, text) => { } } addSpan(text.substring(i)); + scrollToBottomOfElement(pre); }; const removeUpdateAvailable = (filename) => { @@ -700,4 +701,15 @@ const startWizard = () => { }); }; +const scrollToBottomOfElement = (element) => { + var atBottom = false; + if (element.scrollTop + 30 >= (element.scrollHeight - element.offsetHeight)) { + atBottom = true; + } + + if (atBottom) { + element.scrollTop = element.scrollHeight; + } +} + setupWizardStart.addEventListener('click', startWizard); \ No newline at end of file diff --git a/esphome/dashboard/templates/index.html b/esphome/dashboard/templates/index.html index d5ecce17d6..dfabd278d2 100644 --- a/esphome/dashboard/templates/index.html +++ b/esphome/dashboard/templates/index.html @@ -93,15 +93,9 @@