mirror of
https://github.com/nextcloud/passman.git
synced 2025-10-04 10:44:26 +08:00
Add warning for http connections
This commit is contained in:
parent
899eff73f2
commit
8b26873159
5 changed files with 48 additions and 3 deletions
14
css/app.css
14
css/app.css
|
@ -92,6 +92,20 @@
|
||||||
border-top-right-radius: 3px;
|
border-top-right-radius: 3px;
|
||||||
background-clip: padding-box; }
|
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 {
|
.vault_wrapper {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -8,9 +8,20 @@
|
||||||
* Controller of the passmanApp
|
* Controller of the passmanApp
|
||||||
*/
|
*/
|
||||||
angular.module('passmanApp')
|
angular.module('passmanApp')
|
||||||
.controller('MainCtrl', ['$scope', '$rootScope', function ($scope, $rootScope) {
|
.controller('MainCtrl', ['$scope', '$rootScope', '$location', function ($scope, $rootScope, $location) {
|
||||||
$scope.selectedVault = false;
|
$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){
|
$rootScope.$on('app_menu', function(evt, shown){
|
||||||
$scope.app_sidebar = shown;
|
$scope.app_sidebar = shown;
|
||||||
});
|
});
|
||||||
|
|
|
@ -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{
|
.vault_wrapper{
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
|
@ -90,6 +90,12 @@ style('passman', 'app');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="app" ng-app="passmanApp" ng-controller="MainCtrl">
|
<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">
|
<div id="app-navigation" ng-if="selectedVault" ng-controller="MenuCtrl">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="taginput">
|
<li class="taginput">
|
||||||
|
|
Loading…
Add table
Reference in a new issue