From 0cf06a606d2a2476ce7e6e7d6287566c3d632406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 26 Apr 2021 15:38:57 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20SWU:=20Disable=20update=20all=20?= =?UTF-8?q?if=20no=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4109 --- .../plugins/softwareupdate/static/js/softwareupdate.js | 6 ++++++ .../softwareupdate/templates/softwareupdate_settings.jinja2 | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js b/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js index 56e8b6f75..ebad30908 100644 --- a/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js +++ b/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js @@ -81,6 +81,12 @@ $(function () { ); }); + self.enableUpdateAll = ko.pureComputed(function () { + return ( + self.enableUpdate() && self.availableAndPossibleAndEnabled().length > 0 + ); + }); + self.enable_configSave = ko.pureComputed(function () { return ( self.config_checkType() === "github_release" || diff --git a/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 b/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 index a769c1fd3..b1263d052 100644 --- a/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 +++ b/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 @@ -71,7 +71,7 @@ {% endtrans %}
- +