qml: move (un)freeze buttons next to can send/receive info
This commit is contained in:
@@ -102,15 +102,30 @@ Pane {
|
|||||||
color: Material.accentColor
|
color: Material.accentColor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
visible: channeldetails.isOpen
|
||||||
FormattedAmount {
|
FormattedAmount {
|
||||||
visible: !channeldetails.frozenForSending && channeldetails.isOpen
|
visible: !channeldetails.frozenForSending
|
||||||
amount: channeldetails.canSend
|
amount: channeldetails.canSend
|
||||||
|
singleLine: false
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
visible: channeldetails.frozenForSending && channeldetails.isOpen
|
visible: channeldetails.frozenForSending
|
||||||
text: qsTr('n/a (frozen)')
|
text: qsTr('n/a (frozen)')
|
||||||
}
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 1
|
||||||
|
}
|
||||||
|
FlatButton {
|
||||||
|
Layout.minimumWidth: implicitWidth
|
||||||
|
// icon.source: '../../icons/warning.png'
|
||||||
|
// icon.color: 'transparent'
|
||||||
|
text: channeldetails.frozenForSending ? qsTr('Unfreeze') : qsTr('Freeze')
|
||||||
|
onClicked: channeldetails.freezeForSending()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
visible: !channeldetails.isOpen
|
visible: !channeldetails.isOpen
|
||||||
text: qsTr('n/a (channel not open)')
|
text: qsTr('n/a (channel not open)')
|
||||||
@@ -121,15 +136,31 @@ Pane {
|
|||||||
color: Material.accentColor
|
color: Material.accentColor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
visible: channeldetails.isOpen
|
||||||
FormattedAmount {
|
FormattedAmount {
|
||||||
visible: !channeldetails.frozenForReceiving && channeldetails.isOpen
|
visible: !channeldetails.frozenForReceiving
|
||||||
amount: channeldetails.canReceive
|
amount: channeldetails.canReceive
|
||||||
|
singleLine: false
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
visible: channeldetails.frozenForReceiving && channeldetails.isOpen
|
visible: channeldetails.frozenForReceiving
|
||||||
text: qsTr('n/a (frozen)')
|
text: qsTr('n/a (frozen)')
|
||||||
}
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 1
|
||||||
|
}
|
||||||
|
FlatButton {
|
||||||
|
Layout.minimumWidth: implicitWidth
|
||||||
|
// icon.source: '../../icons/warning.png'
|
||||||
|
// icon.color: 'transparent'
|
||||||
|
text: channeldetails.frozenForReceiving ? qsTr('Unfreeze') : qsTr('Freeze')
|
||||||
|
onClicked: channeldetails.freezeForReceiving()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
visible: !channeldetails.isOpen
|
visible: !channeldetails.isOpen
|
||||||
text: qsTr('n/a (channel not open)')
|
text: qsTr('n/a (channel not open)')
|
||||||
@@ -198,13 +229,11 @@ Pane {
|
|||||||
icon.source: '../../icons/file.png'
|
icon.source: '../../icons/file.png'
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
FlatButton {
|
FlatButton {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 1
|
Layout.preferredWidth: 1
|
||||||
text: qsTr('Close channel');
|
text: qsTr('Close channel');
|
||||||
enabled: channeldetails.canClose
|
visible: channeldetails.canClose
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var dialog = closechannel.createObject(root, { 'channelid': channelid })
|
var dialog = closechannel.createObject(root, { 'channelid': channelid })
|
||||||
dialog.open()
|
dialog.open()
|
||||||
@@ -216,7 +245,7 @@ Pane {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 1
|
Layout.preferredWidth: 1
|
||||||
text: qsTr('Delete channel');
|
text: qsTr('Delete channel');
|
||||||
enabled: channeldetails.canDelete
|
visible: channeldetails.canDelete
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var dialog = app.messageDialog.createObject(root,
|
var dialog = app.messageDialog.createObject(root,
|
||||||
{
|
{
|
||||||
@@ -236,30 +265,6 @@ Pane {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
visible: channeldetails.isOpen
|
|
||||||
|
|
||||||
FlatButton {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredWidth: 1
|
|
||||||
enabled: channeldetails.isOpen
|
|
||||||
text: channeldetails.frozenForSending ? qsTr('Unfreeze (for sending)') : qsTr('Freeze (for sending)')
|
|
||||||
icon.source: '../../icons/seal.png'
|
|
||||||
onClicked: channeldetails.freezeForSending()
|
|
||||||
}
|
|
||||||
FlatButton {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredWidth: 1
|
|
||||||
enabled: channeldetails.isOpen
|
|
||||||
text: channeldetails.frozenForReceiving ? qsTr('Unfreeze (for receiving)') : qsTr('Freeze (for receiving)')
|
|
||||||
icon.source: '../../icons/seal.png'
|
|
||||||
onClicked: channeldetails.freezeForReceiving()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ChannelDetails {
|
ChannelDetails {
|
||||||
id: channeldetails
|
id: channeldetails
|
||||||
wallet: Daemon.currentWallet
|
wallet: Daemon.currentWallet
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ Item {
|
|||||||
property color colorAddressInternal: Qt.rgba(1,0.93,0,0.75)
|
property color colorAddressInternal: Qt.rgba(1,0.93,0,0.75)
|
||||||
property color colorAddressUsed: Qt.rgba(0.5,0.5,0.5,1)
|
property color colorAddressUsed: Qt.rgba(0.5,0.5,0.5,1)
|
||||||
property color colorAddressUsedWithBalance: Qt.rgba(0.75,0.75,0.75,1)
|
property color colorAddressUsedWithBalance: Qt.rgba(0.75,0.75,0.75,1)
|
||||||
property color colorAddressFrozen: Qt.rgba(0.5,0.5,1,0.75)
|
property color colorAddressFrozen: Qt.rgba(0.5,0.5,1,1)
|
||||||
|
|
||||||
function colorAlpha(baseColor, alpha) {
|
function colorAlpha(baseColor, alpha) {
|
||||||
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, alpha)
|
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, alpha)
|
||||||
|
|||||||
Reference in New Issue
Block a user