diff options
author | JeffB42 <10328858+JeffB42@users.noreply.github.com> | 2021-02-27 21:23:50 +0300 |
---|---|---|
committer | JeffB42 <10328858+JeffB42@users.noreply.github.com> | 2021-02-27 21:23:50 +0300 |
commit | a6c5db2f580ef189864986843c8137f2826eef49 (patch) | |
tree | 2fd854036b811355adab0391e9913d0ceb8ff6ab /ui | |
parent | 3d57adee7937e6b005cb88f3012adb84880d7931 (diff) |
updated the setting of OctoPrintPluginIsAvailable
Diffstat (limited to 'ui')
-rwxr-xr-x | ui/ui.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) { |