format
This commit is contained in:
parent
45ef9222fe
commit
f3fc1e4a2b
2 changed files with 33 additions and 23 deletions
|
|
@ -1960,14 +1960,14 @@
|
||||||
'/diagonalley/api/v1/orders/shipped/' + order_id,
|
'/diagonalley/api/v1/orders/shipped/' + order_id,
|
||||||
this.g.user.wallets[0].inkey
|
this.g.user.wallets[0].inkey
|
||||||
)
|
)
|
||||||
.then((response) => {
|
.then(response => {
|
||||||
console.log(response.data)
|
console.log(response.data)
|
||||||
this.orders = _.reject(this.orders, (obj) => {
|
this.orders = _.reject(this.orders, obj => {
|
||||||
return obj.id == order_id
|
return obj.id == order_id
|
||||||
})
|
})
|
||||||
this.orders.push(mapOrders(response.data))
|
this.orders.push(mapOrders(response.data))
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch(error => {
|
||||||
LNbits.utils.notifyApiError(error)
|
LNbits.utils.notifyApiError(error)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -137,11 +137,21 @@
|
||||||
>Backup keys
|
>Backup keys
|
||||||
<q-tooltip>Download your keys</q-tooltip>
|
<q-tooltip>Download your keys</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn outline color="grey" class="q-mx-sm" @click="keysDialog.show = true" :disabled="this.user.keys"
|
<q-btn
|
||||||
|
outline
|
||||||
|
color="grey"
|
||||||
|
class="q-mx-sm"
|
||||||
|
@click="keysDialog.show = true"
|
||||||
|
:disabled="this.user.keys"
|
||||||
>Restore keys
|
>Restore keys
|
||||||
<q-tooltip>Restore keys</q-tooltip>
|
<q-tooltip>Restore keys</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn @click="deleteData" v-close-popup flat color="grey" class="q-ml-auto"
|
<q-btn
|
||||||
|
@click="deleteData"
|
||||||
|
v-close-popup
|
||||||
|
flat
|
||||||
|
color="grey"
|
||||||
|
class="q-ml-auto"
|
||||||
>Delete data
|
>Delete data
|
||||||
<q-tooltip>Delete all data from browser</q-tooltip>
|
<q-tooltip>Delete all data from browser</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
@ -155,10 +165,7 @@
|
||||||
position="top"
|
position="top"
|
||||||
@hide="clearRestoreKeyDialog"
|
@hide="clearRestoreKeyDialog"
|
||||||
>
|
>
|
||||||
<q-card
|
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card"> </q-card>
|
||||||
class="q-pa-lg q-pt-xl lnbits__dialog-card"
|
|
||||||
>
|
|
||||||
</q-card>
|
|
||||||
<q-card class="q-pa-lg lnbits__dialog-card">
|
<q-card class="q-pa-lg lnbits__dialog-card">
|
||||||
<q-form @submit="restoreKeys" class="q-gutter-md">
|
<q-form @submit="restoreKeys" class="q-gutter-md">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -250,9 +257,13 @@
|
||||||
return `${key.slice(0, 4)}...${key.slice(-4)}`
|
return `${key.slice(0, 4)}...${key.slice(-4)}`
|
||||||
},
|
},
|
||||||
downloadKeys() {
|
downloadKeys() {
|
||||||
const file = new File([JSON.stringify(this.user.keys)], 'backup_keys.json', {
|
const file = new File(
|
||||||
type: 'text/json',
|
[JSON.stringify(this.user.keys)],
|
||||||
})
|
'backup_keys.json',
|
||||||
|
{
|
||||||
|
type: 'text/json'
|
||||||
|
}
|
||||||
|
)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
const url = URL.createObjectURL(file)
|
const url = URL.createObjectURL(file)
|
||||||
|
|
||||||
|
|
@ -261,7 +272,6 @@
|
||||||
link.click()
|
link.click()
|
||||||
|
|
||||||
window.URL.revokeObjectURL(url)
|
window.URL.revokeObjectURL(url)
|
||||||
|
|
||||||
},
|
},
|
||||||
restoreKeys() {
|
restoreKeys() {
|
||||||
this.user.keys = this.keysDialog.data
|
this.user.keys = this.keysDialog.data
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue