kivy: TxHashLabel
This commit is contained in:
@@ -91,6 +91,20 @@
|
|||||||
size: self.size
|
size: self.size
|
||||||
pos: self.pos
|
pos: self.pos
|
||||||
|
|
||||||
|
<TxHashLabel@TopLabel>
|
||||||
|
font_size: '6pt'
|
||||||
|
tx_hash: ''
|
||||||
|
text: '[ref=x]%s[/ref]' %' '.join(map(''.join, zip(*[iter(self.tx_hash)]*4))) if self.tx_hash else ''
|
||||||
|
padding: '10dp', '10dp'
|
||||||
|
on_ref_press:
|
||||||
|
app._clipboard.copy(self.text)
|
||||||
|
app.show_info(_('Transaction ID copied to clipboard'))
|
||||||
|
canvas.before:
|
||||||
|
Color:
|
||||||
|
rgb: .3, .3, .3
|
||||||
|
Rectangle:
|
||||||
|
size: self.size
|
||||||
|
pos: self.pos
|
||||||
|
|
||||||
<InfoBubble>
|
<InfoBubble>
|
||||||
size_hint: None, None
|
size_hint: None, None
|
||||||
|
|||||||
@@ -294,10 +294,9 @@ class ElectrumWindow(App):
|
|||||||
popup.signature = req.get('signature', '')
|
popup.signature = req.get('signature', '')
|
||||||
popup.status = status
|
popup.status = status
|
||||||
txid = req.get('txid')
|
txid = req.get('txid')
|
||||||
if txid:
|
popup.tx_hash = txid or ''
|
||||||
popup.ids.txid_label.text = _("Transaction ID") + ':\n' + ' '.join(map(''.join, zip(*[iter(txid)]*4)))
|
|
||||||
popup.open()
|
|
||||||
popup.ids.output_list.update(req.get('outputs', []))
|
popup.ids.output_list.update(req.get('outputs', []))
|
||||||
|
popup.open()
|
||||||
|
|
||||||
def qr_dialog(self, title, data):
|
def qr_dialog(self, title, data):
|
||||||
from uix.dialogs.qr_dialog import QRDialog
|
from uix.dialogs.qr_dialog import QRDialog
|
||||||
|
|||||||
@@ -64,19 +64,8 @@ Builder.load_string('''
|
|||||||
id: output_list
|
id: output_list
|
||||||
TopLabel:
|
TopLabel:
|
||||||
text: _('Transaction ID') + ':' if root.tx_hash else ''
|
text: _('Transaction ID') + ':' if root.tx_hash else ''
|
||||||
TopLabel:
|
TxHashLabel:
|
||||||
font_size: '6pt'
|
tx_hash: root.tx_hash
|
||||||
text: '[ref=x]%s[/ref]' %' '.join(map(''.join, zip(*[iter(root.tx_hash)]*4))) if root.tx_hash else ''
|
|
||||||
padding: '10dp', '10dp'
|
|
||||||
on_ref_press:
|
|
||||||
app._clipboard.copy(self.text)
|
|
||||||
app.show_info(_('Transaction ID copied to clipboard'))
|
|
||||||
canvas.before:
|
|
||||||
Color:
|
|
||||||
rgb: .3, .3, .3
|
|
||||||
Rectangle:
|
|
||||||
size: self.size
|
|
||||||
pos: self.pos
|
|
||||||
|
|
||||||
Widget:
|
Widget:
|
||||||
size_hint: 1, 0.1
|
size_hint: 1, 0.1
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ Popup:
|
|||||||
status: ''
|
status: ''
|
||||||
signature: ''
|
signature: ''
|
||||||
title: _('Invoice') if popup.is_invoice else _('Request')
|
title: _('Invoice') if popup.is_invoice else _('Request')
|
||||||
|
tx_hash: ''
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
orientation: 'vertical'
|
orientation: 'vertical'
|
||||||
padding: '10dp'
|
|
||||||
ScrollView:
|
ScrollView:
|
||||||
GridLayout:
|
GridLayout:
|
||||||
cols: 1
|
cols: 1
|
||||||
@@ -56,7 +56,9 @@ Popup:
|
|||||||
OutputList:
|
OutputList:
|
||||||
id: output_list
|
id: output_list
|
||||||
TopLabel:
|
TopLabel:
|
||||||
id: txid_label
|
text: _('Transaction ID') if popup.tx_hash else ''
|
||||||
|
TxHashLabel:
|
||||||
|
tx_hash: popup.tx_hash
|
||||||
|
|
||||||
Widget:
|
Widget:
|
||||||
size_hint: 1, 0.1
|
size_hint: 1, 0.1
|
||||||
|
|||||||
Reference in New Issue
Block a user