mirror of
https://github.com/lnbits/lnbits.git
synced 2025-03-28 18:52:00 +01:00
Nice formatting of funding source titles in Server admin (#2543)
* Display friendly funding source titles in funding sources list * Sort funding options select alphabetically * Run make bundle
This commit is contained in:
parent
83b89851a5
commit
b3368d89f4
18
lnbits/static/bundle.min.js
vendored
18
lnbits/static/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,14 @@
|
|||||||
Vue.component('lnbits-funding-sources', {
|
Vue.component('lnbits-funding-sources', {
|
||||||
mixins: [windowMixin],
|
mixins: [windowMixin],
|
||||||
props: ['form-data', 'allowed-funding-sources'],
|
props: ['form-data', 'allowed-funding-sources'],
|
||||||
|
methods: {
|
||||||
|
getFundingSourceLabel(item) {
|
||||||
|
const fundingSource = this.rawFundingSources.find(
|
||||||
|
fundingSource => fundingSource[0] === item
|
||||||
|
)
|
||||||
|
return fundingSource ? fundingSource[1] : item
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
fundingSources() {
|
fundingSources() {
|
||||||
let tmp = []
|
let tmp = []
|
||||||
@ -14,6 +22,9 @@ Vue.component('lnbits-funding-sources', {
|
|||||||
tmp.push([key, tmpObj])
|
tmp.push([key, tmpObj])
|
||||||
}
|
}
|
||||||
return new Map(tmp)
|
return new Map(tmp)
|
||||||
|
},
|
||||||
|
sortedAllowedFundingSources() {
|
||||||
|
return this.allowedFundingSources.sort()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -159,7 +170,8 @@ Vue.component('lnbits-funding-sources', {
|
|||||||
filled
|
filled
|
||||||
v-model="formData.lnbits_backend_wallet_class"
|
v-model="formData.lnbits_backend_wallet_class"
|
||||||
hint="Select the active funding wallet"
|
hint="Select the active funding wallet"
|
||||||
:options="allowedFundingSources"
|
:options="sortedAllowedFundingSources"
|
||||||
|
:option-label="(item) => getFundingSourceLabel(item)"
|
||||||
></q-select>
|
></q-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user