diff --git a/public/css/styles.css b/public/css/styles.css index 98b21e5..3cc0cb6 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -2680,6 +2680,53 @@ body.dark-mode .floating-cart-bar { box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15); } +/* Envoltorio para alternar visualización de contraseñas */ +.password-input-wrapper { + position: relative; + display: flex; + align-items: center; + width: 100%; +} + +.password-input-wrapper input { + padding-right: 44px !important; +} + +.btn-toggle-password { + position: absolute; + right: 6px; + top: 50%; + transform: translateY(-50%); + background: none; + border: none; + padding: 8px; + cursor: pointer; + color: #64748b; + display: flex; + align-items: center; + justify-content: center; + border-radius: 8px; + transition: all 0.15s ease; + z-index: 2; +} + +.btn-toggle-password:hover, +.btn-toggle-password:focus-visible { + color: #0284c7; + background: rgba(2, 132, 199, 0.1); + outline: none; +} + +body.dark-mode .btn-toggle-password { + color: #94a3b8; +} + +body.dark-mode .btn-toggle-password:hover, +body.dark-mode .btn-toggle-password:focus-visible { + color: #38bdf8; + background: rgba(56, 189, 248, 0.15); +} + .login-submit-btn { width: 100%; padding: 13px; diff --git a/public/index.html b/public/index.html index ba4feb6..8b33c97 100644 --- a/public/index.html +++ b/public/index.html @@ -11,15 +11,32 @@ - - - + + + + @@ -81,7 +98,12 @@
- +
+ + +
@@ -226,7 +248,12 @@
- +
+ + +
@@ -282,12 +309,22 @@
- +
+ + +
- +
+ + +
@@ -3940,7 +3977,12 @@
- +
+ + +
@@ -4384,7 +4426,12 @@ - +
+ + +
@@ -4602,7 +4649,12 @@
- +
+ + +
@@ -4650,7 +4702,12 @@
- +
+ + +
@@ -5667,6 +5724,6 @@ - + diff --git a/public/js/app.js b/public/js/app.js index d15e57e..fa3656c 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -677,6 +677,22 @@ function quickFillLogin(username, password) { handleLoginSubmit(); } +function togglePasswordVisibility(inputId, btn) { + const input = document.getElementById(inputId); + if (!input) return; + const isPassword = input.type === 'password'; + input.type = isPassword ? 'text' : 'password'; + if (btn) { + btn.title = isPassword ? 'Ocultar contraseña' : 'Ver contraseña'; + btn.setAttribute('aria-label', btn.title); + btn.style.color = isPassword ? '#0284c7' : ''; + btn.innerHTML = isPassword + ? '' + : ''; + } +} +window.togglePasswordVisibility = togglePasswordVisibility; + async function handleLoginSubmit(event) { if (event) event.preventDefault(); const username = document.getElementById('loginUsername').value.trim(); diff --git a/public/sw.js b/public/sw.js index 078ac5d..624b14b 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1,5 +1,5 @@ -// SiboPay PWA Service Worker v20.8 - Ultra Fast Startup & Stale-While-Revalidate -const CACHE_NAME = 'sibopay-v20.8'; +// SiboPay PWA Service Worker v20.9 - Ultra Fast Startup & Stale-While-Revalidate +const CACHE_NAME = 'sibopay-v20.9'; const STATIC_ASSETS = [ '/', '/index.html', @@ -8,10 +8,10 @@ const STATIC_ASSETS = [ '/pistola.html', '/carnet.html', '/manifest.json', - '/css/styles.css?v=19.9', + '/css/styles.css?v=20.0', '/css/desktop.css?v=2.2', '/js/dialogs.js?v=19.4', - '/js/app.js?v=20.8', + '/js/app.js?v=20.9', '/js/pos.js?v=20.5', '/js/sounds.js?v=19.4', '/js/food-icons.js?v=19.4',