From 4228d834cd4a119dc80ad53e9dec3b1d615b797b Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 16 Sep 2023 18:03:15 -0400 Subject: [PATCH] feat: add very simplistic boot status --- dist/index.html | 16 +++++++++++++--- src/index.ts | 10 ++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/dist/index.html b/dist/index.html index ebfab2d..ce34ff0 100644 --- a/dist/index.html +++ b/dist/index.html @@ -8,12 +8,14 @@ padding: 0; font-family: Arial, sans-serif; } + #browser-container { width: 100%; height: 100vh; display: flex; flex-direction: column; } + #address-bar-container { padding: 10px; background-color: #f1f1f1; @@ -22,6 +24,7 @@ justify-content: space-between; align-items: center; } + #address-bar { flex-grow: 1; padding: 10px; @@ -29,6 +32,7 @@ border-radius: 3px; margin-right: 10px; } + #go-button { padding: 10px 20px; border: none; @@ -37,19 +41,25 @@ cursor: pointer; border-radius: 3px; } + #web-content { flex-grow: 1; } + + #booting { + margin: 1em; + } - +
- - + Booting + +
diff --git a/src/index.ts b/src/index.ts index 6cc0011..4525d6b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -83,6 +83,16 @@ async function boot() { } await bootup(); + + await Promise.all([ + ethClient.ready(), + handshakeClient.ready(), + ipfsClient.ready(), + ]); + + document.getElementById("booting")!.style.display = "none"; + (document.getElementById("address-bar") as HTMLInputElement).disabled = false; + (document.getElementById("go-button") as HTMLButtonElement).disabled = false; } async function bootup() {