forked from believethehype/nostdress
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
262 lines (252 loc) · 9.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<!DOCTYPE html>
<html lang="cs">
<head>
<title>21B.cz Nostdress</title>
<meta charset="utf-8" />
<link rel="icon" type="image/png" href="https://i.imgur.com/4yaPtA2.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="stylesheet"
type="text/css"
href="//fonts.googleapis.com/css?family=PT+Sans"
/>
<link rel="stylesheet" href="/static/style.css" />
</head>
<body>
<main id="main">
<div class="title">{{ siteName }}</div>
<script>
</script>
<div class="tagline">21B.cz Nostdress - Server Lightningových Adres s podporou Nostru</div>
<div class="owner">
<a class="owner-button" :href="siteOwnerURL" target="_blank">
Doménu vlastní: <span class="owner-name">{{ siteOwnerName }}</span>
</a>
<a class="owner-button" href="nostr://npub189v2j2r4q68v5vcua8pqzskvefaue25fy7caa0repjwu2mkpxucqsa9dr5" target="_blank">
Nostr profil: <span class="owner-name">{{ siteOwnerName }}</span>
</a>
</div>
<div class="card">
<div class="description">
Pro připojení vlastního uzlu k <b>Lightning adrese</b> použijte níže uvedený formulář.
</div>
<form action="/grab" method="post">
<div class="field">
<div class="row">
<label for="name">Požadované jméno</label>
</div>
<div class="domain-wrapper">
<input class="input" name="name" id="name" />
<span v-if="domains.length == 1">@{{ domains[0] }}</span>
<span v-if="domains.length > 1">@</span>
<select
name="domain"
id="domain"
v-if="domains.length > 1"
>
<option v-for="domain in domains" :value="domain">
{{ domain }}
</option>
</select>
</div>
</div>
<div class="field">
<label for="kind"> Typ backendu uzlu </label>
<select name="kind" id="kind" id="kind" v-model="kind">
<option disabled value="">Vyberte jeden:</option>
<option value="forward">Přesměrování adresy</option>
<option value="lnbits">LNbits</option>
<option value="lnd">LND</option>
<option value="commando">Commando (CLN)</option>
<option value="sparko">Sparko (CLN)</option>
<option value="eclair">Eclair</option>
<option value="lnpay">LNPay</option>
</select>
</div>
<div v-if="kind == 'forward'">
<div class="field">
<label for="host">
Přesměrovaní adresy (.well-known)
</label>
<p><i><b> Příklad:</b> </p>
https://lnpay.cz/.well-known/lnurlp/satoshi</i><br>
<input
class="input full-width"
name="host"
id="host"
placeholder="https://lnpay.cz/.well-known/lnurlp/satoshi"
/>
</div>
</div>
<div v-if="kind == 'lnd'">
<div class="field">
<label for="host">
LND REST Host (Protokol + IP/Doména + Port)
</label>
<input
class="input full-width"
name="host"
id="host"
placeholder="http://mujlightningsxsbsxxs.onion:8080"
/>
</div>
<div class="field">
<label for="macaroon"> Invoice Macaroon (base64 zakódovaný/encoded)</label>
<input
class="input full-width"
name="key"
id="macaroon"
placeholder="012312432324"
/>
</div>
</div>
<div v-if="kind == 'sparko' || kind == 'lnbits'">
<div class="field">
<label for="host"> Host (Protokol + IP/Doména + Port) </label>
<input
class="input full-width"
name="host"
id="host"
placeholder="http://192.168.16.64:3007"
/>
</div>
<div class="field">
<label for="key"> Key </label>
<input class="input full-width" name="key" id="key" />
</div>
</div>
<div v-if="kind == 'eclair'">
<div class="field">
<label for="host"> Host (Protocol + IP or Domain + Port) </label>
<input
class="input full-width"
name="host"
id="host"
placeholder="http://myeclair.com"
/>
</div>
<div>
<p>
Nezadávejte zde heslo Eclair ani neopatrně nezveřejňujte svůj uzel Eclair. Postupujte raději podle těchto pokynů:.
<a
href="https://gist.github.com/fiatjaf/8e74740d30763713154de15562e08789#file-exposing-eclair-md"
></a
>
(nebo dle nějakých lepších).
</p>
</div>
</div>
<div v-if="kind == 'lnpay'">
<div class="field">
<label for="pak"> Public Access Key (pak) </label>
<input class="input full-width" name="pak" id="pak" />
</div>
<div class="field">
<label for="waki"> Wallet Invoice Key (waki) </label>
<input class="input full-width" name="waki" id="waki" />
</div>
</div>
<div class="field">
<label style="float: right">
Toto je nová Lightning adresa
<input type="checkbox" v-model="isNew" />
</label>
</div>
<div v-if="kind == 'commando'">
<div class="field">
<label for="nodeid">Node ID (pubkey)</label>
<input
class="input full-width"
name="nodeid"
id="nodeid"
placeholder="02c16cca44562b590dd279c942200bdccfd4f990c3a69fad620c10ef2f8228eaff"
/>
</div>
<div class="field">
<label for="host">Node IP + Port</label>
<input
class="input full-width"
name="host"
id="host"
placeholder="10.147.17.32:9735"
/>
</div>
<div class="field">
<label for="rune">Rune</label>
<input class="input full-width" name="rune" id="rune" />
</div>
</div>
<br />
<div class="field" v-if="!isNew">
<label for="pin"> Tajný pin (Secret PIN) </label>
<input class="input full-width" name="pin" id="pin" />
</div>
<div class="field">
<label for="npub">
Nostr npub (nepovinné, volitelné pro služby Nostr)
</label>
<input
class="input full-width"
name="npub"
id="npub"
placeholder="npub123..."
/>
<div class="field" id="nostrnotifications" v-if="notifynostr == 'true'" >
<label style="float: right">
Dostat notifikaci od <a href="nostr://npub1czech0rgapw4nerf242nnxuu7c74phm0v5s0zq74hycsr403ptaqfy0up3">chatbota</a> na Nostru za:</label>
<label style="float: left">
ZAPnutí s komentářem
<input type="checkbox" id="notifycomments" name="notifycomments" v-model="notifycomments" />
</label>
<label style="float: left">
ZAPnutí bez komentářem
<input type="checkbox" id="notifyzaps" name="notifyzaps" v-model="notifyzaps" />
</label>
<label style="float: left">
SATnutí (non-ZAP)
<input type="checkbox" id="notifynonzaps" name="notifynonzaps" v-model="notifynonzaps" checked/>
</label>
</label>
</div>
</div>
<button class="submit" v-if="allowregistration == 'true'" >Odeslat</button>
</div>
<div class="field"> <label style="float: left" v-if="allowregistration == 'false'">
Registrace byla zakázána administrátorem této domény</label></div>
</form>
<div class="resources">
<a
class="resource-button"
href="https://github.com/andrerfneves/lightning-address#readme"
target="_blank"
>
Dokumentace projektu Lightningových adres
</a>
<a
class="resource-button"
target="_blank"
href="https://github.com/3CZPlay/nostdress"
>
Hostujte tento server také na své doméně!!
</a>
</div>
</main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.2.2/vue.global.prod.min.js"></script>
<script>
const initial = {} // REPLACED WITH SERVER DATA //
const Main = {
data() {
return {
kind: 'lnd',
isNew: true,
...initial
}
},
mounted() {
this.kind = ''
}
}
Vue.createApp(Main).mount('#main')
</script>
</body>
</html>