Merge branch 'httpWarning'

This commit is contained in:
brantje 2016-09-30 22:33:13 +02:00
commit c4da0742df
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F
5 changed files with 48 additions and 3 deletions

View file

@ -92,6 +92,20 @@
border-top-right-radius: 3px;
background-clip: padding-box; }
.warning_bar {
position: absolute;
width: 100%;
padding: 12px;
font-weight: bold;
text-align: center;
z-index: 9999;
background-color: red;
color: white; }
.warning_bar .fa-times {
float: right;
color: #000;
cursor: pointer; }
.vault_wrapper {
margin: 0 auto;
margin-top: 20px;

File diff suppressed because one or more lines are too long

View file

@ -8,9 +8,20 @@
* Controller of the passmanApp
*/
angular.module('passmanApp')
.controller('MainCtrl', ['$scope', '$rootScope', function ($scope, $rootScope) {
.controller('MainCtrl', ['$scope', '$rootScope', '$location', function ($scope, $rootScope, $location) {
$scope.selectedVault = false;
$scope.http_warning_hidden = true;
if($location.$$protocol === 'http'){
$scope.using_http = true;
$scope.http_warning_hidden = false;
}
$rootScope.setHttpWarning = function(state){
$scope.http_warning_hidden = state;
};
$rootScope.$on('app_menu', function(evt, shown){
$scope.app_sidebar = shown;
});

View file

@ -1,4 +1,18 @@
.warning_bar{
position: absolute;
width: 100%;
padding: 12px;
font-weight: bold;
text-align: center;
z-index: 9999;
background-color: red;
color: white;
.fa-times{
float: right;
color: #000;
cursor: pointer;
}
}
.vault_wrapper{
margin: 0 auto;
margin-top: 20px;

View file

@ -90,6 +90,12 @@ style('passman', 'app');
?>
<div id="app" ng-app="passmanApp" ng-controller="MainCtrl">
<div class="warning_bar" ng-if="using_http && http_warning_hidden == false">
Warning! Using http with passman can be insecure!
<i class="fa fa-times fa-2x" alt="Close" ng-click="setHttpWarning(true);"></i>
</div>
<div id="app-navigation" ng-if="selectedVault" ng-controller="MenuCtrl">
<ul>
<li class="taginput">