mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-28 04:46:18 +02:00
Cashu: mint adding notification (#1465)
This commit is contained in:
@@ -980,7 +980,7 @@ page_container %}
|
|||||||
</q-dialog>
|
</q-dialog>
|
||||||
<q-dialog
|
<q-dialog
|
||||||
v-model="addMintDialog.show"
|
v-model="addMintDialog.show"
|
||||||
@keydown.enter.prevent="addMint(mintToAdd)"
|
@keydown.enter.prevent="addMint(mintToAdd, verbose=true)"
|
||||||
>
|
>
|
||||||
<q-card class="q-pa-lg">
|
<q-card class="q-pa-lg">
|
||||||
<h6 class="q-my-md text-primary">Do you trust this mint?</h6>
|
<h6 class="q-my-md text-primary">Do you trust this mint?</h6>
|
||||||
@@ -1004,7 +1004,7 @@ page_container %}
|
|||||||
v-close-popup
|
v-close-popup
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="check"
|
icon="check"
|
||||||
@click="addMint(mintToAdd)"
|
@click="addMint(mintToAdd, verbose=true)"
|
||||||
>Add mint</q-btn
|
>Add mint</q-btn
|
||||||
>
|
>
|
||||||
<q-btn v-close-popup flat color="grey" class="q-ml-auto"
|
<q-btn v-close-popup flat color="grey" class="q-ml-auto"
|
||||||
@@ -1337,8 +1337,7 @@ page_container %}
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addMint: async function (url) {
|
addMint: async function (url, verbose = false) {
|
||||||
var verbose = true
|
|
||||||
try {
|
try {
|
||||||
await this.activateMint(url, verbose)
|
await this.activateMint(url, verbose)
|
||||||
// we have no mints at all
|
// we have no mints at all
|
||||||
@@ -1347,8 +1346,6 @@ page_container %}
|
|||||||
} else if (this.mints.filter(m => m.url == url).length == 0) {
|
} else if (this.mints.filter(m => m.url == url).length == 0) {
|
||||||
// we don't have this mint yet
|
// we don't have this mint yet
|
||||||
this.mints.push({url: url, balance: 0})
|
this.mints.push({url: url, balance: 0})
|
||||||
} else {
|
|
||||||
verbose = false
|
|
||||||
}
|
}
|
||||||
localStorage.setItem('cashu.mints', JSON.stringify(this.mints))
|
localStorage.setItem('cashu.mints', JSON.stringify(this.mints))
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Reference in New Issue
Block a user