History: add open folder button after CSV export

This commit is contained in:
selsta 2022-12-02 05:56:51 +01:00
parent aef4a982dc
commit 7faec48c0a
No known key found for this signature in database
GPG key ID: 2EA0A99A8B07AE5E

View file

@ -1765,18 +1765,25 @@ Rectangle {
var written = currentWallet.history.writeCSV(currentWallet.currentSubaddressAccount, dataDir);
if(written !== ""){
informationPopup.title = qsTr("Success") + translationManager.emptyString;
confirmationDialog.title = qsTr("Success") + translationManager.emptyString;
var text = qsTr("CSV file written to: %1").arg(written) + "\n\n"
text += qsTr("Tip: Use your favorite spreadsheet software to sort on blockheight.") + "\n\n" + translationManager.emptyString;
informationPopup.text = text;
informationPopup.icon = StandardIcon.Information;
confirmationDialog.text = text;
confirmationDialog.icon = StandardIcon.Information;
confirmationDialog.cancelText = qsTr("Open folder") + translationManager.emptyString;
confirmationDialog.onAcceptedCallback = null;
confirmationDialog.onRejectedCallback = function() {
oshelper.openContainingFolder(written);
}
confirmationDialog.open();
} else {
informationPopup.title = qsTr("Error") + translationManager.emptyString;
informationPopup.text = qsTr("Error exporting transaction data.") + "\n\n" + translationManager.emptyString;
informationPopup.icon = StandardIcon.Critical;
informationPopup.onCloseCallback = null;
informationPopup.open();
}
informationPopup.onCloseCallback = null;
informationPopup.open();
}
Component.onCompleted: {
var _folder = 'file://' + appWindow.accountsDir;