58 lines
1.4 KiB
JavaScript
58 lines
1.4 KiB
JavaScript
window.app.component('lnbits-header', {
|
|
template: '#lnbits-header',
|
|
mixins: [window.windowMixin],
|
|
computed: {
|
|
denomination() {
|
|
return this.LNBITS_DENOMINATION || 'sat'
|
|
},
|
|
hasServiceFeeMax() {
|
|
return (
|
|
this.g.user &&
|
|
this.LNBITS_SERVICE_FEE_MAX &&
|
|
this.LNBITS_SERVICE_FEE_MAX > 0
|
|
)
|
|
},
|
|
serviceFeeMax() {
|
|
return this.LNBITS_SERVICE_FEE_MAX || 0
|
|
},
|
|
hasServiceFee() {
|
|
return (
|
|
this.g.user && this.LNBITS_SERVICE_FEE && this.LNBITS_SERVICE_FEE > 0
|
|
)
|
|
},
|
|
serviceFee() {
|
|
return this.LNBITS_SERVICE_FEE || 0
|
|
},
|
|
hasCustomBadge() {
|
|
return this.LNBITS_CUSTOM_BADGE && this.LNBITS_CUSTOM_BADGE != ''
|
|
},
|
|
customBadge() {
|
|
return this.LNBITS_CUSTOM_BADGE || ''
|
|
},
|
|
customBadgeColor() {
|
|
return this.LNBITS_CUSTOM_BADGE_COLOR || ''
|
|
},
|
|
title() {
|
|
return this.SITE_TITLE
|
|
},
|
|
titleIsLnbits() {
|
|
return this.SITE_TITLE == 'LNbits'
|
|
},
|
|
customLogoUrl() {
|
|
return this.USE_CUSTOM_LOGO || null
|
|
},
|
|
userPictureUrl() {
|
|
return this.g.user.config.picture
|
|
},
|
|
hasUserPicture() {
|
|
return this.g.user && this.g.user.config && this.g.user.config.picture
|
|
},
|
|
showAdmin() {
|
|
return this.g.user && (this.g.user.super_user || this.g.user.admin)
|
|
},
|
|
showVoidwallet() {
|
|
return this.g.user && this.VOIDWALLET == true
|
|
}
|
|
}
|
|
})
|