From 6728a174486eb29d2f393414f312324775be107d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 22 Mar 2022 12:07:59 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20Re-enable=20connect=20dialog=20w?= =?UTF-8?q?/=20no=20serial=20ports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently disabling it if no serial ports are currently known to the client breaks certain workflows for people. So this is a short-term solution to fix things for them, while technically non-sensical (why offer to connect if we don't see anything to connect to?) So in 1.9.0 this should rather be solved by adding some form of platform agnostic (!) auto-refresh, either regular polling while no port is detected, or even watchdog enabled event based refresh. See #4473. --- src/octoprint/static/js/app/viewmodels/connection.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/octoprint/static/js/app/viewmodels/connection.js b/src/octoprint/static/js/app/viewmodels/connection.js index 1bd6b0d98..664c30918 100644 --- a/src/octoprint/static/js/app/viewmodels/connection.js +++ b/src/octoprint/static/js/app/viewmodels/connection.js @@ -40,7 +40,8 @@ $(function () { self.isLoading = ko.observable(undefined); self.enableConnect = ko.pureComputed(function () { - return self.enablePort() || !self.isErrorOrClosed(); + //return self.enablePort() || !self.isErrorOrClosed(); + return true; // enable always for now, until we have an auto refresh in 1.9.0 }); self.buttonText = ko.pureComputed(function () {