lightning: kivy channels screen stub

This commit is contained in:
Janus 2018-03-06 14:55:39 +01:00
parent 1694bf3d56
commit df8de2c2f1
3 changed files with 35 additions and 0 deletions

View File

@ -390,6 +390,9 @@
LightningPayerScreen:
id: lightning_payer_screen
tab: lightning_payer_tab
LightningChannelsScreen:
id: lightning_channels_screen
tab: lightning_channels_tab
CleanHeader:
id: invoices_tab
text: _('Invoices')
@ -414,6 +417,10 @@
id: lightning_payer_tab
text: _('Send Lightning Payment')
slide: 5
CleanHeader:
id: lightning_channels_tab
text: _('Lightning Channels')
slide: 6
<ActionOvrButton@ActionButton>

View File

@ -590,6 +590,16 @@ class AddressScreen(CScreen):
def ext_search(self, card, search):
return card.memo.find(search) >= 0 or card.amount.find(search) >= 0
class LightningChannelsScreen(CScreen):
kvname = "lightning_channels"
def on_activate(self, *args, **kwargs):
super(LightningChannelsScreen, self).on_activate(*args, **kwargs)
channel_cards = self.screen.ids.lightning_channels_container
item = Factory.LightningChannelItem()
item.screen = self
item.channelId = "lolol"
channel_cards.add_widget(item)
class LightningPayerScreen(CScreen):
kvname = 'lightning_payer'
def on_activate(self, *args, **kwargs):

View File

@ -0,0 +1,18 @@
<LightningChannelItem@CardItem>
channelId: '<channelId not set>'
Label:
text: root.channelId
LightningChannelsScreen:
name: 'lightning_channels'
BoxLayout:
orientation: 'vertical'
spacing: '1dp'
ScrollView:
GridLayout:
cols: 1
id: lightning_channels_container
size_hint: 1, None
height: self.minimum_height
spacing: '2dp'
padding: '12dp'