From a27e94f6943d8d1911e01f1b526d5d9ee0b8b41e Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Sun, 22 Sep 2019 12:10:44 +0200 Subject: [PATCH] Only allow debug and uninstall views on app error --- src/theme.scss | 7 +++++++ src/views/app.html | 16 ++++++++-------- src/views/app.js | 5 +++++ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/theme.scss b/src/theme.scss index 605ed03ce..e799473cd 100644 --- a/src/theme.scss +++ b/src/theme.scss @@ -534,6 +534,13 @@ multiselect { color: $navbar-default-link-color; box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); } + + &.disabled { + color: gray; + background-color: transparent !important; + box-shadow: none !important; + cursor: not-allowed; + } } } diff --git a/src/views/app.html b/src/views/app.html index 1863fd5de..7cfc15360 100644 --- a/src/views/app.html +++ b/src/views/app.html @@ -251,14 +251,14 @@
diff --git a/src/views/app.js b/src/views/app.js index 12ca1fe1f..7fe208f7c 100644 --- a/src/views/app.js +++ b/src/views/app.js @@ -66,6 +66,9 @@ angular.module('Application').controller('AppController', ['$scope', '$location' $scope.setView = function (view) { if ($scope.view === view) return; + // on error only allow uninstall or debug view + if ($scope.app.error && view !== 'uninstall') view = 'debug'; + $route.updateParams({ view: view }); $scope[view].show(); $scope.view = view; @@ -889,6 +892,8 @@ angular.module('Application').controller('AppController', ['$scope', '$location' $scope.app = app; + console.log(app.installationState, app.error); + $scope.setView($routeParams.view || 'display'); // track on page load backup if active