mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-16 15:58:11 +00:00
History: redesign transaction item
This commit is contained in:
parent
7c379e2cda
commit
f3799b9cb0
1 changed files with 196 additions and 240 deletions
|
@ -588,7 +588,7 @@ Rectangle {
|
|||
anchors.right: parent ? parent.right : undefined
|
||||
height: {
|
||||
if(!collapsed) return 60;
|
||||
return 320;
|
||||
return 234;
|
||||
}
|
||||
color: {
|
||||
if(!collapsed) return "transparent"
|
||||
|
@ -602,28 +602,37 @@ Rectangle {
|
|||
width: sideMargin
|
||||
color: "transparent"
|
||||
|
||||
Rectangle {
|
||||
visible: !isFailed && !isPending
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 24
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: 10
|
||||
height: 10
|
||||
radius: 8
|
||||
color: isout ? "#d85a00" : "#2eb358"
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
visible: isFailed || isPending
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 24
|
||||
anchors.topMargin: 22
|
||||
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
|
||||
tooltip: isFailed ? qsTr("Failed") : qsTr("Pending") + translationManager.emptyString
|
||||
themeTransition: false
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
hoverEnabled: true
|
||||
onEntered: parent.tooltipPopup.open()
|
||||
onExited: parent.tooltipPopup.close()
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
visible: !isout && confirmationsRequired === 60
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 21
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: 20
|
||||
height: 20
|
||||
source: "qrc:///images/miningxmr.png"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -646,7 +655,13 @@ Rectangle {
|
|||
spacing: 0
|
||||
clip: true
|
||||
Layout.preferredHeight: 120
|
||||
Layout.minimumWidth: 180
|
||||
Layout.minimumWidth: 155
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 10
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
|
@ -662,34 +677,36 @@ Rectangle {
|
|||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
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
|
||||
themeTransitionWhiteColor: MoneroComponents.Style._w_historyHeaderTextColor
|
||||
text: persistentSettings.historyHumanDates ? dateHuman : dateTime
|
||||
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 0
|
||||
|
||||
MouseArea {
|
||||
state: "copyable"
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
parent.color = MoneroComponents.Style.orange
|
||||
if (persistentSettings.historyHumanDates) {
|
||||
parent.text = dateTime;
|
||||
}
|
||||
}
|
||||
onExited: {
|
||||
parent.color = MoneroComponents.Style.defaultFontColor
|
||||
if (persistentSettings.historyHumanDates) {
|
||||
parent.text = dateHuman
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 20
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: (amount == 0 ? qsTr("Unknown amount") : displayAmount) + translationManager.emptyString
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
MouseArea {
|
||||
state: "copyable"
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: parent.color = MoneroComponents.Style.orange
|
||||
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
}
|
||||
Layout.preferredHeight: 10
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
@ -758,39 +775,20 @@ Rectangle {
|
|||
spacing: 0
|
||||
clip: true
|
||||
Layout.preferredHeight: 120
|
||||
Layout.minimumWidth: 230
|
||||
Layout.minimumWidth: 240
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 10
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 20
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: (isout ? qsTr("To") : qsTr("In")) + translationManager.emptyString
|
||||
color: MoneroComponents.Style.historyHeaderTextColor
|
||||
themeTransitionBlackColor: MoneroComponents.Style._b_historyHeaderTextColor
|
||||
themeTransitionWhiteColor: MoneroComponents.Style._w_historyHeaderTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 20
|
||||
Layout.preferredHeight: 30
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: addressField
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 1
|
||||
text: {
|
||||
if (isout) {
|
||||
if (address) {
|
||||
|
@ -818,9 +816,6 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
MouseArea {
|
||||
state: isout ? "copyable_address" : "copyable_receiving_address"
|
||||
anchors.fill: parent
|
||||
|
@ -834,7 +829,31 @@ Rectangle {
|
|||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 10
|
||||
Layout.preferredHeight: 30
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: tx_note ? 15 : 12
|
||||
text: tx_note ? tx_note : "(" + qsTr("No description") + ")" + translationManager.emptyString;
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 2
|
||||
opacity: 0.7
|
||||
|
||||
MouseArea {
|
||||
state: "set_tx_note"
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
parent.opacity = 1;
|
||||
parent.color = MoneroComponents.Style.orange;
|
||||
}
|
||||
onExited: {
|
||||
parent.opacity = 0.7;
|
||||
parent.color = MoneroComponents.Style.defaultFontColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
@ -843,6 +862,13 @@ Rectangle {
|
|||
Layout.preferredHeight: 10
|
||||
}
|
||||
|
||||
RowLayout{
|
||||
spacing: 0
|
||||
clip: true
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 0
|
||||
clip: true
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
|
@ -881,25 +907,11 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 10
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 0
|
||||
clip: true
|
||||
Layout.preferredHeight: 120
|
||||
Layout.minimumWidth: 130
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 10
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
|
@ -909,7 +921,7 @@ Rectangle {
|
|||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: qsTr("Date")
|
||||
text: qsTr("Blockheight") + translationManager.emptyString
|
||||
color: MoneroComponents.Style.historyHeaderTextColor
|
||||
themeTransitionBlackColor: MoneroComponents.Style._b_historyHeaderTextColor
|
||||
themeTransitionWhiteColor: MoneroComponents.Style._w_historyHeaderTextColor
|
||||
|
@ -924,8 +936,8 @@ Rectangle {
|
|||
|
||||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: persistentSettings.historyHumanDates ? dateHuman : dateTime
|
||||
font.pixelSize: 14
|
||||
text: (blockheight > 0 ? blockheight : qsTr('Pending')) + translationManager.emptyString;
|
||||
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
@ -934,16 +946,8 @@ Rectangle {
|
|||
state: "copyable"
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
parent.color = MoneroComponents.Style.orange
|
||||
if (persistentSettings.historyHumanDates) {
|
||||
parent.text = dateTime;
|
||||
}
|
||||
}
|
||||
onExited: {
|
||||
parent.color = MoneroComponents.Style.defaultFontColor
|
||||
if (persistentSettings.historyHumanDates) {
|
||||
parent.text = dateHuman
|
||||
onEntered: parent.color = MoneroComponents.Style.orange
|
||||
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -955,6 +959,68 @@ Rectangle {
|
|||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 10
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 0
|
||||
clip: true
|
||||
Layout.preferredHeight: 120
|
||||
Layout.minimumWidth: 145
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 10
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 10
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 20
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: (isout ? "-" : "+") + (amount == 0 ? "? XMR" : displayAmount);
|
||||
color: {
|
||||
if (amountMouseArea.containsMouse) return MoneroComponents.Style.orange
|
||||
if (isout) return "#d85a00"
|
||||
if (!isout) return "#2eb358"
|
||||
}
|
||||
themeTransition: false
|
||||
tooltip: amount == 0 ? qsTr("Unknown amount") : "" + translationManager.emptyString;
|
||||
|
||||
MouseArea {
|
||||
id: amountMouseArea
|
||||
state: "copyable"
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onEntered: parent.tooltip ? parent.tooltipPopup.open() : ""
|
||||
onExited: parent.tooltip ? parent.tooltipPopup.close() : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 10
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 10
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
|
@ -993,15 +1059,6 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
visible: !isout && confirmationsRequired === 60
|
||||
anchors.left: btnDetails.right
|
||||
anchors.leftMargin: 16
|
||||
width: 28
|
||||
height: 28
|
||||
source: "qrc:///images/miningxmr.png"
|
||||
}
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
visible: isout
|
||||
anchors.left: btnDetails.right
|
||||
|
@ -1039,68 +1096,6 @@ Rectangle {
|
|||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 20
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: qsTr("Description") + translationManager.emptyString
|
||||
color: MoneroComponents.Style.historyHeaderTextColor
|
||||
themeTransitionBlackColor: MoneroComponents.Style._b_historyHeaderTextColor
|
||||
themeTransitionWhiteColor: MoneroComponents.Style._w_historyHeaderTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 20
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: txNoteText
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: tx_note !== "" ? tx_note : "-"
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
MouseArea {
|
||||
state: "copyable"
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: parent.color = MoneroComponents.Style.orange
|
||||
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
}
|
||||
|
||||
MoneroEffects.ImageMask {
|
||||
anchors.top: parent.top
|
||||
anchors.left: txNoteText.right
|
||||
anchors.leftMargin: 12
|
||||
image: "qrc:///images/edit.svg"
|
||||
fontAwesomeFallbackIcon: FontAwesome.pencilSquare
|
||||
fontAwesomeFallbackSize: 22
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: 0.75
|
||||
width: 23
|
||||
height: 21
|
||||
|
||||
MouseArea {
|
||||
id: txNoteArea
|
||||
state: "set_tx_note"
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: parent.opacity = 0.4;
|
||||
onExited: parent.opacity = 0.75;
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
|
@ -1196,45 +1191,6 @@ Rectangle {
|
|||
Layout.preferredHeight: 10
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 20
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: qsTr("Blockheight") + translationManager.emptyString
|
||||
color: MoneroComponents.Style.historyHeaderTextColor
|
||||
themeTransitionBlackColor: MoneroComponents.Style._b_historyHeaderTextColor
|
||||
themeTransitionWhiteColor: MoneroComponents.Style._w_historyHeaderTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 20
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 14
|
||||
text: (blockheight > 0 ? blockheight : qsTr('Pending')) + translationManager.emptyString;
|
||||
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
MouseArea {
|
||||
state: "copyable"
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: parent.color = MoneroComponents.Style.orange
|
||||
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
|
|
Loading…
Reference in a new issue