hd-wallet-ui 2.0.14 → 2.0.16
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 +12 -2
- package/src/template.js +1 -1
- package/styles/main.css +44 -10
- package/styles/widget.css +44 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hd-wallet-ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.16",
|
|
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",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"buffer": "^6.0.3",
|
|
41
41
|
"flatbuffers": "^25.9.23",
|
|
42
42
|
"flatc-wasm": "^26.1.32",
|
|
43
|
-
"hd-wallet-wasm": "^2.0.
|
|
43
|
+
"hd-wallet-wasm": "^2.0.16",
|
|
44
44
|
"qrcode": "^1.5.3",
|
|
45
45
|
"spacedatastandards.org": "^1.93.3",
|
|
46
46
|
"vcard-cryptoperson": "^1.1.11"
|
package/src/app.js
CHANGED
|
@@ -4272,6 +4272,7 @@ function setupMainAppHandlers() {
|
|
|
4272
4272
|
$('login-modal')?.classList.add('active');
|
|
4273
4273
|
});
|
|
4274
4274
|
$('nav-logout')?.addEventListener('click', logout);
|
|
4275
|
+
$('account-logout')?.addEventListener('click', logout);
|
|
4275
4276
|
$('nav-keys')?.addEventListener('click', async () => {
|
|
4276
4277
|
$('keys-modal')?.classList.add('active');
|
|
4277
4278
|
if (state.loggedIn) {
|
|
@@ -6024,8 +6025,17 @@ export async function createWalletUI(rootElement, options = {}) {
|
|
|
6024
6025
|
return {
|
|
6025
6026
|
/** Open the login modal */
|
|
6026
6027
|
openLogin() {
|
|
6027
|
-
|
|
6028
|
-
|
|
6028
|
+
if (state.loggedIn) {
|
|
6029
|
+
const accountModal = document.getElementById('keys-modal');
|
|
6030
|
+
if (accountModal) accountModal.classList.add('active');
|
|
6031
|
+
return;
|
|
6032
|
+
}
|
|
6033
|
+
const loginModal = document.getElementById('login-modal');
|
|
6034
|
+
if (loginModal) {
|
|
6035
|
+
loginModal.classList.add('active');
|
|
6036
|
+
const storedTab = loginModal.querySelector('[data-method="stored"]');
|
|
6037
|
+
if (storedTab && storedTab.style.display !== 'none') storedTab.click();
|
|
6038
|
+
}
|
|
6029
6039
|
},
|
|
6030
6040
|
/** Open the account / keys modal (requires login first) */
|
|
6031
6041
|
openAccount() {
|
package/src/template.js
CHANGED
|
@@ -3,7 +3,7 @@ export function getModalHTML() {
|
|
|
3
3
|
<!-- Keys Modal -->
|
|
4
4
|
<div id="keys-modal" class="modal">
|
|
5
5
|
<div class="modal-glass modal-wide">
|
|
6
|
-
<div class="modal-header account-modal-header"><div class="account-header-info"><div class="account-wallet-row"><select id="account-wallet-select" class="glass-input compact account-wallet-select" aria-label="Select wallet"></select></div><div class="account-wallet-summary"><div class="account-wallet-balance-line"><div class="ph-portfolio-value" id="wallet-bond-value">$0.00</div><div class="ph-portfolio-label">Bond</div></div></div></div><button class="modal-close account-modal-close" type="button" aria-label="Close"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button></div>
|
|
6
|
+
<div class="modal-header account-modal-header"><div class="account-header-info"><div class="account-wallet-row"><select id="account-wallet-select" class="glass-input compact account-wallet-select" aria-label="Select wallet"></select></div><div class="account-wallet-summary"><div class="account-wallet-balance-line"><div class="ph-portfolio-value" id="wallet-bond-value">$0.00</div><div class="ph-portfolio-label">Bond</div></div></div></div><div class="account-header-actions"><button id="account-logout" class="account-logout-btn" type="button" aria-label="Logout" title="Logout"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></svg></button><button class="modal-close account-modal-close" type="button" aria-label="Close"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button></div></div>
|
|
7
7
|
<div class="modal-tabs">
|
|
8
8
|
<button class="modal-tab active" data-modal-tab="vcard-tab-content">Identity</button>
|
|
9
9
|
<button class="modal-tab" data-modal-tab="trust-tab-content">Trust Map</button>
|
package/styles/main.css
CHANGED
|
@@ -977,9 +977,10 @@ body:has(.modal.active) .nav-bar {
|
|
|
977
977
|
|
|
978
978
|
.wallet-info-expanded {
|
|
979
979
|
display: flex;
|
|
980
|
-
align-items:
|
|
980
|
+
align-items: center;
|
|
981
981
|
gap: 8px;
|
|
982
|
-
|
|
982
|
+
min-height: 30px;
|
|
983
|
+
padding: 6px 24px;
|
|
983
984
|
background: rgba(59, 130, 246, 0.1);
|
|
984
985
|
font-size: 13px;
|
|
985
986
|
line-height: 1.5;
|
|
@@ -995,12 +996,17 @@ body:has(.modal.active) .nav-bar {
|
|
|
995
996
|
}
|
|
996
997
|
|
|
997
998
|
.wallet-info-close {
|
|
999
|
+
display: inline-flex;
|
|
1000
|
+
align-items: center;
|
|
1001
|
+
justify-content: center;
|
|
998
1002
|
background: none;
|
|
999
1003
|
border: none;
|
|
1000
1004
|
color: rgba(255, 255, 255, 0.5);
|
|
1001
1005
|
font-size: 18px;
|
|
1002
1006
|
cursor: pointer;
|
|
1003
|
-
padding: 0
|
|
1007
|
+
padding: 0;
|
|
1008
|
+
width: 22px;
|
|
1009
|
+
height: 22px;
|
|
1004
1010
|
line-height: 1;
|
|
1005
1011
|
flex-shrink: 0;
|
|
1006
1012
|
}
|
|
@@ -1189,6 +1195,7 @@ body:has(.modal.active) .nav-bar {
|
|
|
1189
1195
|
display: flex;
|
|
1190
1196
|
flex-direction: column;
|
|
1191
1197
|
align-items: flex-start;
|
|
1198
|
+
justify-content: center;
|
|
1192
1199
|
gap: 8px;
|
|
1193
1200
|
flex: 1 1 auto;
|
|
1194
1201
|
min-width: 0;
|
|
@@ -1196,8 +1203,37 @@ body:has(.modal.active) .nav-bar {
|
|
|
1196
1203
|
|
|
1197
1204
|
.account-modal-header {
|
|
1198
1205
|
position: relative;
|
|
1206
|
+
align-items: center;
|
|
1199
1207
|
min-height: 118px;
|
|
1200
|
-
padding-right:
|
|
1208
|
+
padding-right: 92px;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
.account-header-actions {
|
|
1212
|
+
position: absolute;
|
|
1213
|
+
top: 12px;
|
|
1214
|
+
right: 14px;
|
|
1215
|
+
display: flex;
|
|
1216
|
+
align-items: center;
|
|
1217
|
+
gap: 4px;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
.account-logout-btn {
|
|
1221
|
+
width: 32px;
|
|
1222
|
+
height: 32px;
|
|
1223
|
+
display: inline-flex;
|
|
1224
|
+
align-items: center;
|
|
1225
|
+
justify-content: center;
|
|
1226
|
+
background: transparent;
|
|
1227
|
+
border: none;
|
|
1228
|
+
color: var(--white);
|
|
1229
|
+
cursor: pointer;
|
|
1230
|
+
padding: 0;
|
|
1231
|
+
transition: color 0.2s, opacity 0.2s;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
.account-logout-btn:hover {
|
|
1235
|
+
color: var(--white-80);
|
|
1236
|
+
opacity: 0.9;
|
|
1201
1237
|
}
|
|
1202
1238
|
|
|
1203
1239
|
.account-wallet-row {
|
|
@@ -1232,8 +1268,8 @@ body:has(.modal.active) .nav-bar {
|
|
|
1232
1268
|
|
|
1233
1269
|
.account-wallet-balance-line {
|
|
1234
1270
|
display: flex;
|
|
1235
|
-
align-items:
|
|
1236
|
-
gap:
|
|
1271
|
+
align-items: center;
|
|
1272
|
+
gap: 8px;
|
|
1237
1273
|
}
|
|
1238
1274
|
|
|
1239
1275
|
.account-wallet-summary .ph-portfolio-value {
|
|
@@ -1241,7 +1277,7 @@ body:has(.modal.active) .nav-bar {
|
|
|
1241
1277
|
}
|
|
1242
1278
|
|
|
1243
1279
|
.account-wallet-summary .ph-portfolio-label {
|
|
1244
|
-
font-size:
|
|
1280
|
+
font-size: 18px;
|
|
1245
1281
|
color: var(--white-80);
|
|
1246
1282
|
margin-top: 0;
|
|
1247
1283
|
}
|
|
@@ -1284,9 +1320,7 @@ body:has(.modal.active) .nav-bar {
|
|
|
1284
1320
|
}
|
|
1285
1321
|
|
|
1286
1322
|
.account-modal-close {
|
|
1287
|
-
position:
|
|
1288
|
-
top: 12px;
|
|
1289
|
-
right: 14px;
|
|
1323
|
+
position: static;
|
|
1290
1324
|
}
|
|
1291
1325
|
|
|
1292
1326
|
.modal-body {
|
package/styles/widget.css
CHANGED
|
@@ -979,9 +979,10 @@ body:has(#hd-wallet-ui-container .modal.active) #hd-wallet-ui-container .nav-bar
|
|
|
979
979
|
|
|
980
980
|
#hd-wallet-ui-container .wallet-info-expanded {
|
|
981
981
|
display: flex;
|
|
982
|
-
align-items:
|
|
982
|
+
align-items: center;
|
|
983
983
|
gap: 8px;
|
|
984
|
-
|
|
984
|
+
min-height: 30px;
|
|
985
|
+
padding: 6px 24px;
|
|
985
986
|
background: rgba(59, 130, 246, 0.1);
|
|
986
987
|
font-size: 13px;
|
|
987
988
|
line-height: 1.5;
|
|
@@ -997,12 +998,17 @@ body:has(#hd-wallet-ui-container .modal.active) #hd-wallet-ui-container .nav-bar
|
|
|
997
998
|
}
|
|
998
999
|
|
|
999
1000
|
#hd-wallet-ui-container .wallet-info-close {
|
|
1001
|
+
display: inline-flex;
|
|
1002
|
+
align-items: center;
|
|
1003
|
+
justify-content: center;
|
|
1000
1004
|
background: none;
|
|
1001
1005
|
border: none;
|
|
1002
1006
|
color: rgba(255, 255, 255, 0.5);
|
|
1003
1007
|
font-size: 18px;
|
|
1004
1008
|
cursor: pointer;
|
|
1005
|
-
padding: 0
|
|
1009
|
+
padding: 0;
|
|
1010
|
+
width: 22px;
|
|
1011
|
+
height: 22px;
|
|
1006
1012
|
line-height: 1;
|
|
1007
1013
|
flex-shrink: 0;
|
|
1008
1014
|
}
|
|
@@ -1191,6 +1197,7 @@ body:has(#hd-wallet-ui-container .modal.active) #hd-wallet-ui-container .nav-bar
|
|
|
1191
1197
|
display: flex;
|
|
1192
1198
|
flex-direction: column;
|
|
1193
1199
|
align-items: flex-start;
|
|
1200
|
+
justify-content: center;
|
|
1194
1201
|
gap: 8px;
|
|
1195
1202
|
flex: 1 1 auto;
|
|
1196
1203
|
min-width: 0;
|
|
@@ -1198,8 +1205,37 @@ body:has(#hd-wallet-ui-container .modal.active) #hd-wallet-ui-container .nav-bar
|
|
|
1198
1205
|
|
|
1199
1206
|
#hd-wallet-ui-container .account-modal-header {
|
|
1200
1207
|
position: relative;
|
|
1208
|
+
align-items: center;
|
|
1201
1209
|
min-height: 118px;
|
|
1202
|
-
padding-right:
|
|
1210
|
+
padding-right: 92px;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
#hd-wallet-ui-container .account-header-actions {
|
|
1214
|
+
position: absolute;
|
|
1215
|
+
top: 12px;
|
|
1216
|
+
right: 14px;
|
|
1217
|
+
display: flex;
|
|
1218
|
+
align-items: center;
|
|
1219
|
+
gap: 4px;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
#hd-wallet-ui-container .account-logout-btn {
|
|
1223
|
+
width: 32px;
|
|
1224
|
+
height: 32px;
|
|
1225
|
+
display: inline-flex;
|
|
1226
|
+
align-items: center;
|
|
1227
|
+
justify-content: center;
|
|
1228
|
+
background: transparent;
|
|
1229
|
+
border: none;
|
|
1230
|
+
color: var(--white);
|
|
1231
|
+
cursor: pointer;
|
|
1232
|
+
padding: 0;
|
|
1233
|
+
transition: color 0.2s, opacity 0.2s;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
#hd-wallet-ui-container .account-logout-btn:hover {
|
|
1237
|
+
color: var(--white-80);
|
|
1238
|
+
opacity: 0.9;
|
|
1203
1239
|
}
|
|
1204
1240
|
|
|
1205
1241
|
#hd-wallet-ui-container .account-wallet-row {
|
|
@@ -1234,8 +1270,8 @@ body:has(#hd-wallet-ui-container .modal.active) #hd-wallet-ui-container .nav-bar
|
|
|
1234
1270
|
|
|
1235
1271
|
#hd-wallet-ui-container .account-wallet-balance-line {
|
|
1236
1272
|
display: flex;
|
|
1237
|
-
align-items:
|
|
1238
|
-
gap:
|
|
1273
|
+
align-items: center;
|
|
1274
|
+
gap: 8px;
|
|
1239
1275
|
}
|
|
1240
1276
|
|
|
1241
1277
|
#hd-wallet-ui-container .account-wallet-summary .ph-portfolio-value {
|
|
@@ -1243,7 +1279,7 @@ body:has(#hd-wallet-ui-container .modal.active) #hd-wallet-ui-container .nav-bar
|
|
|
1243
1279
|
}
|
|
1244
1280
|
|
|
1245
1281
|
#hd-wallet-ui-container .account-wallet-summary .ph-portfolio-label {
|
|
1246
|
-
font-size:
|
|
1282
|
+
font-size: 18px;
|
|
1247
1283
|
color: var(--white-80);
|
|
1248
1284
|
margin-top: 0;
|
|
1249
1285
|
}
|
|
@@ -1286,9 +1322,7 @@ body:has(#hd-wallet-ui-container .modal.active) #hd-wallet-ui-container .nav-bar
|
|
|
1286
1322
|
}
|
|
1287
1323
|
|
|
1288
1324
|
#hd-wallet-ui-container .account-modal-close {
|
|
1289
|
-
position:
|
|
1290
|
-
top: 12px;
|
|
1291
|
-
right: 14px;
|
|
1325
|
+
position: static;
|
|
1292
1326
|
}
|
|
1293
1327
|
|
|
1294
1328
|
#hd-wallet-ui-container .modal-body {
|