diff --git a/pom.xml b/pom.xml index 0ede241..bb751a4 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.bwssystems.HABridge ha-bridge - 5.0.0rc6 + 5.0.0rc7 jar HA Bridge diff --git a/src/main/resources/public/img/favicon.ico b/src/main/resources/public/img/favicon.ico new file mode 100644 index 0000000..5c72a35 Binary files /dev/null and b/src/main/resources/public/img/favicon.ico differ diff --git a/src/main/resources/public/index.html b/src/main/resources/public/index.html index 76eff64..6d23c7e 100644 --- a/src/main/resources/public/index.html +++ b/src/main/resources/public/index.html @@ -5,6 +5,7 @@ HA Bridge + diff --git a/src/main/resources/public/scripts/app.js b/src/main/resources/public/scripts/app.js index cdfe1fb..0b8ae5d 100644 --- a/src/main/resources/public/scripts/app.js +++ b/src/main/resources/public/scripts/app.js @@ -109,9 +109,9 @@ app.run(function ($rootScope, $location, Auth, bridgeService) { $rootScope.$on('securityReinit', function(event, data) { event.preventDefault(); - Auth.logout(); bridgeService.state.testuser = ""; - $location.path("/login"); + Auth.logout(); + $location.path("/"); }); $rootScope.$on('$routeChangeStart', function (event, next) { @@ -1637,7 +1637,8 @@ app.controller('SecurityDialogCtrl', function ($scope, bridgeService, ngDialog) if(bridgeService.state.loggedInUser !== undefined) $scope.username = bridgeService.state.loggedInUser; else - $scope.username = "" + $scope.username = ""; + bridgeService.getHABridgeVersion(); $scope.showPassword = $scope.isSecure; }; @@ -3745,8 +3746,9 @@ app.filter('filterDevicesByRequester', function () { } }); -app.controller('LoginController', function ($scope, $location, Auth) { +app.controller('LoginController', function ($scope, $location, Auth, bridgeService) { $scope.failed = false; + $scope.isSecure = bridgeService.isSecure(); $scope.loggedIn = Auth.isLoggedIn(); $scope.login = function(username, password) { Auth.login(username, password) @@ -3759,8 +3761,12 @@ app.controller('LoginController', function ($scope, $location, Auth) { $scope.logout = function() { Auth.logout(); + $scope.isSecure = bridgeService.isSecure(); $scope.loggedIn = Auth.isLoggedIn(); - $location.path("/login"); + if($scope.isSecure) + $location.path("/login"); + else + $location.path("/"); }; }); diff --git a/src/main/resources/public/views/login.html b/src/main/resources/public/views/login.html index 3019997..295eaf9 100644 --- a/src/main/resources/public/views/login.html +++ b/src/main/resources/public/views/login.html @@ -3,7 +3,7 @@

Login

-
+
Enter Credentials @@ -25,8 +25,11 @@
-
+
+
+

This ha-bridge instance is not secured!

+
\ No newline at end of file