+
Onchain
- {{item[0].value}}: {{item[1].value}}
+
+ {{item[0].value}}: {{item[1].value}}
+
@@ -45,7 +65,9 @@ endblock %}{% block page %} {% raw %}
Mining
- {{item[0].value}}: {{item[1].value}}
+
+ {{item[0].value}}: {{item[1].value}}
+
@@ -54,10 +76,11 @@ endblock %}{% block page %} {% raw %}
Lightning (Last 7 days)
- {{item[0].value}}: {{item[1].value}}
+
+ {{item[0].value}}: {{item[1].value}}
+
-
{% endraw %} {% endblock %} {% block scripts %}
@@ -75,86 +98,84 @@ endblock %}{% block page %} {% raw %}
fun_exchange_market_rate: {},
gerty: [],
gerty_id: `{{gerty}}`,
- gertyname: "",
+ gertyname: '',
walletColors: [
- {first: "#3f51b5",
- second: "#1a237e"},
- {first: "#9c27b0",
- second: "#4a148c"},
- {first: "#e91e63",
- second: "#880e4f"},
- {first: "#009688",
- second: "#004d40"},
- {first: "#ff9800",
- second: "#e65100"},
- {first: "#2196f3",
- second: "#0d47a1"},
- {first: "#4caf50",
- second: "#1b5e20"}
+ {first: '#3f51b5', second: '#1a237e'},
+ {first: '#9c27b0', second: '#4a148c'},
+ {first: '#e91e63', second: '#880e4f'},
+ {first: '#009688', second: '#004d40'},
+ {first: '#ff9800', second: '#e65100'},
+ {first: '#2196f3', second: '#0d47a1'},
+ {first: '#4caf50', second: '#1b5e20'}
],
gertywallets: []
}
},
methods: {
getGertyInfo: async function () {
- for (let i = 0; i < 8; i++){
+ for (let i = 0; i < 8; i++) {
try {
const {data} = await LNbits.api.request(
'GET',
`/gerty/api/v1/gerty/pages/${this.gerty_id}/${i}`
)
this.gerty[i] = data
-
} catch (error) {
LNbits.utils.notifyApiError(error)
}
}
console.log(this.gerty)
- 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] = {
- "name": this.gerty[i].screen.areas[q][0].value,
- "amount": this.gerty[i].screen.areas[q][1].value,
- "color1": this.walletColors[q].first,
- "color2": this.walletColors[q].second,
+ 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] = {
+ name: this.gerty[i].screen.areas[q][0].value,
+ amount: this.gerty[i].screen.areas[q][1].value,
+ color1: this.walletColors[q].first,
+ color2: this.walletColors[q].second
+ }
+ this.gertyname = this.gerty[i].settings.name
}
+ }
+ if (this.gerty[i].screen.group == 'dashboard_onchain') {
+ this.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.gertyname = this.gerty[i].settings.name
+ }
+ if (this.gerty[i].screen.group == 'lightning_dashboard') {
+ this.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[
+ i
+ ].screen.areas[0][0].value
+ this.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[
+ i
+ ].screen.areas[0][0].value
+ this.fun_exchange_market_rate['amount'] = this.gerty[
+ i
+ ].screen.areas[0][1].value
this.gertyname = this.gerty[i].settings.name
}
}
- if(this.gerty[i].screen.group == "dashboard_onchain"){
- this.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.gertyname = this.gerty[i].settings.name
- }
- if(this.gerty[i].screen.group == "lightning_dashboard"){
- this.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[i].screen.areas[0][0].value
- this.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[i].screen.areas[0][0].value
- this.fun_exchange_market_rate["amount"] = this.gerty[i].screen.areas[0][1].value
- this.gertyname = this.gerty[i].settings.name
- }
-
- }
- setTimeout(this.getGertyInfo, 20000);
- this.$forceUpdate();
- return this.gerty
- },
+ setTimeout(this.getGertyInfo, 20000)
+ this.$forceUpdate()
+ return this.gerty
+ }
},
created: async function () {
-
- await this.getGertyInfo()
+ await this.getGertyInfo()
}
})
diff --git a/lnbits/extensions/gerty/templates/gerty/index.html b/lnbits/extensions/gerty/templates/gerty/index.html
index e990dd75..688349dd 100644
--- a/lnbits/extensions/gerty/templates/gerty/index.html
+++ b/lnbits/extensions/gerty/templates/gerty/index.html
@@ -141,56 +141,52 @@
placeholder="Son of Gerty"
>
Displays random quotes from Satoshi
+
+
+
+
+
- size="xs"
- v-model="formDialog.data.display_preferences.fun_satoshi_quotes"
- val="xs"
- label="Satoshi Quotes"
- >
Displays random quotes from Satoshi
-
-
-
-
-
-
-
-
- Hit enter to add values
-
+ v-if="formDialog.data.display_preferences.lnbits_wallets_balance"
+ filled
+ multiple
+ dense
+ emit-value
+ v-model="formDialog.data.lnbits_wallets"
+ use-input
+ use-chips
+ multiple
+ hide-dropdown-icon
+ new-value-mode="add-unique"
+ label="Invoice keys of wallets to watch"
+ >
+
Hit enter to add values
+
-
-
-
-
-
- The amount of time in seconds between screen updates
-
-
+
+
+
+
+
+ The amount of time in seconds between screen updates
+
+