@1shotapi/ows-signer 0.4.5 → 0.4.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/html/signer.css +14 -0
- package/package.json +1 -1
- package/src/ui.js +18 -6
package/html/signer.css
CHANGED
|
@@ -123,6 +123,20 @@ body.ows-ceremony-open {
|
|
|
123
123
|
padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
.ows-signer-ui--key-entry .ows-ceremony-body {
|
|
127
|
+
flex: 1 1 auto;
|
|
128
|
+
min-height: 0;
|
|
129
|
+
overflow-y: auto;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.ows-signer-ui--key-entry .ows-password {
|
|
133
|
+
margin-top: 12px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ows-signer-ui--key-entry .ows-password + .ows-ceremony-text {
|
|
137
|
+
margin-top: 8px;
|
|
138
|
+
}
|
|
139
|
+
|
|
126
140
|
.ows-signer-ui:empty {
|
|
127
141
|
display: none;
|
|
128
142
|
}
|
package/package.json
CHANGED
package/src/ui.js
CHANGED
|
@@ -445,14 +445,24 @@ export function promptPrivateKey() {
|
|
|
445
445
|
}
|
|
446
446
|
cancelPendingCeremonyConfirm();
|
|
447
447
|
clearUi();
|
|
448
|
+
root.className =
|
|
449
|
+
"ows-signer-ui ows-signer-ui--ceremony ows-signer-ui--key-entry";
|
|
450
|
+
setCeremonyOpen(true);
|
|
448
451
|
return new Promise((resolve, reject) => {
|
|
452
|
+
const grab = document.createElement("div");
|
|
453
|
+
grab.className = "ows-ceremony-grab";
|
|
454
|
+
grab.setAttribute("aria-hidden", "true");
|
|
455
|
+
|
|
449
456
|
const header = document.createElement("h2");
|
|
450
457
|
header.className = "ows-ceremony-header";
|
|
451
458
|
header.textContent = "Import private key";
|
|
452
|
-
|
|
453
|
-
body
|
|
454
|
-
body.
|
|
455
|
-
|
|
459
|
+
|
|
460
|
+
const body = document.createElement("div");
|
|
461
|
+
body.className = "ows-ceremony-body";
|
|
462
|
+
const text = document.createElement("p");
|
|
463
|
+
text.className = "ows-ceremony-text";
|
|
464
|
+
text.textContent =
|
|
465
|
+
"Paste your EVM private key to recover your 1Shot wallet accounts.";
|
|
456
466
|
const input = document.createElement("input");
|
|
457
467
|
input.type = "password";
|
|
458
468
|
input.className = "ows-password";
|
|
@@ -463,6 +473,8 @@ export function promptPrivateKey() {
|
|
|
463
473
|
errorEl.className = "ows-ceremony-text";
|
|
464
474
|
errorEl.style.color = "tomato";
|
|
465
475
|
errorEl.hidden = true;
|
|
476
|
+
body.append(text, input, errorEl);
|
|
477
|
+
|
|
466
478
|
const confirmBtn = document.createElement("button");
|
|
467
479
|
confirmBtn.type = "button";
|
|
468
480
|
confirmBtn.className = "ows-confirm";
|
|
@@ -472,7 +484,7 @@ export function promptPrivateKey() {
|
|
|
472
484
|
denyBtn.className = "ows-deny";
|
|
473
485
|
denyBtn.textContent = "Cancel";
|
|
474
486
|
const actions = document.createElement("div");
|
|
475
|
-
actions.className = "ows-actions";
|
|
487
|
+
actions.className = "ows-ceremony-actions";
|
|
476
488
|
actions.append(confirmBtn, denyBtn);
|
|
477
489
|
|
|
478
490
|
const finish = (fn) => {
|
|
@@ -493,7 +505,7 @@ export function promptPrivateKey() {
|
|
|
493
505
|
finish(() => reject(new CeremonyDeniedError()));
|
|
494
506
|
});
|
|
495
507
|
|
|
496
|
-
root.append(header, body,
|
|
508
|
+
root.append(grab, header, body, actions);
|
|
497
509
|
input.focus();
|
|
498
510
|
});
|
|
499
511
|
}
|