This repository was archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 157
/
Copy pathindex.html
113 lines (111 loc) · 3 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
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pubsub in the browser</title>
<link rel="icon" href="favicon.ico" />
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/css/tachyons.min.css"
crossorigin
/>
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/ipfs.css"
crossorigin
/>
<script type="module" src="./src/index.js" defer></script>
</head>
<body class="sans-serif">
<header class="pv3 ph2 ph3-l bg-navy cf mb4">
<a href="https://ipfs.io/" title="ipfs.io">
<img
src="./images/ipfs-logo.svg"
class="v-mid"
style="height: 50px"
/>
</a>
<h1 class="aqua fw2 montserrat dib ma0 pv2 ph1 v-mid fr f3 lh-copy">
Pubsub
</h1>
</header>
<div class="ph3 mb3">
<div class="fw2 ttu f6 teal-muted mb2">API Addr</div>
<input
id="api-url"
value="/ip4/127.0.0.1/tcp/5001"
class="dib w-50 ph1 pv2 monospace input-reset ba b--black-20 border-box"
placeholder="e.g. /ip4/127.0.0.1/tcp/5001"
/>
<button
id="node-connect"
class="dib ph3 pv2 input-reset ba b--black-20 border-box"
>
Connect
</button>
</div>
<div class="ph3 mb3">
<div class="fw2 ttu f6 teal-muted mb2">Connect to peer</div>
<input
id="peer-addr"
class="dib w-50 ph1 pv2 monospace input-reset ba b--black-20 border-box"
placeholder="e.g. /ip4/127.0.0.1/tcp/4002/ipfs/QmPeerId"
/>
<button
id="peer-connect"
class="dib ph3 pv2 input-reset ba b--black-20 border-box"
>
Connect
</button>
</div>
<div class="ph3 mb3">
<div class="fw2 ttu f6 teal-muted mb2">Subscribe to pubsub topic</div>
<input
id="topic"
class="dib w-50 ph1 pv2 monospace input-reset ba b--black-20 border-box"
placeholder="e.g. books"
/>
<button
id="subscribe"
class="dib ph3 pv2 input-reset ba b--black-20 border-box"
>
Subscribe
</button>
</div>
<div class="ph3 mb3">
<div class="fw2 ttu f6 teal-muted mb2">Send pubsub message</div>
<input
id="message"
class="dib w-50 ph1 pv2 monospace input-reset ba b--black-20 border-box"
/>
<button
id="send"
class="dib ph3 pv2 input-reset ba b--black-20 border-box"
>
Send
</button>
</div>
<div class="ph3 mb3">
<div class="fw2 ttu f6 teal-muted mb2">Console</div>
<div
id="console"
class="
f7
db
w-100
ph1
pv2
monospace
input-reset
ba
b--black-20
border-box
overflow-scroll
"
style="height: 300px"
></div>
</div>
</body>
</html>