forked from Public/monero-gui
export/import key images
This commit is contained in:
@@ -539,6 +539,30 @@ Rectangle {
|
||||
submitTxDialog.open();
|
||||
}
|
||||
}
|
||||
|
||||
StandardButton {
|
||||
id: exportKeyImagesButton
|
||||
text: qsTr("Export key images") + translationManager.emptyString
|
||||
small: true
|
||||
visible: !appWindow.viewOnly
|
||||
enabled: pageRoot.enabled
|
||||
onClicked: {
|
||||
console.log("Transfer: export key images clicked")
|
||||
exportKeyImagesDialog.open();
|
||||
}
|
||||
}
|
||||
|
||||
StandardButton {
|
||||
id: importKeyImagesButton
|
||||
text: qsTr("Import key images") + translationManager.emptyString
|
||||
small: true
|
||||
visible: appWindow.viewOnly && walletManager.isDaemonLocal(appWindow.currentDaemonAddress)
|
||||
enabled: pageRoot.enabled
|
||||
onClicked: {
|
||||
console.log("Transfer: import key images clicked")
|
||||
importKeyImagesDialog.open();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -630,6 +654,35 @@ Rectangle {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//ExportKeyImagesDialog
|
||||
FileDialog {
|
||||
id: exportKeyImagesDialog
|
||||
selectMultiple: false
|
||||
selectExisting: false
|
||||
onAccepted: {
|
||||
console.log(walletManager.urlToLocalPath(exportKeyImagesDialog.fileUrl))
|
||||
currentWallet.exportKeyImages(walletManager.urlToLocalPath(exportKeyImagesDialog.fileUrl));
|
||||
}
|
||||
onRejected: {
|
||||
console.log("Canceled");
|
||||
}
|
||||
}
|
||||
|
||||
//ImportKeyImagesDialog
|
||||
FileDialog {
|
||||
id: importKeyImagesDialog
|
||||
selectMultiple: false
|
||||
selectExisting: true
|
||||
title: qsTr("Please choose a file") + translationManager.emptyString
|
||||
onAccepted: {
|
||||
console.log(walletManager.urlToLocalPath(importKeyImagesDialog.fileUrl))
|
||||
currentWallet.importKeyImages(walletManager.urlToLocalPath(importKeyImagesDialog.fileUrl));
|
||||
}
|
||||
onRejected: {
|
||||
console.log("Canceled");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user