aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-04-24 16:14:28 -0400
committerluigi1111 <luigi1111w@gmail.com>2021-04-24 16:14:28 -0400
commitc11e32f511fdd8f1998b50aeab6da4f91dc903b6 (patch)
tree7eed9fb77347eeee74b32e80970432714c591295
parentbc1131ce41f5386639ddf0538df8044cb5271598 (diff)
parent01c3c1965357200b07e2f7927dc72d770577f76e (diff)
downloadmonzero-gui-c11e32f511fdd8f1998b50aeab6da4f91dc903b6.tar.gz
monzero-gui-c11e32f511fdd8f1998b50aeab6da4f91dc903b6.tar.xz
monzero-gui-c11e32f511fdd8f1998b50aeab6da4f91dc903b6.zip
Merge pull request #3208
01c3c19 SuccessfulTxDialog: add View progress button (rating89us)
-rw-r--r--MiddlePanel.qml6
-rw-r--r--components/SuccessfulTxDialog.qml18
-rw-r--r--main.qml6
-rw-r--r--pages/History.qml43
4 files changed, 59 insertions, 14 deletions
diff --git a/MiddlePanel.qml b/MiddlePanel.qml
index 386ec24b..544f0244 100644
--- a/MiddlePanel.qml
+++ b/MiddlePanel.qml
@@ -116,6 +116,12 @@ Rectangle {
transferView.sendTo(address, paymentId, description);
}
+ // open Transactions page with search term in search field
+ function searchInHistory(searchTerm){
+ root.state = "History";
+ historyView.searchInHistory(searchTerm);
+ }
+
states: [
State {
name: "History"
diff --git a/components/SuccessfulTxDialog.qml b/components/SuccessfulTxDialog.qml
index 051d46d2..3587a116 100644
--- a/components/SuccessfulTxDialog.qml
+++ b/components/SuccessfulTxDialog.qml
@@ -132,7 +132,7 @@ Rectangle {
fontSize: 16
}
- // open folder / done buttons
+ // view progress / open folder / done buttons
RowLayout {
id: buttons
spacing: 70
@@ -141,6 +141,20 @@ Rectangle {
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 {
id: openFolderButton
visible: appWindow.viewOnly
text: qsTr("Open folder") + translationManager.emptyString;
@@ -156,7 +170,7 @@ Rectangle {
text: qsTr("Done") + translationManager.emptyString;
width: 200
focus: root.visible
- KeyNavigation.tab: openFolderButton
+ KeyNavigation.tab: appWindow.viewOnly ? openFolderButton : viewProgressButton
onClicked: {
root.close()
root.accepted()
diff --git a/main.qml b/main.qml
index c0e67eae..22787b12 100644
--- a/main.qml
+++ b/main.qml
@@ -983,6 +983,11 @@ ApplicationWindow {
});
}
+ function doSearchInHistory(searchTerm) {
+ middlePanel.searchInHistory(searchTerm);
+ leftPanel.selectItem(middlePanel.state)
+ }
+
// called on "getProof"
function handleGetProof(txid, address, message) {
console.log("Getting payment proof: ")
@@ -1113,6 +1118,7 @@ ApplicationWindow {
middlePanel.addressBookView.clearFields();
middlePanel.transferView.clearFields();
middlePanel.receiveView.clearFields();
+ middlePanel.historyView.clearFields();
// disable timers
userInActivityTimer.running = false;
});
diff --git a/pages/History.qml b/pages/History.qml
index 38940878..13eec3cf 100644
--- a/pages/History.qml
+++ b/pages/History.qml
@@ -588,6 +588,7 @@ Rectangle {
color: "transparent"
Rectangle {
+ visible: !isFailed && !isPending
anchors.top: parent.top
anchors.topMargin: 24
anchors.horizontalCenter: parent.horizontalCenter
@@ -596,6 +597,19 @@ Rectangle {
radius: 8
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 {
@@ -633,7 +647,7 @@ Rectangle {
MoneroComponents.TextPlain {
font.family: MoneroComponents.Style.fontRegular.name
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
anchors.verticalCenter: parent.verticalCenter
themeTransitionBlackColor: MoneroComponents.Style._b_historyHeaderTextColor
@@ -764,12 +778,6 @@ Rectangle {
font.pixelSize: 15
text: {
if (isout) {
- if (isFailed) {
- return qsTr("Failed") + translationManager.emptyString;
- }
- if (isPending) {
- return qsTr("Waiting confirmation...") + translationManager.emptyString;
- }
if (address) {
return (addressBookName ? FontAwesome.addressBook + " " + addressBookName : TxUtils.addressTruncate(address, 8));
}
@@ -1338,7 +1346,7 @@ Rectangle {
checked: persistentSettings.historyHumanDates
onClicked: {
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
}
@@ -1450,15 +1458,14 @@ Rectangle {
root.updateDisplay(root.txOffset, root.txMax);
}
- function updateDisplay(tx_offset, tx_max, auto_collapse) {
- if(typeof auto_collapse === 'undefined') auto_collapse = false;
+ function updateDisplay(tx_offset, tx_max) {
txListViewModel.clear();
// limit results as per tx_max (root.txMax)
var txs = root.txData.slice(tx_offset, tx_offset + tx_max);
- // make first result on the first page collapsed by default
- if(auto_collapse && root.txPage === 1 && txs.length > 0 && (root.sortSearchString == null || root.sortSearchString === ""))
+ // collapse tx if there is a single result
+ if(root.txPage === 1 && txs.length === 1)
root.txDataCollapsed.push(txs[0]['hash']);
// populate listview
@@ -1755,10 +1762,22 @@ Rectangle {
root.reset();
root.refresh();
root.initialized = true;
+ root.updateFilter();
}
function onPageClosed(){
root.initialized = false;
root.reset(true);
+ root.clearFields();
+ }
+
+ function searchInHistory(searchTerm){
+ searchInput.text = searchTerm;
+ sortAndFilter.collapsed = true;
+ }
+
+ function clearFields() {
+ searchInput.text = "";
+ root.txDataCollapsed = [];
}
}