qml: show backup type, as in qt
This commit is contained in:
@@ -97,6 +97,21 @@ Pane {
|
||||
text: channeldetails.channelType
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: channeldetails.isBackup
|
||||
text: qsTr('Backup type')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: channeldetails.isBackup
|
||||
text: channeldetails.backupType == 'imported'
|
||||
? qsTr('imported')
|
||||
: channeldetails.backupType == 'on-chain'
|
||||
? qsTr('on-chain')
|
||||
: '?'
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Remote node ID')
|
||||
Layout.columnSpan: 2
|
||||
|
||||
@@ -190,6 +190,12 @@ class QEChannelDetails(AuthMixin, QObject, QtEventListener):
|
||||
def isBackup(self):
|
||||
return self._channel.is_backup()
|
||||
|
||||
@pyqtProperty(str, notify=channelChanged)
|
||||
def backupType(self):
|
||||
if not self.isBackup:
|
||||
return ''
|
||||
return 'imported' if self._channel.is_imported else 'on-chain'
|
||||
|
||||
@pyqtProperty(int, notify=channelChanged)
|
||||
def toSelfDelay(self):
|
||||
return self._channel.config[REMOTE].to_self_delay
|
||||
|
||||
Reference in New Issue
Block a user