1
0
mirror of https://github.com/nbd-wtf/satdress.git synced 2024-11-11 16:30:35 +00:00

prettier and makefile quibbles.

This commit is contained in:
fiatjaf 2021-08-28 09:13:32 -03:00
parent 2ff031ce4e
commit 8a659a98e6
3 changed files with 55 additions and 65 deletions

11
.prettierrc Normal file
View File

@ -0,0 +1,11 @@
requirePragma: false
semi: false
arrowParens: avoid
insertPragma: false
printWidth: 80
proseWrap: preserve
singleQuote: true
trailingComma: none
useTabs: false
jsxBracketSameLine: false
bracketSpacing: false

View File

@ -1,4 +1,4 @@
satdress: $(shell find . -name "*.go") index.html go.mod satdress: $(shell find . -name "*.go") $(shell find . -name "*.html") $(shell find . -name "*.css") go.mod
CC=$$(which musl-gcc) go build -ldflags='-s -w -linkmode external -extldflags "-static"' -o ./satdress CC=$$(which musl-gcc) go build -ldflags='-s -w -linkmode external -extldflags "-static"' -o ./satdress
deploy: satdress deploy: satdress

View File

@ -4,34 +4,31 @@
<title>Satdress - Federated Lightning Address Server</title> <title>Satdress - Federated Lightning Address Server</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<link rel="icon" type="image/png" href="https://i.imgur.com/4yaPtA2.png" /> <link rel="icon" type="image/png" href="https://i.imgur.com/4yaPtA2.png" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/static/style.css" /> <link rel="stylesheet" href="/static/style.css" />
<meta <meta
property="og:title" property="og:title"
content="Satdress - Federated Lightning Address Server" content="Satdress - Federated Lightning Address Server"
/> />
<meta <meta property="og:type" content="website" />
property="og:type" <meta property="og:url" content="https://github.com/fiatjaf/satdress" />
content="website"
/>
<meta
property="og:url"
content="https://github.com/fiatjaf/satdress"
/>
<meta <meta
property="og:description" property="og:description"
content="Satdress is a Federated Lightning Address server allowing you to connect Lightning nodes to Lightning Addresses. Satdress follows the Lightning Address protocol and aims to provide an easy-to-deploy Bridge Server." content="Satdress is a Federated Lightning Address server allowing you to connect Lightning nodes to Lightning Addresses. Satdress follows the Lightning Address protocol and aims to provide an easy-to-deploy Bridge Server."
/> />
<meta <meta property="og:image" content="https://i.imgur.com/PsT2uoR.png" />
property="og:image"
content="https://i.imgur.com/PsT2uoR.png"
/>
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@fiatjaf" /> <meta name="twitter:site" content="@fiatjaf" />
<meta name="twitter:creator" content="@fiatjaf" /> <meta name="twitter:creator" content="@fiatjaf" />
<meta name="twitter:title" content="Satdress - Federated Lightning Address Server" /> <meta
<meta name="twitter:description" content="Satdress is a Federated Lightning Address server allowing you to connect Lightning nodes to Lightning Addresses. Satdress follows the Lightning Address protocol and aims to provide an easy-to-deploy Bridge Server." /> name="twitter:title"
content="Satdress - Federated Lightning Address Server"
/>
<meta
name="twitter:description"
content="Satdress is a Federated Lightning Address server allowing you to connect Lightning nodes to Lightning Addresses. Satdress follows the Lightning Address protocol and aims to provide an easy-to-deploy Bridge Server."
/>
<meta name="twitter:image" content="https://i.imgur.com/PsT2uoR.png" /> <meta name="twitter:image" content="https://i.imgur.com/PsT2uoR.png" />
</head> </head>
<body> <body>
@ -39,31 +36,27 @@
<div class="title">{{ siteName }}</div> <div class="title">{{ siteName }}</div>
<div class="tagline">Federated Lightning Address Server</div> <div class="tagline">Federated Lightning Address Server</div>
<div class="owner"> <div class="owner">
<a <a class="owner-button" :href="siteOwnerURL" target="_blank">
class="owner-button"
:href="siteOwnerURL"
target="_blank">
Brought to you by <span class="owner-name">{{ siteOwnerName }}</span> Brought to you by <span class="owner-name">{{ siteOwnerName }}</span>
</a> </a>
</div> </div>
<div class="card"> <div class="card">
<div class="description">Use the form below to connect your own node to a <b>Lightning Address</b>.</div> <div class="description">
Use the form below to connect your own node to a
<b>Lightning Address</b>.
</div>
<form action="/grab" method="post"> <form action="/grab" method="post">
<div class="field"> <div class="field">
<div class="row"> <div class="row">
<label for="name"> <label for="name"> Desired Username </label>
Desired Username
</label>
</div> </div>
<div class="domain-wrapper"> <div class="domain-wrapper">
<input class="input" name="name" id="name"> <input class="input" name="name" id="name" />
<span class="suffix">@{{ domain }}</span> <span class="suffix">@{{ domain }}</span>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label for="kind"> <label for="kind"> Node Backend Type </label>
Node Backend Type
</label>
<select name="kind" id="kind" id="kind" v-model="kind"> <select name="kind" id="kind" id="kind" v-model="kind">
<option value="lnd">LND</option> <option value="lnd">LND</option>
<option value="sparko">Sparko</option> <option value="sparko">Sparko</option>
@ -73,58 +66,44 @@
</div> </div>
<div v-if="kind == 'lnd'"> <div v-if="kind == 'lnd'">
<div class="field"> <div class="field">
<label for="host"> <label for="host"> Host (IP or Domain + Port) </label>
Host (IP or Domain + Port) <input class="input full-width" name="host" id="host" />
</label>
<input class="input full-width" name="host" id="host">
</div> </div>
<div class="field"> <div class="field">
<label for="key"> <label for="key"> Invoice Macaroon </label>
Invoice Macaroon <input class="input full-width" name="key" id="key" />
</label>
<input class="input full-width" name="key" id="key">
</div> </div>
</div> </div>
<div v-if="kind == 'sparko' || kind == 'lnbits'"> <div v-if="kind == 'sparko' || kind == 'lnbits'">
<div class="field"> <div class="field">
<label for="host"> <label for="host"> Host (IP or Domain + Port) </label>
Host (IP or Domain + Port) <input class="input full-width" name="host" id="host" />
</label>
<input class="input full-width" name="host" id="host">
</div> </div>
<div class="field"> <div class="field">
<label for="key"> <label for="key"> Key </label>
Key <input class="input full-width" name="key" id="key" />
</label>
<input class="input full-width" name="key" id="key">
</div> </div>
</div> </div>
<div v-if="kind == 'lnpay'"> <div v-if="kind == 'lnpay'">
<div class="field"> <div class="field">
<label for="pak"> <label for="pak"> Public Access Key (pak) </label>
Public Access Key (pak) <input class="input full-width" name="pak" id="pak" />
</label>
<input class="input full-width" name="pak" id="pak">
</div> </div>
<div class="field"> <div class="field">
<label for="waki"> <label for="waki"> Wallet Invoice Key (waki) </label>
Wallet Invoice Key (waki) <input class="input full-width" name="waki" id="waki" />
</label>
<input class="input full-width" name="waki" id="waki">
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label style="float: right"> <label style="float: right">
This is a new Lightning Address This is a new Lightning Address
<input type="checkbox" v-model="isNew"> <input type="checkbox" v-model="isNew" />
</label> </label>
</div> </div>
<br /> <br />
<div class="field" v-if="!isNew"> <div class="field" v-if="!isNew">
<label for="pin"> <label for="pin"> Secret PIN </label>
Secret PIN <input class="input full-width" name="pin" id="pin" />
</label>
<input class="input full-width" name="pin" id="pin">
</div> </div>
<button class="submit">Submit</button> <button class="submit">Submit</button>
</form> </form>
@ -133,20 +112,20 @@
<a <a
class="resource-button" class="resource-button"
href="https://github.com/andrerfneves/lightning-address#readme" href="https://github.com/andrerfneves/lightning-address#readme"
target="_blank"> target="_blank"
>
Lightning Address Documentation Lightning Address Documentation
</a> </a>
<a <a
class="resource-button" class="resource-button"
target="_blank" target="_blank"
href="https://github.com/fiatjaf/satdress"> href="https://github.com/fiatjaf/satdress"
>
Host this server on your domain! Host this server on your domain!
</a> </a>
</div> </div>
</main> </main>
<script <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.2.2/vue.global.prod.min.js"></script>
src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.2.2/vue.global.prod.min.js"
></script>
<script> <script>
const initial = {} // REPLACED WITH SERVER DATA // const initial = {} // REPLACED WITH SERVER DATA //
@ -155,12 +134,12 @@
return { return {
kind: 'lnd', kind: 'lnd',
isNew: true, isNew: true,
...initial, ...initial
} }
} }
}; }
Vue.createApp(Main).mount('#main'); Vue.createApp(Main).mount('#main')
</script> </script>
</body> </body>
</html> </html>