mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-10 12:32:34 +02:00
trying to fix errors in software gerty
This commit is contained in:
@@ -3,39 +3,39 @@ gertyname }}{% endraw %}{% endblock %}{% block page %} {% raw %}
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
class="q-pa-md row items-start q-gutter-md"
|
class="q-pa-md row items-start q-gutter-md"
|
||||||
v-if="fun_exchange_market_rate || fun_satoshi_quotes"
|
v-if="elements.fun_exchange_market_rate || elements.fun_satoshi_quotes"
|
||||||
>
|
>
|
||||||
<q-card
|
<q-card
|
||||||
v-if="fun_exchange_market_rate"
|
v-if="elements.fun_exchange_market_rate['unit']"
|
||||||
unelevated
|
unelevated
|
||||||
class="q-pa-sm"
|
class="q-pa-sm"
|
||||||
style="background: none !important"
|
style="background: none !important"
|
||||||
>
|
>
|
||||||
<q-card-section class="text-h1 q-pa-none">
|
<q-card-section class="text-h1 q-pa-none">
|
||||||
<small> <b>{{fun_exchange_market_rate["amount"]}}</b></small>
|
<small> <b>{{elements.fun_exchange_market_rate["amount"]}}</b></small>
|
||||||
<small class="text-h4"
|
<small class="text-h4"
|
||||||
>{{fun_exchange_market_rate["unit"].split(" ")[1]}}</small
|
>{{elements.fun_exchange_market_rate["unit"].split(" ")[1]}}</small
|
||||||
>
|
>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<q-card
|
<q-card
|
||||||
v-if="fun_satoshi_quotes['quote']"
|
v-if="elements.fun_satoshi_quotes['quote']"
|
||||||
unelevated
|
unelevated
|
||||||
class="q-pa-none text-body1 blockquote"
|
class="q-pa-none text-body1 blockquote"
|
||||||
style="background: none !important"
|
style="background: none !important"
|
||||||
>
|
>
|
||||||
<blockquote class="text-right" style="max-width: 900px">
|
<blockquote class="text-right" style="max-width: 900px">
|
||||||
<p>"{{fun_satoshi_quotes["quote"]}}"</p>
|
<p>"{{elements.fun_satoshi_quotes["quote"]}}"</p>
|
||||||
<small>~ Satoshi {{fun_satoshi_quotes["date"]}}</small>
|
<small>~ Satoshi {{elements.fun_satoshi_quotes["date"]}}</small>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="q-pa-md row items-start q-gutter-md" v-if="lnbits_wallets_balance">
|
<div class="q-pa-md row items-start q-gutter-md" v-if="elements.lnbits_wallets_balance">
|
||||||
<q-card
|
<q-card
|
||||||
class="q-pa-sm"
|
class="q-pa-sm"
|
||||||
v-for="(wallet, t) in lnbits_wallets_balance"
|
v-for="(wallet, t) in elements.lnbits_wallets_balance"
|
||||||
:style="`background-color: ${wallet.color1} !important`"
|
:style="`background-color: ${wallet.color1} !important`"
|
||||||
unelevated
|
unelevated
|
||||||
class="q-pa-none q-pa-sm"
|
class="q-pa-none q-pa-sm"
|
||||||
@@ -49,11 +49,11 @@ gertyname }}{% endraw %}{% endblock %}{% block page %} {% raw %}
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
class="q-pa-md row items-start q-gutter-md"
|
class="q-pa-md row items-start q-gutter-md"
|
||||||
v-if="dashboard_onchain || dashboard_mining || lightning_dashboard"
|
v-if="elements.dashboard_onchain || elements.dashboard_mining || elements.lightning_dashboard"
|
||||||
>
|
>
|
||||||
<q-card
|
<q-card
|
||||||
class="q-pa-sm"
|
class="q-pa-sm"
|
||||||
v-if="dashboard_onchain[0]"
|
v-if="elements.dashboard_onchain[0]"
|
||||||
unelevated
|
unelevated
|
||||||
class="q-pa-sm"
|
class="q-pa-sm"
|
||||||
>
|
>
|
||||||
@@ -61,40 +61,40 @@ gertyname }}{% endraw %}{% endblock %}{% block page %} {% raw %}
|
|||||||
<div class="text-h6">Onchain</div>
|
<div class="text-h6">Onchain</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section class="q-pa-none">
|
<q-card-section class="q-pa-none">
|
||||||
<p v-for="(item, t) in dashboard_onchain">
|
<p v-for="(item, t) in elements.dashboard_onchain">
|
||||||
<b>{{item[0].value}}: </b>{{item[1].value}}
|
<b>{{item[0].value}}: </b>{{item[1].value}}
|
||||||
</p>
|
</p>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<q-card class="q-pa-sm" v-if="dashboard_mining" unelevated class="q-pa-sm">
|
<q-card class="q-pa-sm" v-if="elements.dashboard_mining" unelevated class="q-pa-sm">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="text-h6">Mining</div>
|
<div class="text-h6">Mining</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section class="q-pa-none">
|
<q-card-section class="q-pa-none">
|
||||||
<p v-for="(item, t) in dashboard_mining">
|
<p v-for="(item, t) in elements.dashboard_mining">
|
||||||
<b>{{item[0].value}}:</b> {{item[1].value}}
|
<b>{{item[0].value}}:</b> {{item[1].value}}
|
||||||
</p>
|
</p>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<q-card class="q-pa-sm" v-if="lightning_dashboard" unelevated class="q-pa-sm">
|
<q-card class="q-pa-sm" v-if="elements.lightning_dashboard" unelevated class="q-pa-sm">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="text-h6">Lightning (Last 7 days)</div>
|
<div class="text-h6">Lightning (Last 7 days)</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section class="q-pa-none">
|
<q-card-section class="q-pa-none">
|
||||||
<p v-for="(item, t) in lightning_dashboard">
|
<p v-for="(item, t) in elements.lightning_dashboard">
|
||||||
<b>{{item[0].value}}:</b> {{item[1].value}}
|
<b>{{item[0].value}}:</b> {{item[1].value}}
|
||||||
</p>
|
</p>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<q-card class="q-pa-sm" v-if="url_checker" unelevated class="q-pa-sm">
|
<q-card class="q-pa-sm" v-if="elements.url_checker" unelevated class="q-pa-sm">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="text-h6">Servers to check</div>
|
<div class="text-h6">Servers to check</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section class="q-pa-none">
|
<q-card-section class="q-pa-none">
|
||||||
<div class="row q-pb-md" v-for="(item, t) in url_checker">
|
<div class="row q-pb-md" v-for="(item, t) in elements.url_checker">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<small>
|
<small>
|
||||||
<b style="word-wrap: break-word; max-width: 230px; display: block">
|
<b style="word-wrap: break-word; max-width: 230px; display: block">
|
||||||
@@ -150,10 +150,15 @@ gertyname }}{% endraw %}{% endblock %}{% block page %} {% raw %}
|
|||||||
mixins: [windowMixin],
|
mixins: [windowMixin],
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
lnbits_wallets_balance: {},
|
elements:{
|
||||||
dashboard_onchain: {},
|
lnbits_wallets_balance: [],
|
||||||
fun_satoshi_quotes: {},
|
dashboard_onchain: [],
|
||||||
fun_exchange_market_rate: {},
|
fun_satoshi_quotes: [],
|
||||||
|
fun_exchange_market_rate: [],
|
||||||
|
lightning_dashboard: [],
|
||||||
|
url_checker: [],
|
||||||
|
dashboard_mining: [],
|
||||||
|
},
|
||||||
gerty: [],
|
gerty: [],
|
||||||
gerty_id: `{{gerty}}`,
|
gerty_id: `{{gerty}}`,
|
||||||
gertyname: '',
|
gertyname: '',
|
||||||
@@ -177,16 +182,20 @@ gertyname }}{% endraw %}{% endblock %}{% block page %} {% raw %}
|
|||||||
'GET',
|
'GET',
|
||||||
`/gerty/api/v1/gerty/pages/${this.gerty_id}/${i}`
|
`/gerty/api/v1/gerty/pages/${this.gerty_id}/${i}`
|
||||||
)
|
)
|
||||||
|
console.log(data.screen.slug)
|
||||||
|
if(data.screen.slug){
|
||||||
this.gerty[i] = data
|
this.gerty[i] = data
|
||||||
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
LNbits.utils.notifyApiError(error)
|
LNbits.utils.notifyApiError(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(this.gerty)
|
console.log(this.gerty[0].screen.group)
|
||||||
for (let i = 0; i < this.gerty.length; i++) {
|
for (let i = 0; i < this.gerty.length; i++) {
|
||||||
if (this.gerty[i].screen.group == 'lnbits_wallets_balance') {
|
if (this.gerty[i].screen.group == 'lnbits_wallets_balance') {
|
||||||
for (let q = 0; q < this.gerty[i].screen.areas.length; q++) {
|
for (let q = 0; q < this.gerty[i].screen.areas.length; q++) {
|
||||||
this.lnbits_wallets_balance[q] = {
|
this.elements.lnbits_wallets_balance[q] = {
|
||||||
name: this.gerty[i].screen.areas[q][0].value,
|
name: this.gerty[i].screen.areas[q][0].value,
|
||||||
amount: this.gerty[i].screen.areas[q][1].value,
|
amount: this.gerty[i].screen.areas[q][1].value,
|
||||||
color1: this.walletColors[q].first,
|
color1: this.walletColors[q].first,
|
||||||
@@ -196,35 +205,36 @@ gertyname }}{% endraw %}{% endblock %}{% block page %} {% raw %}
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.gerty[i].screen.group == 'url_checker') {
|
if (this.gerty[i].screen.group == 'url_checker') {
|
||||||
this.url_checker = this.gerty[i].screen.areas
|
this.elements.url_checker = this.gerty[i].screen.areas
|
||||||
this.gertyname = this.gerty[i].settings.name
|
this.gertyname = this.gerty[i].settings.name
|
||||||
}
|
}
|
||||||
if (this.gerty[i].screen.group == 'dashboard_onchain') {
|
if (this.gerty[i].screen.group == 'dashboard_onchain') {
|
||||||
this.dashboard_onchain = this.gerty[i].screen.areas
|
this.elements.dashboard_onchain = this.gerty[i].screen.areas
|
||||||
this.gertyname = this.gerty[i].settings.name
|
this.gertyname = this.gerty[i].settings.name
|
||||||
}
|
}
|
||||||
if (this.gerty[i].screen.group == 'dashboard_mining') {
|
if (this.gerty[i].screen.group == 'dashboard_mining') {
|
||||||
this.dashboard_mining = this.gerty[i].screen.areas
|
this.elements.dashboard_mining = this.gerty[i].screen.areas
|
||||||
this.gertyname = this.gerty[i].settings.name
|
this.gertyname = this.gerty[i].settings.name
|
||||||
}
|
}
|
||||||
if (this.gerty[i].screen.group == 'lightning_dashboard') {
|
if (this.gerty[i].screen.group == 'lightning_dashboard') {
|
||||||
this.lightning_dashboard = this.gerty[i].screen.areas
|
this.elements.lightning_dashboard = this.gerty[i].screen.areas
|
||||||
this.gertyname = this.gerty[i].settings.name
|
this.gertyname = this.gerty[i].settings.name
|
||||||
}
|
}
|
||||||
if (this.gerty[i].screen.group == 'fun_satoshi_quotes') {
|
if (this.gerty[i].screen.group == 'fun_satoshi_quotes') {
|
||||||
this.fun_satoshi_quotes['quote'] = this.gerty[
|
console.log(this.gerty[i]);
|
||||||
|
this.elements.fun_satoshi_quotes['quote'] = this.gerty[
|
||||||
i
|
i
|
||||||
].screen.areas[0][0].value
|
].screen.areas[0][0].value
|
||||||
this.fun_satoshi_quotes['date'] = this.gerty[
|
this.elements.fun_satoshi_quotes['date'] = this.gerty[
|
||||||
i
|
i
|
||||||
].screen.areas[0][1].value
|
].screen.areas[0][1].value
|
||||||
this.gertyname = this.gerty[i].settings.name
|
this.gertyname = this.gerty[i].settings.name
|
||||||
}
|
}
|
||||||
if (this.gerty[i].screen.group == 'fun_exchange_market_rate') {
|
if (this.gerty[i].screen.group == 'fun_exchange_market_rate') {
|
||||||
this.fun_exchange_market_rate['unit'] = this.gerty[
|
this.elements.fun_exchange_market_rate['unit'] = this.gerty[
|
||||||
i
|
i
|
||||||
].screen.areas[0][0].value
|
].screen.areas[0][0].value
|
||||||
this.fun_exchange_market_rate['amount'] = this.gerty[
|
this.elements.fun_exchange_market_rate['amount'] = this.gerty[
|
||||||
i
|
i
|
||||||
].screen.areas[0][1].value
|
].screen.areas[0][1].value
|
||||||
this.gertyname = this.gerty[i].settings.name
|
this.gertyname = this.gerty[i].settings.name
|
||||||
|
Reference in New Issue
Block a user