satdress-custom2/index.html

167 lines
5.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>Satdress - Federated Lightning Address Server</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" href="/static/style.css" />
</head>
<body>
<main id="main">
<div class="title">{{ siteName }}</div>
<div class="tagline">Federated Lightning Address Server</div>
<div class="owner">
<a class="owner-button" :href="siteOwnerURL" target="_blank">
Brought to you by <span class="owner-name">{{ siteOwnerName }}</span>
</a>
</div>
<div class="card">
<div class="description">
Use the form below to connect your own node to a
<b>Lightning Address</b>.
</div>
<form action="/grab" method="post">
<div class="field">
<div class="row">
<label for="name"> Desired Username </label>
</div>
<div class="domain-wrapper">
<input class="input" name="name" id="name" />
<span class="suffix">@{{ domain }}</span>
</div>
</div>
<div class="field">
<label for="kind"> Node Backend Type </label>
<select name="kind" id="kind" id="kind" v-model="kind">
<option disabled value="">Please select one:</option>
<option value="lnd">LND</option>
<option value="eclair">Eclair</option>
<option value="sparko">Sparko</option>
<option value="lnpay">LNPay</option>
<option value="lnbits">LNbits</option>
</select>
</div>
<div v-if="kind == 'lnd'">
<div class="field">
<label for="host">
LND REST Host (Protocol + IP/Domain + Port)
</label>
<input
class="input full-width"
name="host"
id="host"
placeholder="http://mylndonionztxrvxtzrs.onion:8080"
/>
</div>
<div class="field">
<label for="macaroon"> Invoice Macaroon (base64 encoded) </label>
<input
class="input full-width"
name="key"
id="macaroon"
placeholder="V2UgYWxsIGxvdmUgQGZpYXRqYWYhCg=="
/>
</div>
</div>
<div v-if="kind == 'sparko' || kind == 'lnbits'">
<div class="field">
<label for="host"> Host (Protocol + IP or Domain + Port) </label>
<input
class="input full-width"
name="host"
id="host"
placeholder="http://10.147.17.32:9737"
/>
</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>
Don't input your Eclair password here nor expose your Eclair
node carelessly. Follow
<a
href="https://gist.github.com/fiatjaf/8e74740d30763713154de15562e08789#file-exposing-eclair-md"
>these instructions</a
>
instead (or do something better).
</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">
This is a new Lightning Address
<input type="checkbox" v-model="isNew" />
</label>
</div>
<br />
<div class="field" v-if="!isNew">
<label for="pin"> Secret PIN </label>
<input class="input full-width" name="pin" id="pin" />
</div>
<button class="submit">Submit</button>
</form>
</div>
<div class="resources">
<a
class="resource-button"
href="https://github.com/andrerfneves/lightning-address#readme"
target="_blank"
>
Lightning Address Documentation
</a>
<a
class="resource-button"
target="_blank"
href="https://github.com/fiatjaf/satdress"
>
Host this server on your domain!
</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>