@ -31,177 +31,213 @@ Pane {
clip: true
clip: true
interactive: height < contentHeight
interactive: height < contentHeight
Grid Layout {
Column Layout {
id: rootLayout
id: rootLayout
width: parent . width
width: parent . width
columns: 2
Heading {
Heading {
Layout.columnSpan: 2
/ / L a y o u t . c o l u m n S p a n : 2
text: ! channeldetails . isBackup ? qsTr ( 'Lightning Channel' ) : qsTr ( 'Channel Backup' )
text: ! channeldetails . isBackup ? qsTr ( 'Lightning Channel' ) : qsTr ( 'Channel Backup' )
}
}
Label {
GridLayout {
visible: channeldetails . name
/ / i d : r o o t L a y o u t
text: qsTr ( 'Node name' )
/ / w i d t h : p a r e n t . w i d t h
color: Material . accentColor
Layout.fillWidth: true
}
columns: 2
Label {
visible: channeldetails . name
text: channeldetails . name
}
Label {
Label {
text: qsTr ( 'Short channel ID' )
visible: channeldetails . name
color: Material . accentColor
text: qsTr ( 'Node name' )
}
color: Material . accentColor
}
Label {
Label {
text: channeldetails . short_cid
Layout.fillWidth: true
}
visible: channeldetails . name
text: channeldetails . name
}
Label {
Label {
text: qsTr ( 'State ' )
text: qsTr ( 'Short channel ID ' )
color: Material . accentColor
color: Material . accentColor
}
}
Label {
Label {
text: channeldetails . state
text: channeldetails . short_cid
}
}
Label {
Label {
text: qsTr ( 'Initiator ' )
text: qsTr ( 'State ' )
color: Material . accentColor
color: Material . accentColor
}
}
Label {
Label {
text: channeldetails . initiator
text: channeldetails . state
}
color: channeldetails . state == 'OPEN'
? constants . colorChannelOpen
: Material . foreground
}
Label {
Label {
text: qsTr ( 'Capacity' )
text: qsTr ( 'Initiator ' )
color: Material . accentColor
color: Material . accentColor
}
}
FormattedAmount {
Label {
amount: channeldetails . capacity
text: channeldetails . initiator
}
}
Label {
Label {
text: qsTr ( 'Can send ' )
text: qsTr ( 'Channel type ' )
color: Material . accentColor
color: Material . accentColor
}
}
RowLayout {
Label {
visible: channeldetails . isOpen
text: channeldetails . channelType
FormattedAmount {
visible: ! channeldetails . frozenForSending
amount: channeldetails . canSend
singleLine: false
}
}
Label {
Label {
visible: channeldetails . frozenForSending
text: qsTr ( 'Remote node ID' )
text: qsTr ( 'n/a (frozen)' )
Layout.columnSpan: 2
color: Material . accentColor
}
}
Item {
TextHighlightPane {
Layout.columnSpan: 2
Layout.fillWidth: true
Layout.fillWidth: true
Layout.preferredHeight: 1
}
RowLayout {
Pane {
width: parent . width
background: Rectangle { color: Material . dialogColor }
Label {
padding: 0
text: channeldetails . pubkey
FlatButton {
font.pixelSize: constants . fontSizeLarge
Layout.minimumWidth: implicitWidth
font.family: FixedFont
text: channeldetails . frozenForSending ? qsTr ( 'Unfreeze' ) : qsTr ( 'Freeze' )
Layout.fillWidth: true
onClicked: channeldetails . freezeForSending ( )
wrapMode: Text . Wrap
}
ToolButton {
icon.source: '../../icons/share.png'
icon.color: 'transparent'
onClicked: {
var dialog = app . genericShareDialog . createObject ( root ,
{ title: qsTr ( 'Channel node ID' ) , text: channeldetails . pubkey }
)
dialog . open ( )
}
}
}
}
}
}
}
}
Label {
Label {
visible: ! channeldetails . isOpen
text: qsTr ( 'Capacity and ratio' )
text: qsTr ( 'n/a (channel not open)' )
}
Label {
text: qsTr ( 'Can Receive' )
color: Material . accentColor
color: Material . accentColor
}
}
RowLayout {
TextHighlightPane {
visible: channeldetails . isOpen
Layout.fillWidth: true
FormattedAmount {
padding: constants . paddingLarge
visible: ! channeldetails . frozenForReceiving
amount: channeldetails . canReceive
singleLine: false
}
Label {
GridLayout {
visible: channeldetails . frozenForReceiving
width: parent . width
text: qsTr ( 'n/a (frozen)' )
columns: 2
}
rowSpacing: constants . paddingSmall
Item {
Layout.fillWidth: true
ChannelBar {
Layout.preferredHeight: 1
Layout.columnSpan: 2
}
Layout.fillWidth: true
Pane {
Layout.topMargin: constants . paddingLarge
background: Rectangle { color: Material . dialogColor }
Layout.bottomMargin: constants . paddingXLarge
padding: 0
capacity: channeldetails . capacity
FlatButton {
localCapacity: channeldetails . localCapacity
Layout.minimumWidth: implicitWidth
remoteCapacity: channeldetails . remoteCapacity
text: channeldetails . frozenForReceiving ? qsTr ( 'Unfreeze' ) : qsTr ( 'Freeze' )
onClicked: channeldetails . freezeForReceiving ( )
}
}
}
}
Label {
Label {
visible: ! channeldetails . isOpen
text: qsTr ( 'Capacity' )
text: qsTr ( 'n/a (channel not open)' )
color: Material . accentColor
}
}
Label {
FormattedAmount {
text: qsTr ( 'Channel type' )
amount: channeldetails . capacity
color: Material . accentColor
}
}
Label {
Label {
text: channeldetails . channelType
text: qsTr ( 'Can send' )
}
color: Material . accentColor
}
Label {
RowLayout {
text: qsTr ( 'Remote node ID' )
visible: channeldetails . isOpen
Layout.columnSpan: 2
FormattedAmount {
color: Material . accentColor
visible: ! channeldetails . frozenForSending
}
amount: channeldetails . canSend
singleLine: false
}
Label {
visible: channeldetails . frozenForSending
text: qsTr ( 'n/a (frozen)' )
}
Item {
Layout.fillWidth: true
Layout.preferredHeight: 1
}
Pane {
background: Rectangle { color: Material . dialogColor }
padding: 0
FlatButton {
Layout.minimumWidth: implicitWidth
text: channeldetails . frozenForSending ? qsTr ( 'Unfreeze' ) : qsTr ( 'Freeze' )
onClicked: channeldetails . freezeForSending ( )
}
}
}
TextHighlightPane {
Label {
Layout.columnSpan: 2
visible: ! channeldetails . isOpen
Layout.fillWidth: true
text: qsTr ( 'n/a (channel not open)' )
}
RowLayout {
width: parent . width
Label {
Label {
text: channeldetails . pubkey
text: qsTr ( 'Can Receive' )
font.pixelSize: constants . fontSizeLarge
color: Material . accentColor
font.family: FixedFont
Layout.fillWidth: true
wrapMode: Text . Wrap
}
}
ToolButton {
icon.source: '../../icons/share.png'
RowLayout {
icon.color: 'transparent'
visible: channeldetails . isOpen
onClicked: {
FormattedAmount {
var dialog = app . genericShareDialog . createObject ( root ,
visible: ! channeldetails . frozenForReceiving
{ title: qsTr ( 'Channel node ID' ) , text: channeldetails . pubkey }
amount: channeldetails . canReceive
)
singleLine: false
dialog . open ( )
}
Label {
visible: channeldetails . frozenForReceiving
text: qsTr ( 'n/a (frozen)' )
}
Item {
Layout.fillWidth: true
Layout.preferredHeight: 1
}
}
Pane {
background: Rectangle { color: Material . dialogColor }
padding: 0
FlatButton {
Layout.minimumWidth: implicitWidth
text: channeldetails . frozenForReceiving ? qsTr ( 'Unfreeze' ) : qsTr ( 'Freeze' )
onClicked: channeldetails . freezeForReceiving ( )
}
}
}
Label {
visible: ! channeldetails . isOpen
text: qsTr ( 'n/a (channel not open)' )
}
}
}
}
}
}
}
}
}
}