|
|
@ -9,45 +9,21 @@ import "controls" |
|
|
|
|
|
|
|
Pane { |
|
|
|
id: root |
|
|
|
|
|
|
|
property QtObject menu: Menu { |
|
|
|
id: menu |
|
|
|
parent: Overlay.overlay |
|
|
|
dim: true |
|
|
|
Overlay.modeless: Rectangle { |
|
|
|
color: "#44000000" |
|
|
|
} |
|
|
|
MenuItem { |
|
|
|
icon.color: 'transparent' |
|
|
|
action: Action { |
|
|
|
text: qsTr('Swap'); |
|
|
|
enabled: Daemon.currentWallet.lightningCanSend.satsInt > 0 || Daemon.currentWallet.lightningCanReceive.satInt > 0 |
|
|
|
onTriggered: { |
|
|
|
var dialog = swapDialog.createObject(root) |
|
|
|
dialog.open() |
|
|
|
} |
|
|
|
icon.source: '../../icons/status_waiting.png' |
|
|
|
} |
|
|
|
} |
|
|
|
MenuSeparator {} |
|
|
|
MenuItem { |
|
|
|
icon.color: 'transparent' |
|
|
|
action: Action { |
|
|
|
text: qsTr('Open Channel'); |
|
|
|
onTriggered: app.stack.push(Qt.resolvedUrl('OpenChannel.qml')) |
|
|
|
icon.source: '../../icons/lightning.png' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
padding: 0 |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
id: layout |
|
|
|
width: parent.width |
|
|
|
height: parent.height |
|
|
|
spacing: 0 |
|
|
|
|
|
|
|
GridLayout { |
|
|
|
id: summaryLayout |
|
|
|
Layout.preferredWidth: parent.width |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.topMargin: constants.paddingLarge |
|
|
|
Layout.leftMargin: constants.paddingLarge |
|
|
|
Layout.rightMargin: constants.paddingLarge |
|
|
|
|
|
|
|
columns: 2 |
|
|
|
|
|
|
|
Label { |
|
|
@ -116,8 +92,13 @@ Pane { |
|
|
|
|
|
|
|
Frame { |
|
|
|
id: channelsFrame |
|
|
|
Layout.preferredWidth: parent.width |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.fillHeight: true |
|
|
|
Layout.topMargin: constants.paddingLarge |
|
|
|
Layout.bottomMargin: constants.paddingLarge |
|
|
|
Layout.leftMargin: constants.paddingMedium |
|
|
|
Layout.rightMargin: constants.paddingMedium |
|
|
|
|
|
|
|
verticalPadding: 0 |
|
|
|
horizontalPadding: 0 |
|
|
|
background: PaneInsetBackground {} |
|
|
@ -126,24 +107,6 @@ Pane { |
|
|
|
spacing: 0 |
|
|
|
anchors.fill: parent |
|
|
|
|
|
|
|
Item { |
|
|
|
Layout.preferredHeight: hitem.height |
|
|
|
Layout.preferredWidth: parent.width |
|
|
|
Rectangle { |
|
|
|
anchors.fill: parent |
|
|
|
color: Qt.lighter(Material.background, 1.25) |
|
|
|
} |
|
|
|
RowLayout { |
|
|
|
id: hitem |
|
|
|
width: parent.width |
|
|
|
Label { |
|
|
|
text: qsTr('Channels') |
|
|
|
font.pixelSize: constants.fontSizeLarge |
|
|
|
color: Material.accentColor |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
ListView { |
|
|
|
id: listview |
|
|
|
Layout.preferredWidth: parent.width |
|
|
@ -162,15 +125,25 @@ Pane { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
RowLayout { |
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
|
|
|
|
FlatButton { |
|
|
|
Layout.fillWidth: true |
|
|
|
Button { |
|
|
|
text: qsTr('Open Channel') |
|
|
|
onClicked: app.stack.push(Qt.resolvedUrl('OpenChannel.qml')) |
|
|
|
text: qsTr('Swap'); |
|
|
|
visible: Daemon.currentWallet.lightningCanSend.satsInt > 0 || Daemon.currentWallet.lightningCanReceive.satInt > 0 |
|
|
|
icon.source: '../../icons/status_waiting.png' |
|
|
|
onClicked: { |
|
|
|
var dialog = swapDialog.createObject(root) |
|
|
|
dialog.open() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
FlatButton { |
|
|
|
Layout.fillWidth: true |
|
|
|
text: qsTr('Open Channel') |
|
|
|
onClicked: app.stack.push(Qt.resolvedUrl('OpenChannel.qml')) |
|
|
|
icon.source: '../../icons/lightning.png' |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Component { |
|
|
|