feat: add very simplistic boot status

This commit is contained in:
Derrick Hammer 2023-09-16 18:03:15 -04:00
parent 00d1bd2ab5
commit 4228d834cd
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 23 additions and 3 deletions

16
dist/index.html vendored
View File

@ -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;
}
</style>
<title></title>
<script type="application/javascript" src="../lib/index.js"></script>
<script type="application/javascript" src="./index.js"></script>
</head>
<body>
<div id="browser-container">
<div id="address-bar-container">
<input type="text" id="address-bar" placeholder="Enter URL...">
<button id="go-button">Go</button>
<span id="booting">Booting</span>
<input type="text" id="address-bar" placeholder="Enter URL..." disabled>
<button id="go-button" disabled>Go</button>
</div>
<iframe id="web-content" src="about:blank" frameborder="0" style="width: 100%; height: 100%;"></iframe>
</div>

View File

@ -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() {