Feat: Adds wallet icon/color select (#2917)
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -216,7 +216,8 @@ window.LNbits = {
|
||||
name: data.name,
|
||||
adminkey: data.adminkey,
|
||||
inkey: data.inkey,
|
||||
currency: data.currency
|
||||
currency: data.currency,
|
||||
extra: data.extra
|
||||
}
|
||||
newWallet.msat = data.balance_msat
|
||||
newWallet.sat = Math.floor(data.balance_msat / 1000)
|
||||
|
||||
@@ -44,6 +44,62 @@ window.WalletPageLogic = {
|
||||
show: false,
|
||||
location: window.location
|
||||
},
|
||||
icon: {
|
||||
show: false,
|
||||
data: {},
|
||||
colorOptions: [
|
||||
'primary',
|
||||
'purple',
|
||||
'orange',
|
||||
'green',
|
||||
'brown',
|
||||
'blue',
|
||||
'red',
|
||||
'pink'
|
||||
],
|
||||
options: [
|
||||
'home',
|
||||
'star',
|
||||
'bolt',
|
||||
'paid',
|
||||
'savings',
|
||||
'store',
|
||||
'videocam',
|
||||
'music_note',
|
||||
'flight',
|
||||
'train',
|
||||
'directions_car',
|
||||
'school',
|
||||
'construction',
|
||||
'science',
|
||||
'sports_esports',
|
||||
'sports_tennis',
|
||||
'theaters',
|
||||
'water',
|
||||
'headset_mic',
|
||||
'videogame_asset',
|
||||
'person',
|
||||
'group',
|
||||
'pets',
|
||||
'sunny',
|
||||
'elderly',
|
||||
'verified',
|
||||
'snooze',
|
||||
'mail',
|
||||
'forum',
|
||||
'shopping_cart',
|
||||
'shopping_bag',
|
||||
'attach_money',
|
||||
'print_connect',
|
||||
'dark_mode',
|
||||
'light_mode',
|
||||
'android',
|
||||
'network_wifi',
|
||||
'shield',
|
||||
'fitness_center',
|
||||
'lunch_dining'
|
||||
]
|
||||
},
|
||||
update: {
|
||||
name: null,
|
||||
currency: null
|
||||
@@ -149,6 +205,16 @@ window.WalletPageLogic = {
|
||||
handleBalanceUpdate(value) {
|
||||
this.g.wallet.sat = this.g.wallet.sat + value
|
||||
},
|
||||
setSelectedIcon(selectedIcon) {
|
||||
this.icon.data.icon = selectedIcon
|
||||
},
|
||||
setSelectedColor(selectedColor) {
|
||||
this.icon.data.color = selectedColor
|
||||
},
|
||||
setIcon() {
|
||||
this.updateWallet(this.icon.data)
|
||||
this.icon.show = false
|
||||
},
|
||||
createInvoice() {
|
||||
this.receive.status = 'loading'
|
||||
if (LNBITS_DENOMINATION != 'sats') {
|
||||
|
||||
Reference in New Issue
Block a user