mirror of
https://github.com/nextcloud/passman.git
synced 2025-01-01 04:51:44 +08:00
Merge branch 'httpWarning'
This commit is contained in:
commit
c4da0742df
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;
|
||||
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
|
@ -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;
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue