|
|
|
|
@ -102,15 +102,30 @@ Pane {
|
|
|
|
|
color: Material.accentColor |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FormattedAmount { |
|
|
|
|
visible: !channeldetails.frozenForSending && channeldetails.isOpen |
|
|
|
|
amount: channeldetails.canSend |
|
|
|
|
RowLayout { |
|
|
|
|
visible: channeldetails.isOpen |
|
|
|
|
FormattedAmount { |
|
|
|
|
visible: !channeldetails.frozenForSending |
|
|
|
|
amount: channeldetails.canSend |
|
|
|
|
singleLine: false |
|
|
|
|
} |
|
|
|
|
Label { |
|
|
|
|
visible: channeldetails.frozenForSending |
|
|
|
|
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 { |
|
|
|
|
visible: channeldetails.frozenForSending && channeldetails.isOpen |
|
|
|
|
text: qsTr('n/a (frozen)') |
|
|
|
|
} |
|
|
|
|
Label { |
|
|
|
|
visible: !channeldetails.isOpen |
|
|
|
|
text: qsTr('n/a (channel not open)') |
|
|
|
|
@ -121,15 +136,31 @@ Pane {
|
|
|
|
|
color: Material.accentColor |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FormattedAmount { |
|
|
|
|
visible: !channeldetails.frozenForReceiving && channeldetails.isOpen |
|
|
|
|
amount: channeldetails.canReceive |
|
|
|
|
} |
|
|
|
|
RowLayout { |
|
|
|
|
visible: channeldetails.isOpen |
|
|
|
|
FormattedAmount { |
|
|
|
|
visible: !channeldetails.frozenForReceiving |
|
|
|
|
amount: channeldetails.canReceive |
|
|
|
|
singleLine: false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Label { |
|
|
|
|
visible: channeldetails.frozenForReceiving && channeldetails.isOpen |
|
|
|
|
text: qsTr('n/a (frozen)') |
|
|
|
|
Label { |
|
|
|
|
visible: channeldetails.frozenForReceiving |
|
|
|
|
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 { |
|
|
|
|
visible: !channeldetails.isOpen |
|
|
|
|
text: qsTr('n/a (channel not open)') |
|
|
|
|
@ -198,66 +229,40 @@ Pane {
|
|
|
|
|
icon.source: '../../icons/file.png' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
RowLayout { |
|
|
|
|
FlatButton { |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
FlatButton { |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
Layout.preferredWidth: 1 |
|
|
|
|
text: qsTr('Close channel'); |
|
|
|
|
enabled: channeldetails.canClose |
|
|
|
|
onClicked: { |
|
|
|
|
var dialog = closechannel.createObject(root, { 'channelid': channelid }) |
|
|
|
|
dialog.open() |
|
|
|
|
} |
|
|
|
|
icon.source: '../../icons/closebutton.png' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FlatButton { |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
Layout.preferredWidth: 1 |
|
|
|
|
text: qsTr('Delete channel'); |
|
|
|
|
enabled: channeldetails.canDelete |
|
|
|
|
onClicked: { |
|
|
|
|
var dialog = app.messageDialog.createObject(root, |
|
|
|
|
{ |
|
|
|
|
'text': qsTr('Are you sure you want to delete this channel? This will purge associated transactions from your wallet history.'), |
|
|
|
|
'yesno': true |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
dialog.yesClicked.connect(function() { |
|
|
|
|
channeldetails.deleteChannel() |
|
|
|
|
app.stack.pop() |
|
|
|
|
Daemon.currentWallet.historyModel.init_model() // needed here? |
|
|
|
|
Daemon.currentWallet.channelModel.remove_channel(channelid) |
|
|
|
|
}) |
|
|
|
|
dialog.open() |
|
|
|
|
} |
|
|
|
|
icon.source: '../../icons/delete.png' |
|
|
|
|
Layout.preferredWidth: 1 |
|
|
|
|
text: qsTr('Close channel'); |
|
|
|
|
visible: channeldetails.canClose |
|
|
|
|
onClicked: { |
|
|
|
|
var dialog = closechannel.createObject(root, { 'channelid': channelid }) |
|
|
|
|
dialog.open() |
|
|
|
|
} |
|
|
|
|
icon.source: '../../icons/closebutton.png' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
RowLayout { |
|
|
|
|
FlatButton { |
|
|
|
|
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() |
|
|
|
|
Layout.preferredWidth: 1 |
|
|
|
|
text: qsTr('Delete channel'); |
|
|
|
|
visible: channeldetails.canDelete |
|
|
|
|
onClicked: { |
|
|
|
|
var dialog = app.messageDialog.createObject(root, |
|
|
|
|
{ |
|
|
|
|
'text': qsTr('Are you sure you want to delete this channel? This will purge associated transactions from your wallet history.'), |
|
|
|
|
'yesno': true |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
dialog.yesClicked.connect(function() { |
|
|
|
|
channeldetails.deleteChannel() |
|
|
|
|
app.stack.pop() |
|
|
|
|
Daemon.currentWallet.historyModel.init_model() // needed here? |
|
|
|
|
Daemon.currentWallet.channelModel.remove_channel(channelid) |
|
|
|
|
}) |
|
|
|
|
dialog.open() |
|
|
|
|
} |
|
|
|
|
icon.source: '../../icons/delete.png' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ChannelDetails { |
|
|
|
|
|