Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Z-Bolt/OctoScreen.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffB42 <10328858+JeffB42@users.noreply.github.com>2021-02-27 21:23:50 +0300
committerJeffB42 <10328858+JeffB42@users.noreply.github.com>2021-02-27 21:23:50 +0300
commita6c5db2f580ef189864986843c8137f2826eef49 (patch)
tree2fd854036b811355adab0391e9913d0ceb8ff6ab
parent3d57adee7937e6b005cb88f3012adb84880d7931 (diff)
updated the setting of OctoPrintPluginIsAvailable
-rwxr-xr-xui/ui.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 4c4b468..03d989e 100755
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -58,7 +58,7 @@ func New(endpoint, key string, width, height int) *UI {
PanelHistory: stack.New(),
Client: octoprintApis.NewClient(endpoint, key),
NotificationsBox: uiWidgets.NewNotificationsBox(),
- OctoPrintPluginIsAvailable: true,
+ OctoPrintPluginIsAvailable: false,
Settings: nil,
UIState: "__uninitialized__",
@@ -350,17 +350,19 @@ func (this *UI) loadSettings() {
// The call to GetSettings is also used to determine whether or not the
// OctoScreen plug-in is available. If calling GetSettings returns
// a 404, the plug-in isn't available.
- this.OctoPrintPluginIsAvailable = false
logger.Info("The OctoScreen plug-in is not available")
} else {
// If we get back any other kind of error, something bad happened, so log an error.
logger.LogError("ui.loadSettings()", "Do(GetSettingsRequest)", err)
}
+ this.OctoPrintPluginIsAvailable = false
+
logger.TraceLeave("ui.loadSettings()")
return
} else {
logger.Info("The call to GetSettings succeeded and the OctoPrint plug-in is available")
+ this.OctoPrintPluginIsAvailable = true
}
if !this.validateMenuItems(settingsResponse.MenuStructure, "", true) {