EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
improve show password ui
Yuri Kuznetsov4f574abfe730
diff --git a/client/src/views/login.js b/client/src/views/login.jsindex 55eb04d35f..412ee0b5d7 100644--- a/client/src/views/login.js+++ b/client/src/views/login.js@@ -444,6 +444,7 @@ class LoginView extends View {toggleShowPassword() {const input = this.element.querySelector('[id="field-password"]');const button = this.element.querySelector('[data-action="toggleShowPassword"]');+ const icon = button.children[0];if (!(input instanceof HTMLInputElement)) {return;@@ -452,15 +453,22 @@ class LoginView extends View {if (input.type === 'password') {input.type = 'text';- button.classList.remove('text-soft');- button.classList.add('text-primary');+ //button.classList.remove('text-soft');+ //button.classList.add('text-primary');++ icon.classList.remove('fa-eye');+ icon.classList.add('fa-eye-slash');} else {input.type = 'password';- button.classList.remove('text-primary');- button.classList.add('text-soft');+ //button.classList.remove('text-primary');+ //button.classList.add('text-soft');++ icon.classList.remove('fa-eye-slash');+ icon.classList.add('fa-eye');}+input.focus();input.setSelectionRange(input.value.length, input.value.length);}diff --git a/frontend/less/espo/custom.less b/frontend/less/espo/custom.lessindex b210ee01fd..48fdc26689 100644--- a/frontend/less/espo/custom.less+++ b/frontend/less/espo/custom.less@@ -4292,6 +4292,9 @@ body > .autocomplete-suggestions.text-search-suggestions {right: var(--8px);top: var(--8px);user-select: none;+ width: var(--22px);+ display: inline-block;+ text-align: center;}}