generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
103 lines (102 loc) · 3.55 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html>
<head>
<title>Protocol Validator</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles.css" />
<link rel="icon" href="favicon.svg" />
</head>
<body>
<div id="loading">Loading Web5...</div>
<div id="content" style="visibility: hidden">
<header>
<h1 id="heading">Protocol Validator</h1>
<p>
An interactive protocol validator. Install a protocol into a test
browser DWN, then write records to different paths to validate your
structure.
</p>
</header>
<main>
<div id="form-area">
<form id="protocol-form">
<h2>Install a protocol</h2>
<label for="protocol-input" class="sr-only"
>Paste protocol definition JSON here</label
>
<div id="protocol-input-area">
<textarea
id="protocol-input"
placeholder="/* Paste protocol definition JSON here */"
autocomplete="off"
></textarea>
<button id="protocol-button" disabled>Install</button>
</div>
</form>
<div id="protocol-messages">
<span id="protocol-error"></span>
<span id="protocol-success"></span>
</div>
<ul id="protocol-results"></ul>
<form id="record-form">
<h2>Write a record to the DWN protocol</h2>
<label for="record-input" class="sr-only"
>Paste the record payload JSON here</label
>
<div id="record-input-area">
<textarea
id="record-input"
placeholder="/* Paste the record payload JSON here */"
autocomplete="off"
></textarea>
<button id="record-button" disabled>Check</button>
</div>
</form>
<div id="record-messages">
<span id="record-error"></span>
<span id="record-success"></span>
</div>
<ul id="record-results"></ul>
<form id="send-form">
<h2>Send this record to another DWN</h2>
<label for="send-input" class="sr-only"
>Paste the DID of the other DWN here</label
>
<div id="send-input-area">
<textarea
id="send-input"
placeholder="/* Paste the DID of the other DWN here */"
autocomplete="off"
></textarea>
<button id="send-button" disabled>Send</button>
</div>
</form>
<div id="send-messages">
<span id="send-error"></span>
<span id="send-success"></span>
</div>
<form id="read-form">
<h2>Read a record from a DWN protocol</h2>
<label for="read-input" class="sr-only"
>Paste the record payload here</label
>
<div id="read-input-area">
<textarea
id="read-input"
placeholder="/* Paste the record payload here */"
autocomplete="off"
></textarea>
<button id="read-button" disabled>Read</button>
</div>
</form>
<div id="read-messages">
<span id="read-error"></span>
<span id="read-success"></span>
</div>
<ul id="read-results"></ul>
</div>
</main>
</div>
<script type="module" src="./index.js"></script>
</body>
</html>