From d2b7a7c10b612fd162557a03bd4d033f1f7f9d0b Mon Sep 17 00:00:00 2001 From: Martin Muehlhaeuser Date: Tue, 23 Jan 2018 18:45:55 +0000 Subject: [PATCH] views: Cleaned up status display --- octoprint_klipper/__init__.py | 2 +- octoprint_klipper/static/js/klipper.js | 2 +- octoprint_klipper/templates/klipper_navbar.jinja2 | 2 +- octoprint_klipper/templates/klipper_sidebar.jinja2 | 2 -- octoprint_klipper/templates/klipper_tab.jinja2 | 1 - 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/octoprint_klipper/__init__.py b/octoprint_klipper/__init__.py index 064ab47..f8fb350 100644 --- a/octoprint_klipper/__init__.py +++ b/octoprint_klipper/__init__.py @@ -25,7 +25,7 @@ class KlipperPlugin( def get_template_configs(self): return [ - dict(type="navbar", custom_bindings=False), + dict(type="navbar", custom_bindings=True), dict(type="settings", custom_bindings=True), dict(type="sidebar", custom_bindings=True, diff --git a/octoprint_klipper/static/js/klipper.js b/octoprint_klipper/static/js/klipper.js index fd5ec4d..77a6344 100644 --- a/octoprint_klipper/static/js/klipper.js +++ b/octoprint_klipper/static/js/klipper.js @@ -133,6 +133,6 @@ $(function() { dependencies: ["settingsViewModel", "loginStateViewModel", "connectionViewModel"], // elements this view model will be bound to. - elements: ["#tab_plugin_klipper", "#sidebar_plugin_klipper", "#settings_plugin_klipper"] + elements: ["#tab_plugin_klipper", "#sidebar_plugin_klipper", "#settings_plugin_klipper", "#navbar_plugin_klipper"] }); }); \ No newline at end of file diff --git a/octoprint_klipper/templates/klipper_navbar.jinja2 b/octoprint_klipper/templates/klipper_navbar.jinja2 index 83e79b2..96e5bde 100644 --- a/octoprint_klipper/templates/klipper_navbar.jinja2 +++ b/octoprint_klipper/templates/klipper_navbar.jinja2 @@ -1 +1 @@ -Status: Connected +Idle \ No newline at end of file diff --git a/octoprint_klipper/templates/klipper_sidebar.jinja2 b/octoprint_klipper/templates/klipper_sidebar.jinja2 index 32bced1..0d15d67 100644 --- a/octoprint_klipper/templates/klipper_sidebar.jinja2 +++ b/octoprint_klipper/templates/klipper_sidebar.jinja2 @@ -1,5 +1,3 @@ - -