From 1b9ff1b0e2571e79cc2caa1587878ae66f4bb708 Mon Sep 17 00:00:00 2001 From: Shawn Bruce Date: Sun, 9 Jul 2017 22:58:35 -0400 Subject: [PATCH] Move terminal command below terminal output and fill the row Clicking terminal output (excluding highlighting) will set focus to terminal command Change fancy functionality style from muted to warning so that it stands out more --- .../static/js/app/viewmodels/terminal.js | 10 ++++++++++ src/octoprint/templates/tabs/terminal.jinja2 | 17 ++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/octoprint/static/js/app/viewmodels/terminal.js b/src/octoprint/static/js/app/viewmodels/terminal.js index 4fdd47e7..d154beb4 100644 --- a/src/octoprint/static/js/app/viewmodels/terminal.js +++ b/src/octoprint/static/js/app/viewmodels/terminal.js @@ -272,6 +272,16 @@ $(function() { } }; + self.gotoTerminalCommand = function() { + // skip if user highlights text. + var sel = getSelection().toString(); + if (sel) { + return; + } + + $("#terminal-command").focus(); + }; + self.toggleAutoscroll = function() { self.autoscrollEnabled(!self.autoscrollEnabled()); }; diff --git a/src/octoprint/templates/tabs/terminal.jinja2 b/src/octoprint/templates/tabs/terminal.jinja2 index b1fd588f..6f8df141 100644 --- a/src/octoprint/templates/tabs/terminal.jinja2 +++ b/src/octoprint/templates/tabs/terminal.jinja2 @@ -1,9 +1,15 @@
-
+
+ {{ _("Scroll to end") }} | {{ _("Select all") }} - +
@@ -14,13 +20,6 @@
-