feat: add very simplistic boot status
This commit is contained in:
parent
00d1bd2ab5
commit
4228d834cd
|
@ -8,12 +8,14 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
#browser-container {
|
#browser-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
#address-bar-container {
|
#address-bar-container {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: #f1f1f1;
|
background-color: #f1f1f1;
|
||||||
|
@ -22,6 +24,7 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#address-bar {
|
#address-bar {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
@ -29,6 +32,7 @@
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#go-button {
|
#go-button {
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -37,19 +41,25 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#web-content {
|
#web-content {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#booting {
|
||||||
|
margin: 1em;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<title></title>
|
<title></title>
|
||||||
<script type="application/javascript" src="../lib/index.js"></script>
|
<script type="application/javascript" src="./index.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="browser-container">
|
<div id="browser-container">
|
||||||
<div id="address-bar-container">
|
<div id="address-bar-container">
|
||||||
<input type="text" id="address-bar" placeholder="Enter URL...">
|
<span id="booting">Booting</span>
|
||||||
<button id="go-button">Go</button>
|
<input type="text" id="address-bar" placeholder="Enter URL..." disabled>
|
||||||
|
<button id="go-button" disabled>Go</button>
|
||||||
</div>
|
</div>
|
||||||
<iframe id="web-content" src="about:blank" frameborder="0" style="width: 100%; height: 100%;"></iframe>
|
<iframe id="web-content" src="about:blank" frameborder="0" style="width: 100%; height: 100%;"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
|
10
src/index.ts
10
src/index.ts
|
@ -83,6 +83,16 @@ async function boot() {
|
||||||
}
|
}
|
||||||
|
|
||||||
await bootup();
|
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() {
|
async function bootup() {
|
||||||
|
|
Loading…
Reference in New Issue