fix(gui): reflect folder password visibility by changing button icon (#9857)

Make the "toggle password visibility" button on encrypted
folders change its icon from `fa-eye` to `fa-eye-slash` while the
password is visible.
This commit is contained in:
Alex Ionescu 2024-12-08 21:20:31 +01:00 committed by GitHub
parent d9ce7c3166
commit 479c0d3f16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View File

@ -36,7 +36,7 @@
</span> </span>
<span ng-switch="selected[id] && folderType !== 'receiveencrypted'" class="input-group-addon"> <span ng-switch="selected[id] && folderType !== 'receiveencrypted'" class="input-group-addon">
<span ng-switch-when='true'> <span ng-switch-when='true'>
<span class="button fas fa-fw fa-eye" ng-click="togglePasswordVisibility()"></span> <span class="button fas fa-fw {{plain ? 'fa-eye-slash' : 'fa-eye'}}" ng-click="togglePasswordVisibility()"></span>
</span> </span>
<span ng-switch-default> <span ng-switch-default>
<span class="button fas fa-fw fa-eye" disabled></span> <span class="button fas fa-fw fa-eye" disabled></span>

View File

@ -3703,7 +3703,6 @@ angular.module('syncthing.core')
untrusted: '=', untrusted: '=',
}, },
link: function (scope, elem, attrs) { link: function (scope, elem, attrs) {
var plain = false;
scope.togglePasswordVisibility = function() { scope.togglePasswordVisibility = function() {
scope.plain = !scope.plain; scope.plain = !scope.plain;
}; };