kivy: rename 'Channels' dialog to 'Lightning'
This commit is contained in:
@@ -461,7 +461,7 @@ BoxLayout:
|
|||||||
text: _('Addresses')
|
text: _('Addresses')
|
||||||
ActionOvrButton:
|
ActionOvrButton:
|
||||||
name: 'lightning_channels_dialog'
|
name: 'lightning_channels_dialog'
|
||||||
text: _('Channels')
|
text: _('Lightning')
|
||||||
ActionOvrButton:
|
ActionOvrButton:
|
||||||
name: 'settings'
|
name: 'settings'
|
||||||
text: _('Settings')
|
text: _('Settings')
|
||||||
|
|||||||
@@ -164,10 +164,11 @@ Builder.load_string(r'''
|
|||||||
|
|
||||||
<LightningChannelsDialog@Popup>:
|
<LightningChannelsDialog@Popup>:
|
||||||
name: 'lightning_channels'
|
name: 'lightning_channels'
|
||||||
title: _('Lightning channels.')
|
title: _('Lightning Network')
|
||||||
has_lightning: False
|
has_lightning: False
|
||||||
can_send: ''
|
can_send: ''
|
||||||
can_receive: ''
|
can_receive: ''
|
||||||
|
num_channels_text: ''
|
||||||
id: popup
|
id: popup
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
id: box
|
id: box
|
||||||
@@ -175,11 +176,13 @@ Builder.load_string(r'''
|
|||||||
spacing: '2dp'
|
spacing: '2dp'
|
||||||
padding: '12dp'
|
padding: '12dp'
|
||||||
BoxLabel:
|
BoxLabel:
|
||||||
text: _('Can send') + ':'
|
text: _('You can send') + ':'
|
||||||
value: root.can_send
|
value: root.can_send
|
||||||
BoxLabel:
|
BoxLabel:
|
||||||
text: _('Can receive') + ':'
|
text: _('You can receive') + ':'
|
||||||
value: root.can_receive
|
value: root.can_receive
|
||||||
|
TopLabel:
|
||||||
|
text: root.num_channels_text
|
||||||
ScrollView:
|
ScrollView:
|
||||||
GridLayout:
|
GridLayout:
|
||||||
cols: 1
|
cols: 1
|
||||||
@@ -190,13 +193,10 @@ Builder.load_string(r'''
|
|||||||
BoxLayout:
|
BoxLayout:
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
height: '48dp'
|
height: '48dp'
|
||||||
Widget:
|
|
||||||
size_hint: 0.4, None
|
|
||||||
height: '48dp'
|
|
||||||
Button:
|
Button:
|
||||||
size_hint: 0.3, None
|
size_hint: 0.3, None
|
||||||
height: '48dp'
|
height: '48dp'
|
||||||
text: _('Open')
|
text: _('Open Channel')
|
||||||
disabled: not root.has_lightning
|
disabled: not root.has_lightning
|
||||||
on_release: popup.app.popup_dialog('lightning_open_channel_dialog')
|
on_release: popup.app.popup_dialog('lightning_open_channel_dialog')
|
||||||
Button:
|
Button:
|
||||||
@@ -592,6 +592,7 @@ class LightningChannelsDialog(Factory.Popup):
|
|||||||
self.can_send = 'n/a'
|
self.can_send = 'n/a'
|
||||||
self.can_receive = 'n/a'
|
self.can_receive = 'n/a'
|
||||||
return
|
return
|
||||||
|
self.num_channels_text = _(f'You have {len(lnworker.channels)} channels.')
|
||||||
self.can_send = self.app.format_amount_and_units(lnworker.num_sats_can_send())
|
self.can_send = self.app.format_amount_and_units(lnworker.num_sats_can_send())
|
||||||
self.can_receive = self.app.format_amount_and_units(lnworker.num_sats_can_receive())
|
self.can_receive = self.app.format_amount_and_units(lnworker.num_sats_can_receive())
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Popup:
|
Popup:
|
||||||
id: ln
|
id: ln
|
||||||
title: _('Lightning Network')
|
title: _('Lightning Gossip')
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
orientation: 'vertical'
|
orientation: 'vertical'
|
||||||
ScrollView:
|
ScrollView:
|
||||||
|
|||||||
Reference in New Issue
Block a user