mirror of https://github.com/lukechilds/lnbits.git
fiatjaf
4 years ago
committed by
fiatjaf
5 changed files with 143 additions and 24 deletions
@ -0,0 +1,35 @@ |
|||||
|
<q-expansion-item |
||||
|
group="extras" |
||||
|
icon="info" |
||||
|
label="Instructions" |
||||
|
default-opened |
||||
|
> |
||||
|
<q-card> |
||||
|
<q-card-section> |
||||
|
To access an LNbits wallet from a mobile phone, |
||||
|
<ol> |
||||
|
<li> |
||||
|
Install either <a href="https://zeusln.app">Zeus</a> or |
||||
|
<a href="https://bluewallet.io/">BlueWallet</a>; |
||||
|
</li> |
||||
|
<li> |
||||
|
Go to <code>Add a wallet / Import wallet</code> on BlueWallet or |
||||
|
<code>Settings / Add a new node</code> on Zeus. |
||||
|
</li> |
||||
|
<li>Select the desired wallet on this page;</li> |
||||
|
<li>Scan one of the two QR codes from the mobile wallet.</li> |
||||
|
</ol> |
||||
|
<ul> |
||||
|
<li> |
||||
|
<em>Invoice</em> URLs mean the mobile wallet will only have the |
||||
|
authorization to read your payments and invoices and generate new |
||||
|
invoices. |
||||
|
</li> |
||||
|
<li> |
||||
|
<em>Admin</em> URLs mean the mobile wallet will be able to pay |
||||
|
invoices.. |
||||
|
</li> |
||||
|
</ul> |
||||
|
</q-card-section> |
||||
|
</q-card> |
||||
|
</q-expansion-item> |
@ -0,0 +1,19 @@ |
|||||
|
<q-expansion-item group="extras" icon="info" label="LndHub info"> |
||||
|
<q-card> |
||||
|
<q-card-section> |
||||
|
<p> |
||||
|
LndHub is a protocol invented by |
||||
|
<a href="https://bluewallet.io/">BlueWallet</a> that allows mobile |
||||
|
wallets to query payments and balances, generate invoices and make |
||||
|
payments from accounts that exist on a server. The protocol is a |
||||
|
collection of HTTP endpoints exposed through the internet. |
||||
|
</p> |
||||
|
<p> |
||||
|
For a wallet that supports it, reading a QR code that contains the URL |
||||
|
along with secret access credentials should enable access. Currently it |
||||
|
is supported by <a href="https://zeusln.app">Zeus</a> and |
||||
|
<a href="https://bluewallet.io/">BlueWallet</a>. |
||||
|
</p> |
||||
|
</q-card-section> |
||||
|
</q-card> |
||||
|
</q-expansion-item> |
@ -1,28 +1,93 @@ |
|||||
{% extends "base.html" %} {% from "macros.jinja" import window_vars with context |
{% extends "base.html" %} {% from "macros.jinja" import window_vars with context |
||||
%} {% block page %} |
%} {% block page %} {% raw %} |
||||
|
<div class="row q-col-gutter-md"> |
||||
|
<div class="col-12 col-md-8 col-lg-7 q-gutter-y-md"> |
||||
|
<div class="row q-col-gutter-md"> |
||||
|
<q-card |
||||
|
v-for="type in ['invoice', 'admin']" |
||||
|
v-bind:key="type" |
||||
|
class="q-pa-sm q-ma-sm col-5" |
||||
|
> |
||||
|
<q-card-section class="q-pa-none"> |
||||
|
<div class="text-center"> |
||||
|
<a :href="selectedWallet[type]"> |
||||
|
<q-responsive :ratio="1" class="q-mx-sm"> |
||||
|
<qrcode |
||||
|
:value="selectedWallet[type]" |
||||
|
:options="{width: 800}" |
||||
|
class="rounded-borders" |
||||
|
></qrcode> |
||||
|
</q-responsive> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="row q-mt-lg items-center justify-center"> |
||||
|
<q-btn |
||||
|
outline |
||||
|
color="grey" |
||||
|
@click="copyText(selectedWallet[type])" |
||||
|
class="text-center q-mb-md" |
||||
|
>Copy LndHub {{type}} URL</q-btn |
||||
|
> |
||||
|
</div> |
||||
|
</q-card-section> |
||||
|
</q-card> |
||||
|
</div> |
||||
|
|
||||
|
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card"> |
||||
|
<q-form class="q-gutter-md"> |
||||
|
<q-select |
||||
|
filled |
||||
|
dense |
||||
|
v-model="selectedWallet" |
||||
|
:options="wallets" |
||||
|
label="Select wallet:" |
||||
|
> |
||||
|
</q-select> |
||||
|
</q-form> |
||||
|
</q-card> |
||||
|
</div> |
||||
|
|
||||
|
{% endraw %} |
||||
|
|
||||
|
<div class="col-12 col-md-4 col-lg-5 q-gutter-y-md"> |
||||
<q-card> |
<q-card> |
||||
<q-card-section> |
<q-card-section> |
||||
<h5 class="text-subtitle1 q-mt-none q-mb-md"></h5> |
<h6 class="text-subtitle1 q-my-none"> |
||||
{% for wallet in g.user.wallets %} |
LNbits LndHub extension |
||||
<q-card> |
</h6> |
||||
<code class="text-caption"> |
</q-card-section> |
||||
lndhub://admin:{{wallet.adminkey}}@{% raw %}{{baseURL}}{% endraw %}/lndhub/ext/ |
<q-card-section class="q-pa-none"> |
||||
</code> |
<q-separator></q-separator> |
||||
</q-card> |
<q-list> |
||||
{% endfor %} |
{% include "lndhub/_instructions.html" %} |
||||
<q-separator class="q-my-lg"></q-separator> |
<q-separator></q-separator> |
||||
|
{% include "lndhub/_lndhub.html" %} |
||||
|
</q-list> |
||||
</q-card-section> |
</q-card-section> |
||||
</q-card> |
</q-card> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
{% endblock %} {% block scripts %} {{ window_vars(user) }} |
{% endblock %} {% block scripts %} {{ window_vars(user) }} |
||||
|
<script src="{{ url_for('static', filename='vendor/vue-qrcode@1.0.2/vue-qrcode.min.js') }}"></script> |
||||
<script> |
<script> |
||||
|
Vue.component(VueQrcode.name, VueQrcode) |
||||
|
|
||||
new Vue({ |
new Vue({ |
||||
el: '#vue', |
el: '#vue', |
||||
mixins: [windowMixin], |
mixins: [windowMixin], |
||||
data: function () { |
data: function () { |
||||
|
var wallets = ({{ g.user.wallets | tojson }}).map(LNbits.map.wallet).map(wallet => ({ |
||||
|
label: wallet.name, |
||||
|
admin: `lndhub://admin:${wallet.adminkey}@${location.protocol}//${location.host}/lndhub/ext/`, |
||||
|
invoice: `lndhub://invoice:${wallet.inkey}@${location.protocol}//${location.host}/lndhub/ext/` |
||||
|
})) |
||||
|
|
||||
return { |
return { |
||||
baseURL: location.protocol + '//' + location.hostname |
wallets: wallets, |
||||
} |
selectedWallet: wallets[0] |
||||
} |
} |
||||
|
}, |
||||
}) |
}) |
||||
</script> |
</script> |
||||
{% endblock %} |
{% endblock %} |
||||
|
Loading…
Reference in new issue