@@ -150,10 +150,15 @@ gertyname }}{% endraw %}{% endblock %}{% block page %} {% raw %}
mixins: [windowMixin],
data: function () {
return {
- lnbits_wallets_balance: {},
- dashboard_onchain: {},
- fun_satoshi_quotes: {},
- fun_exchange_market_rate: {},
+ elements:{
+ lnbits_wallets_balance: [],
+ dashboard_onchain: [],
+ fun_satoshi_quotes: [],
+ fun_exchange_market_rate: [],
+ lightning_dashboard: [],
+ url_checker: [],
+ dashboard_mining: [],
+ },
gerty: [],
gerty_id: `{{gerty}}`,
gertyname: '',
@@ -177,16 +182,20 @@ gertyname }}{% endraw %}{% endblock %}{% block page %} {% raw %}
'GET',
`/gerty/api/v1/gerty/pages/${this.gerty_id}/${i}`
)
- this.gerty[i] = data
+ console.log(data.screen.slug)
+ if(data.screen.slug){
+ this.gerty[i] = data
+ }
+
} catch (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++) {
if (this.gerty[i].screen.group == 'lnbits_wallets_balance') {
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,
amount: this.gerty[i].screen.areas[q][1].value,
color1: this.walletColors[q].first,
@@ -196,35 +205,36 @@ gertyname }}{% endraw %}{% endblock %}{% block page %} {% raw %}
}
}
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
}
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
}
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
}
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
}
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
].screen.areas[0][0].value
- this.fun_satoshi_quotes['date'] = this.gerty[
+ this.elements.fun_satoshi_quotes['date'] = this.gerty[
i
].screen.areas[0][1].value
this.gertyname = this.gerty[i].settings.name
}
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
].screen.areas[0][0].value
- this.fun_exchange_market_rate['amount'] = this.gerty[
+ this.elements.fun_exchange_market_rate['amount'] = this.gerty[
i
].screen.areas[0][1].value
this.gertyname = this.gerty[i].settings.name