Pretty much works

This commit is contained in:
ben
2022-08-26 19:22:03 +01:00
parent c3870e65e3
commit 330a026379
6 changed files with 54 additions and 29 deletions
@@ -18,6 +18,7 @@ new Vue({
cards: [],
hits: [],
refunds: [],
lnurlLink: location.hostname + '/boltcards/api/v1/scan/',
cardDialog: {
show: false,
data: {
@@ -43,10 +44,10 @@ new Vue({
field: 'counter'
},
{
name: 'withdraw',
name: 'uid',
align: 'left',
label: 'Withdraw ID',
field: 'withdraw'
label: 'Card ID',
field: 'uid'
}
],
pagination: {
@@ -150,7 +151,6 @@ new Vue({
},
getHits: function () {
var self = this
LNbits.api
.request(
'GET',
@@ -167,7 +167,6 @@ new Vue({
},
getRefunds: function () {
var self = this
LNbits.api
.request(
'GET',
@@ -184,7 +183,6 @@ new Vue({
},
openQrCodeDialog(cardId) {
var card = _.findWhere(this.cards, {id: cardId})
this.qrCodeDialog.data = {
link: window.location.origin + '/boltcards/api/v1/auth?a=' + card.otp,
name: card.card_name,
@@ -197,11 +195,9 @@ new Vue({
},
addCardOpen: function () {
this.cardDialog.show = true
var elem = this.$els.myBtn
elem.click()
this.generateKeys()
},
generateKeys: function () {
const genRanHex = size =>
[...Array(size)]
.map(() => Math.floor(Math.random() * 16).toString(16))