|
|
|
@ -203,58 +203,60 @@ Pane { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FlatButton { |
|
|
|
ButtonContainer { |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.fillWidth: true |
|
|
|
visible: !channeldetails.isBackup |
|
|
|
|
|
|
|
text: qsTr('Backup'); |
|
|
|
FlatButton { |
|
|
|
onClicked: { |
|
|
|
Layout.fillWidth: true |
|
|
|
var dialog = app.genericShareDialog.createObject(root, |
|
|
|
Layout.preferredWidth: 1 |
|
|
|
{ |
|
|
|
visible: !channeldetails.isBackup |
|
|
|
|
|
|
|
text: qsTr('Backup') |
|
|
|
|
|
|
|
onClicked: { |
|
|
|
|
|
|
|
var dialog = app.genericShareDialog.createObject(root, { |
|
|
|
title: qsTr('Channel Backup for %1').arg(channeldetails.short_cid), |
|
|
|
title: qsTr('Channel Backup for %1').arg(channeldetails.short_cid), |
|
|
|
text: channeldetails.channelBackup(), |
|
|
|
text: channeldetails.channelBackup(), |
|
|
|
text_help: channeldetails.channelBackupHelpText(), |
|
|
|
text_help: channeldetails.channelBackupHelpText(), |
|
|
|
iconSource: Qt.resolvedUrl('../../icons/file.png') |
|
|
|
iconSource: Qt.resolvedUrl('../../icons/file.png') |
|
|
|
} |
|
|
|
}) |
|
|
|
) |
|
|
|
dialog.open() |
|
|
|
dialog.open() |
|
|
|
} |
|
|
|
|
|
|
|
icon.source: '../../icons/file.png' |
|
|
|
} |
|
|
|
} |
|
|
|
icon.source: '../../icons/file.png' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FlatButton { |
|
|
|
FlatButton { |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.preferredWidth: 1 |
|
|
|
Layout.preferredWidth: 1 |
|
|
|
text: qsTr('Close channel'); |
|
|
|
text: qsTr('Close channel'); |
|
|
|
visible: 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() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
icon.source: '../../icons/closebutton.png' |
|
|
|
} |
|
|
|
} |
|
|
|
icon.source: '../../icons/closebutton.png' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FlatButton { |
|
|
|
FlatButton { |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.preferredWidth: 1 |
|
|
|
Layout.preferredWidth: 1 |
|
|
|
text: qsTr('Delete channel'); |
|
|
|
text: qsTr('Delete channel'); |
|
|
|
visible: channeldetails.canDelete |
|
|
|
visible: channeldetails.canDelete |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
var dialog = app.messageDialog.createObject(root, |
|
|
|
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.'), |
|
|
|
'text': qsTr('Are you sure you want to delete this channel? This will purge associated transactions from your wallet history.'), |
|
|
|
yesno: true |
|
|
|
'yesno': true |
|
|
|
}) |
|
|
|
} |
|
|
|
dialog.yesClicked.connect(function() { |
|
|
|
) |
|
|
|
channeldetails.deleteChannel() |
|
|
|
dialog.yesClicked.connect(function() { |
|
|
|
app.stack.pop() |
|
|
|
channeldetails.deleteChannel() |
|
|
|
Daemon.currentWallet.historyModel.init_model(true) // needed here? |
|
|
|
app.stack.pop() |
|
|
|
Daemon.currentWallet.channelModel.remove_channel(channelid) |
|
|
|
Daemon.currentWallet.historyModel.init_model(true) // needed here? |
|
|
|
}) |
|
|
|
Daemon.currentWallet.channelModel.remove_channel(channelid) |
|
|
|
dialog.open() |
|
|
|
}) |
|
|
|
} |
|
|
|
dialog.open() |
|
|
|
icon.source: '../../icons/delete.png' |
|
|
|
} |
|
|
|
} |
|
|
|
icon.source: '../../icons/delete.png' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ChannelDetails { |
|
|
|
ChannelDetails { |
|
|
|
|