hd-wallet-ui 1.2.5 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/app.js +13 -0
- package/src/template.js +1 -1
- package/styles/main.css +26 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hd-wallet-ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "HD Wallet modal UI — login, keys, identity, trust map, and security bond. Attach to any button in your app.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/app.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"buffer": "^6.0.3",
|
|
36
36
|
"flatbuffers": "^25.9.23",
|
|
37
37
|
"flatc-wasm": "^25.12.19-wasm.43",
|
|
38
|
-
"hd-wallet-wasm": "^1.2.
|
|
38
|
+
"hd-wallet-wasm": "^1.2.6",
|
|
39
39
|
"qrcode": "^1.5.3",
|
|
40
40
|
"spacedatastandards.org": "^23.3.3-0.3.4",
|
|
41
41
|
"vcard-cryptoperson": "^1.1.11"
|
package/src/app.js
CHANGED
|
@@ -3643,6 +3643,19 @@ function setupLoginHandlers() {
|
|
|
3643
3643
|
updatePasswordStrength(e.target.value);
|
|
3644
3644
|
});
|
|
3645
3645
|
|
|
3646
|
+
// Password show/hide toggle
|
|
3647
|
+
$('toggle-password-vis')?.addEventListener('click', () => {
|
|
3648
|
+
const pw = $('wallet-password');
|
|
3649
|
+
const btn = $('toggle-password-vis');
|
|
3650
|
+
if (!pw || !btn) return;
|
|
3651
|
+
const showing = pw.type === 'text';
|
|
3652
|
+
pw.type = showing ? 'password' : 'text';
|
|
3653
|
+
btn.querySelector('.eye-open').style.display = showing ? '' : 'none';
|
|
3654
|
+
btn.querySelector('.eye-closed').style.display = showing ? 'none' : '';
|
|
3655
|
+
btn.title = showing ? 'Show password' : 'Hide password';
|
|
3656
|
+
pw.focus();
|
|
3657
|
+
});
|
|
3658
|
+
|
|
3646
3659
|
$('wallet-username')?.addEventListener('input', () => {
|
|
3647
3660
|
const pw = $('wallet-password');
|
|
3648
3661
|
if (pw) updatePasswordStrength(pw.value);
|
package/src/template.js
CHANGED
|
@@ -538,7 +538,7 @@ export function getModalHTML() {
|
|
|
538
538
|
<form id="password-method" class="method-content active" onsubmit="return false;">
|
|
539
539
|
<div class="glass-input-group"><input type="text" id="wallet-username" class="glass-input" placeholder="Username" autocomplete="username"></div>
|
|
540
540
|
<div class="glass-input-group">
|
|
541
|
-
<input type="password" id="wallet-password" class="glass-input" placeholder="Password (24+ chars)" autocomplete="new-password">
|
|
541
|
+
<div class="password-input-wrap"><input type="password" id="wallet-password" class="glass-input" placeholder="Password (24+ chars)" autocomplete="new-password"><button type="button" id="toggle-password-vis" class="password-toggle" title="Show password"><svg class="eye-open" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg><svg class="eye-closed" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="display:none"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg></button></div>
|
|
542
542
|
<div class="entropy-bar"><div class="entropy-fill" id="strength-fill"></div><div class="entropy-threshold"></div></div>
|
|
543
543
|
<span class="entropy-label"><span id="entropy-bits">0</span> bits entropy</span>
|
|
544
544
|
</div>
|
package/styles/main.css
CHANGED
|
@@ -450,6 +450,32 @@ body:has(.modal.active) .nav-bar {
|
|
|
450
450
|
background: var(--white-10);
|
|
451
451
|
}
|
|
452
452
|
|
|
453
|
+
.password-input-wrap {
|
|
454
|
+
position: relative;
|
|
455
|
+
}
|
|
456
|
+
.password-input-wrap .glass-input {
|
|
457
|
+
padding-right: 48px;
|
|
458
|
+
}
|
|
459
|
+
.password-toggle {
|
|
460
|
+
position: absolute;
|
|
461
|
+
right: 8px;
|
|
462
|
+
top: 50%;
|
|
463
|
+
transform: translateY(-50%);
|
|
464
|
+
background: none;
|
|
465
|
+
border: none;
|
|
466
|
+
color: var(--white-40);
|
|
467
|
+
cursor: pointer;
|
|
468
|
+
padding: 6px;
|
|
469
|
+
display: flex;
|
|
470
|
+
align-items: center;
|
|
471
|
+
justify-content: center;
|
|
472
|
+
border-radius: 6px;
|
|
473
|
+
transition: color 0.15s;
|
|
474
|
+
}
|
|
475
|
+
.password-toggle:hover {
|
|
476
|
+
color: var(--white-80);
|
|
477
|
+
}
|
|
478
|
+
|
|
453
479
|
.glass-textarea {
|
|
454
480
|
resize: vertical;
|
|
455
481
|
min-height: 80px;
|