mirror of
https://github.com/nextcloud/passman.git
synced 2024-09-20 06:46:20 +08:00
Merge branch 'feature/vault-password-visibility-toggle'
This commit is contained in:
commit
a326bf2125
|
@ -438,6 +438,13 @@
|
|||
color: #ce3702; }
|
||||
.vault_wrapper .login_form .pw-input .last_access {
|
||||
color: #8e8e8e; }
|
||||
.vault_wrapper .login_form .pw-input .input-group {
|
||||
display: flex;
|
||||
align-items: center; }
|
||||
.vault_wrapper .login_form .pw-input .input-group i {
|
||||
padding-bottom: 3px;
|
||||
margin-left: 10px;
|
||||
cursor: pointer; }
|
||||
.vault_wrapper .login_form input[type="password"], .vault_wrapper .login_form input[type="text"] {
|
||||
width: 100%;
|
||||
-webkit-border-radius: 5px;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -222,9 +222,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
$scope.createVault = function (vault_name, vault_key, vault_key2) {
|
||||
$scope.createVault = function (vault_name, vault_key, vault_key2) {
|
||||
if (vault_key !== vault_key2) {
|
||||
$scope.error = $translate.instant('password.do.not.match');
|
||||
return;
|
||||
|
@ -250,5 +248,16 @@
|
|||
});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.togglePasswordInputVisibility = function ($event, inputElementId) {
|
||||
const inputElement = document.getElementById(inputElementId);
|
||||
if (inputElement.type === "password") {
|
||||
inputElement.type = "text";
|
||||
$event.currentTarget.classList.replace('fa-eye-slash', 'fa-eye');
|
||||
} else {
|
||||
inputElement.type = "password";
|
||||
$event.currentTarget.classList.replace('fa-eye', 'fa-eye-slash');
|
||||
}
|
||||
};
|
||||
}]);
|
||||
}());
|
||||
}());
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -73,6 +73,16 @@
|
|||
.last_access{
|
||||
color: #8e8e8e;
|
||||
}
|
||||
.input-group{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
i{
|
||||
padding-bottom: 3px;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input[type="password"], input[type="text"]{
|
||||
|
|
|
@ -33,9 +33,12 @@
|
|||
<div>
|
||||
<input type="text" ng-model="vault_name" required>
|
||||
</div>
|
||||
<div>
|
||||
<div class="pw-input">
|
||||
{{ 'new.vault.pass' | translate}}
|
||||
<input type="password" ng-model="vault_key" required>
|
||||
<div class="input-group">
|
||||
<input type="password" ng-model="vault_key" required id="new_vault_key">
|
||||
<i class="fa fa-eye-slash" ng-click="togglePasswordInputVisibility($event, 'new_vault_key')"></i>
|
||||
</div>
|
||||
<ng-password-meter password="vault_key" score="vault_key_score"></ng-password-meter>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -88,7 +91,11 @@
|
|||
{{ 'input.vault.password' | translate}} {{list_selected_vault.name}}
|
||||
|
||||
<div class="pw-input">
|
||||
<input type="password" ng-model="vault_key" ng-enter="loginToVault(list_selected_vault, vault_key)">
|
||||
<div class="input-group">
|
||||
<input type="password" ng-model="vault_key" ng-enter="loginToVault(list_selected_vault, vault_key)" id="login_vault_key">
|
||||
<i class="fa fa-eye-slash" ng-click="togglePasswordInputVisibility($event, 'login_vault_key')"></i>
|
||||
</div>
|
||||
|
||||
<small class="last_access">{{'last.access' | translate}}:
|
||||
<span ng-if="list_selected_vault.last_access > 0">{{list_selected_vault.last_access * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}</span>
|
||||
<span ng-if="list_selected_vault.last_access === 0">Never</span>
|
||||
|
|
Loading…
Reference in a new issue