(feat): rename example-usage to just example
Some checks failed
CI / rustfmt (push) Successful in 17s
CI / clippy (push) Failing after 1m16s
CI / wasm build (push) Successful in 1m17s
CI / example (push) Successful in 1m29s
CI / test (push) Successful in 1m49s
CI / duplicate code (push) Successful in 12s
CI / web client (push) Failing after 27s
CI / cargo-machete (push) Successful in 1m10s
CI / cargo-deny (push) Failing after 2m20s

(feat): add the example's web-client dist folder to a gitignore
(fix): format issues
(fix): a lot of duplicate code
This commit is contained in:
Alois 2026-06-27 03:20:25 +02:00
commit 89a20044a5
43 changed files with 528 additions and 1619 deletions

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MTP Web Client</title>
<style>
body { background: #111; color: #eee; font-family: "Public Sans", sans-serif; }
label, input, textarea { display: block; margin-bottom: 0.5rem; }
input, textarea, button { font-family: "Public Sans", sans-serif; }
input, textarea { background: #222; color: #eee; }
#status, #key-status { white-space: pre-wrap; }
.state { color: #ff0; }
.received { color: #0ff; }
.error { color: #f00; }
</style>
</head>
<body>
<h1>MTP WebTransport Client</h1>
<label for="server-url">Server URL</label>
<input id="server-url" value="https://127.0.0.1:8080" />
<label for="host-public-key">Host public key bundle hex</label>
<textarea id="host-public-key" placeholder="Paste PublicKeyBundle bytes as hex"></textarea>
<label for="client-public-key">Generated client public key bundle hex</label>
<textarea id="client-public-key" readonly></textarea>
<div>
<button id="generate-keypair" type="button">Generate keypair</button>
<button id="connect" type="button" disabled>Connect</button>
<button id="clear-keys" type="button">Clear saved keys</button>
</div>
<div id="key-status">Initializing...</div>
<div id="status"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>