From c7d0d1e9ea77c5d8fa859aa444cd90dcfcc1d5b4 Mon Sep 17 00:00:00 2001 From: Olivia Thet Date: Wed, 13 Mar 2024 18:39:10 -0400 Subject: [PATCH] add dropdown components to import standalone mode --- import/standalone.html | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/import/standalone.html b/import/standalone.html index a4ff2a7..7a49caf 100644 --- a/import/standalone.html +++ b/import/standalone.html @@ -17,11 +17,14 @@ max-width: 1024px; margin: auto; } + form { + text-align: left; + } label { display:inline-block; width: 8em; } - input[type=text] { + input[type=text], select { width: 40em; margin: 0.5em; font-family: 'Courier New', Courier, monospace; @@ -34,7 +37,7 @@ input:disabled { background-color: rgb(239, 243, 240); } - #inject-import-bundle, #encrypt-wallet-bundle { + #inject-import-bundle, #encrypt-wallet-bundle, #encrypt-key-bundle { color: white; width: 10em; font-size: 1em; @@ -64,20 +67,32 @@ -

Import Key Material

-

Bundles

+

Initialize Import


+

Import Wallet

- +

+

Import Private Key

+
+ + + + + +
+

Message log

Below we display a log of the messages sent / received. The forms above send messages, and the code communicates results by sending events via the postMessage API.

@@ -327,14 +342,14 @@

Message log

e.preventDefault(); window.postMessage({ "type": "EXTRACT_WALLET_ENCRYPTED_BUNDLE", - "value": document.getElementById("plaintext").value, + "value": document.getElementById("wallet-plaintext").value, }) }, false); document.getElementById("encrypt-key-bundle").addEventListener("click", async e => { e.preventDefault(); window.postMessage({ "type": "EXTRACT_KEY_ENCRYPTED_BUNDLE", - "value": document.getElementById("plaintext").value, + "value": document.getElementById("key-plaintext").value, "keyFormat": document.getElementById("keyFormat").value, "publicKey": document.getElementById("publicKey").value, })