mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
kivy: do not show balance in every tab. fixes #3350
This commit is contained in:
parent
4b7cf297f5
commit
d5effe48d0
4 changed files with 29 additions and 23 deletions
|
@ -397,7 +397,7 @@
|
||||||
slide: 1
|
slide: 1
|
||||||
CleanHeader:
|
CleanHeader:
|
||||||
id: history_tab
|
id: history_tab
|
||||||
text: _('History')
|
text: _('Balance')
|
||||||
slide: 2
|
slide: 2
|
||||||
CleanHeader:
|
CleanHeader:
|
||||||
id: receive_tab
|
id: receive_tab
|
||||||
|
|
|
@ -83,6 +83,7 @@ class ElectrumWindow(App):
|
||||||
num_chains = NumericProperty(0)
|
num_chains = NumericProperty(0)
|
||||||
blockchain_name = StringProperty('')
|
blockchain_name = StringProperty('')
|
||||||
fee_status = StringProperty('Fee')
|
fee_status = StringProperty('Fee')
|
||||||
|
balance = StringProperty('')
|
||||||
blockchain_checkpoint = NumericProperty(0)
|
blockchain_checkpoint = NumericProperty(0)
|
||||||
|
|
||||||
auto_connect = BooleanProperty(False)
|
auto_connect = BooleanProperty(False)
|
||||||
|
@ -634,16 +635,16 @@ class ElectrumWindow(App):
|
||||||
if not self.wallet.up_to_date or server_height == 0:
|
if not self.wallet.up_to_date or server_height == 0:
|
||||||
status = _("Synchronizing...")
|
status = _("Synchronizing...")
|
||||||
elif server_lag > 1:
|
elif server_lag > 1:
|
||||||
status = _("Server lagging ({} blocks)").format(server_lag)
|
status = _("Server lagging")
|
||||||
else:
|
else:
|
||||||
c, u, x = self.wallet.get_balance()
|
status = ''
|
||||||
text = self.format_amount(c+x+u)
|
|
||||||
status = str(text.strip() + ' ' + self.base_unit)
|
|
||||||
else:
|
else:
|
||||||
status = _("Disconnected")
|
status = _("Disconnected")
|
||||||
|
self.status = self.wallet.basename() + (' [size=15dp](%s)[/size]'%status if status else '')
|
||||||
n = self.wallet.basename()
|
# balance
|
||||||
self.status = '[size=15dp]%s[/size]\n%s' %(n, status)
|
c, u, x = self.wallet.get_balance()
|
||||||
|
text = self.format_amount(c+x+u)
|
||||||
|
self.balance = str(text.strip() + ' ' + self.base_unit)
|
||||||
#fiat_balance = self.fx.format_amount_and_units(c+u+x) or ''
|
#fiat_balance = self.fx.format_amount_and_units(c+u+x) or ''
|
||||||
|
|
||||||
def get_max_amount(self):
|
def get_max_amount(self):
|
||||||
|
|
|
@ -162,13 +162,8 @@ class HistoryScreen(CScreen):
|
||||||
count = 0
|
count = 0
|
||||||
for item in history:
|
for item in history:
|
||||||
ri = self.get_card(*item)
|
ri = self.get_card(*item)
|
||||||
count += 1
|
|
||||||
history_card.add_widget(ri)
|
history_card.add_widget(ri)
|
||||||
|
|
||||||
if count == 0:
|
|
||||||
msg = _('This screen shows your list of transactions. It is currently empty.')
|
|
||||||
history_card.add_widget(EmptyLabel(text=msg))
|
|
||||||
|
|
||||||
|
|
||||||
class SendScreen(CScreen):
|
class SendScreen(CScreen):
|
||||||
|
|
||||||
|
|
|
@ -62,9 +62,19 @@
|
||||||
HistoryScreen:
|
HistoryScreen:
|
||||||
name: 'history'
|
name: 'history'
|
||||||
content: content
|
content: content
|
||||||
|
BoxLayout:
|
||||||
|
orientation: 'vertical'
|
||||||
|
Label:
|
||||||
|
text: app.balance
|
||||||
|
color: .699, .699, .699, 1
|
||||||
|
font_size: '22dp'
|
||||||
|
bold: True
|
||||||
|
size_hint: 1, 0.25
|
||||||
ScrollView:
|
ScrollView:
|
||||||
id: content
|
id: content
|
||||||
do_scroll_x: False
|
do_scroll_x: False
|
||||||
|
size_hint: 1, 0.75
|
||||||
|
#height: self.minimum_height
|
||||||
GridLayout
|
GridLayout
|
||||||
id: history_container
|
id: history_container
|
||||||
cols: 1
|
cols: 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue