mirror of
https://github.com/monero-project/monero-gui
synced 2025-01-04 20:26:23 +01:00
SuccessfulTxDialog: add View progress button
This commit is contained in:
parent
af0b3142a0
commit
01c3c19653
@ -119,6 +119,12 @@ Rectangle {
|
|||||||
transferView.sendTo(address, paymentId, description);
|
transferView.sendTo(address, paymentId, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// open Transactions page with search term in search field
|
||||||
|
function searchInHistory(searchTerm){
|
||||||
|
root.state = "History";
|
||||||
|
historyView.searchInHistory(searchTerm);
|
||||||
|
}
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "History"
|
name: "History"
|
||||||
|
@ -132,7 +132,7 @@ Rectangle {
|
|||||||
fontSize: 16
|
fontSize: 16
|
||||||
}
|
}
|
||||||
|
|
||||||
// open folder / done buttons
|
// view progress / open folder / done buttons
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: buttons
|
id: buttons
|
||||||
spacing: 70
|
spacing: 70
|
||||||
@ -140,6 +140,20 @@ Rectangle {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 50
|
Layout.preferredHeight: 50
|
||||||
|
|
||||||
|
MoneroComponents.StandardButton {
|
||||||
|
id: viewProgressButton
|
||||||
|
visible: !appWindow.viewOnly
|
||||||
|
text: qsTr("View progress") + translationManager.emptyString;
|
||||||
|
width: 200
|
||||||
|
primary: false
|
||||||
|
KeyNavigation.tab: doneButton
|
||||||
|
onClicked: {
|
||||||
|
doSearchInHistory(root.transactionID);
|
||||||
|
root.close()
|
||||||
|
root.rejected()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: openFolderButton
|
id: openFolderButton
|
||||||
visible: appWindow.viewOnly
|
visible: appWindow.viewOnly
|
||||||
@ -156,7 +170,7 @@ Rectangle {
|
|||||||
text: qsTr("Done") + translationManager.emptyString;
|
text: qsTr("Done") + translationManager.emptyString;
|
||||||
width: 200
|
width: 200
|
||||||
focus: root.visible
|
focus: root.visible
|
||||||
KeyNavigation.tab: openFolderButton
|
KeyNavigation.tab: appWindow.viewOnly ? openFolderButton : viewProgressButton
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.close()
|
root.close()
|
||||||
root.accepted()
|
root.accepted()
|
||||||
|
6
main.qml
6
main.qml
@ -983,6 +983,11 @@ ApplicationWindow {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function doSearchInHistory(searchTerm) {
|
||||||
|
middlePanel.searchInHistory(searchTerm);
|
||||||
|
leftPanel.selectItem(middlePanel.state)
|
||||||
|
}
|
||||||
|
|
||||||
// called on "getProof"
|
// called on "getProof"
|
||||||
function handleGetProof(txid, address, message) {
|
function handleGetProof(txid, address, message) {
|
||||||
console.log("Getting payment proof: ")
|
console.log("Getting payment proof: ")
|
||||||
@ -1113,6 +1118,7 @@ ApplicationWindow {
|
|||||||
middlePanel.addressBookView.clearFields();
|
middlePanel.addressBookView.clearFields();
|
||||||
middlePanel.transferView.clearFields();
|
middlePanel.transferView.clearFields();
|
||||||
middlePanel.receiveView.clearFields();
|
middlePanel.receiveView.clearFields();
|
||||||
|
middlePanel.historyView.clearFields();
|
||||||
// disable timers
|
// disable timers
|
||||||
userInActivityTimer.running = false;
|
userInActivityTimer.running = false;
|
||||||
});
|
});
|
||||||
|
@ -588,6 +588,7 @@ Rectangle {
|
|||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
visible: !isFailed && !isPending
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 24
|
anchors.topMargin: 24
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@ -596,6 +597,19 @@ Rectangle {
|
|||||||
radius: 8
|
radius: 8
|
||||||
color: isout ? "#d85a00" : "#2eb358"
|
color: isout ? "#d85a00" : "#2eb358"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
visible: isFailed || isPending
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 24
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
font.family: FontAwesome.fontFamilySolid
|
||||||
|
font.styleName: isFailed ? "Solid" : ""
|
||||||
|
font.pixelSize: 15
|
||||||
|
text: isFailed ? FontAwesome.times : FontAwesome.clockO
|
||||||
|
color: isFailed ? "#FF0000" : MoneroComponents.Style.defaultFontColor
|
||||||
|
themeTransition: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@ -633,7 +647,7 @@ Rectangle {
|
|||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
text: (isout ? qsTr("Sent") : qsTr("Received")) + translationManager.emptyString
|
text: (isout ? qsTr("Sent") : qsTr("Received")) + (isFailed ? " (" + qsTr("Failed") + ")" : (isPending ? " (" + qsTr("Pending") + ")" : "")) + translationManager.emptyString
|
||||||
color: MoneroComponents.Style.historyHeaderTextColor
|
color: MoneroComponents.Style.historyHeaderTextColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
themeTransitionBlackColor: MoneroComponents.Style._b_historyHeaderTextColor
|
themeTransitionBlackColor: MoneroComponents.Style._b_historyHeaderTextColor
|
||||||
@ -764,12 +778,6 @@ Rectangle {
|
|||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
text: {
|
text: {
|
||||||
if (isout) {
|
if (isout) {
|
||||||
if (isFailed) {
|
|
||||||
return qsTr("Failed") + translationManager.emptyString;
|
|
||||||
}
|
|
||||||
if (isPending) {
|
|
||||||
return qsTr("Waiting confirmation...") + translationManager.emptyString;
|
|
||||||
}
|
|
||||||
if (address) {
|
if (address) {
|
||||||
const addressBookName = currentWallet ? currentWallet.addressBook.getDescription(address) : null;
|
const addressBookName = currentWallet ? currentWallet.addressBook.getDescription(address) : null;
|
||||||
return (addressBookName ? FontAwesome.addressBook + " " + addressBookName : TxUtils.addressTruncate(address, 8));
|
return (addressBookName ? FontAwesome.addressBook + " " + addressBookName : TxUtils.addressTruncate(address, 8));
|
||||||
@ -1341,7 +1349,7 @@ Rectangle {
|
|||||||
checked: persistentSettings.historyHumanDates
|
checked: persistentSettings.historyHumanDates
|
||||||
onClicked: {
|
onClicked: {
|
||||||
persistentSettings.historyHumanDates = !persistentSettings.historyHumanDates
|
persistentSettings.historyHumanDates = !persistentSettings.historyHumanDates
|
||||||
root.updateDisplay(root.txOffset, root.txMax, false);
|
root.updateDisplay(root.txOffset, root.txMax);
|
||||||
}
|
}
|
||||||
text: qsTr("Human readable date format") + translationManager.emptyString
|
text: qsTr("Human readable date format") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
@ -1447,15 +1455,14 @@ Rectangle {
|
|||||||
root.updateDisplay(root.txOffset, root.txMax);
|
root.updateDisplay(root.txOffset, root.txMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateDisplay(tx_offset, tx_max, auto_collapse) {
|
function updateDisplay(tx_offset, tx_max) {
|
||||||
if(typeof auto_collapse === 'undefined') auto_collapse = false;
|
|
||||||
txListViewModel.clear();
|
txListViewModel.clear();
|
||||||
|
|
||||||
// limit results as per tx_max (root.txMax)
|
// limit results as per tx_max (root.txMax)
|
||||||
var txs = root.txData.slice(tx_offset, tx_offset + tx_max);
|
var txs = root.txData.slice(tx_offset, tx_offset + tx_max);
|
||||||
|
|
||||||
// make first result on the first page collapsed by default
|
// collapse tx if there is a single result
|
||||||
if(auto_collapse && root.txPage === 1 && txs.length > 0 && (root.sortSearchString == null || root.sortSearchString === ""))
|
if(root.txPage === 1 && txs.length === 1)
|
||||||
root.txDataCollapsed.push(txs[0]['hash']);
|
root.txDataCollapsed.push(txs[0]['hash']);
|
||||||
|
|
||||||
// populate listview
|
// populate listview
|
||||||
@ -1741,10 +1748,22 @@ Rectangle {
|
|||||||
root.reset();
|
root.reset();
|
||||||
root.refresh();
|
root.refresh();
|
||||||
root.initialized = true;
|
root.initialized = true;
|
||||||
|
root.updateFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPageClosed(){
|
function onPageClosed(){
|
||||||
root.initialized = false;
|
root.initialized = false;
|
||||||
root.reset(true);
|
root.reset(true);
|
||||||
|
root.clearFields();
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchInHistory(searchTerm){
|
||||||
|
searchInput.text = searchTerm;
|
||||||
|
sortAndFilter.collapsed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearFields() {
|
||||||
|
searchInput.text = "";
|
||||||
|
root.txDataCollapsed = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user