chore: add object names market data fields (#14904)
This commit is contained in:
parent
3c418ab2d0
commit
5c5debd0c0
|
@ -345,18 +345,21 @@ Item {
|
||||||
visible: !d.isCommunityAsset
|
visible: !d.isCommunityAsset
|
||||||
InformationTile {
|
InformationTile {
|
||||||
maxWidth: parent.width
|
maxWidth: parent.width
|
||||||
|
objectName: "marketCapInformationTile"
|
||||||
primaryText: qsTr("Market Cap")
|
primaryText: qsTr("Market Cap")
|
||||||
secondaryText: token && token.marketDetails && token.marketDetails.marketCap ? LocaleUtils.currencyAmountToLocaleString(token.marketDetails.marketCap) : Constants.dummyText
|
secondaryText: token && token.marketDetails && token.marketDetails.marketCap ? LocaleUtils.currencyAmountToLocaleString(token.marketDetails.marketCap) : Constants.dummyText
|
||||||
isLoading: d.marketDetailsLoading
|
isLoading: d.marketDetailsLoading
|
||||||
}
|
}
|
||||||
InformationTile {
|
InformationTile {
|
||||||
maxWidth: parent.width
|
maxWidth: parent.width
|
||||||
|
objectName: "dayLowInformationTile"
|
||||||
primaryText: qsTr("Day Low")
|
primaryText: qsTr("Day Low")
|
||||||
secondaryText: token && token.marketDetails && token.marketDetails.lowDay ? LocaleUtils.currencyAmountToLocaleString(token.marketDetails.lowDay) : Constants.dummyText
|
secondaryText: token && token.marketDetails && token.marketDetails.lowDay ? LocaleUtils.currencyAmountToLocaleString(token.marketDetails.lowDay) : Constants.dummyText
|
||||||
isLoading: d.marketDetailsLoading
|
isLoading: d.marketDetailsLoading
|
||||||
}
|
}
|
||||||
InformationTile {
|
InformationTile {
|
||||||
maxWidth: parent.width
|
maxWidth: parent.width
|
||||||
|
objectName: "dayHighInformationTile"
|
||||||
primaryText: qsTr("Day High")
|
primaryText: qsTr("Day High")
|
||||||
secondaryText: token && token.marketDetails && token.marketDetails.highDay ? LocaleUtils.currencyAmountToLocaleString(token.marketDetails.highDay) : Constants.dummyText
|
secondaryText: token && token.marketDetails && token.marketDetails.highDay ? LocaleUtils.currencyAmountToLocaleString(token.marketDetails.highDay) : Constants.dummyText
|
||||||
isLoading: d.marketDetailsLoading
|
isLoading: d.marketDetailsLoading
|
||||||
|
@ -367,6 +370,7 @@ Item {
|
||||||
InformationTile {
|
InformationTile {
|
||||||
readonly property double changePctHour: token && token.marketDetails ? token.marketDetails.changePctHour : 0
|
readonly property double changePctHour: token && token.marketDetails ? token.marketDetails.changePctHour : 0
|
||||||
maxWidth: parent.width
|
maxWidth: parent.width
|
||||||
|
objectName: "hourInformationTile"
|
||||||
primaryText: qsTr("Hour")
|
primaryText: qsTr("Hour")
|
||||||
secondaryText: "%1%".arg(LocaleUtils.numberToLocaleString(changePctHour, 2))
|
secondaryText: "%1%".arg(LocaleUtils.numberToLocaleString(changePctHour, 2))
|
||||||
secondaryLabel.customColor: changePctHour === 0 ? Theme.palette.directColor1 :
|
secondaryLabel.customColor: changePctHour === 0 ? Theme.palette.directColor1 :
|
||||||
|
@ -378,6 +382,7 @@ Item {
|
||||||
readonly property double changePctDay: token && token.marketDetails ? token.marketDetails.changePctDay : 0
|
readonly property double changePctDay: token && token.marketDetails ? token.marketDetails.changePctDay : 0
|
||||||
maxWidth: parent.width
|
maxWidth: parent.width
|
||||||
primaryText: qsTr("Day")
|
primaryText: qsTr("Day")
|
||||||
|
objectName: "dayInformationTile"
|
||||||
secondaryText: "%1%".arg(LocaleUtils.numberToLocaleString(changePctDay, 2))
|
secondaryText: "%1%".arg(LocaleUtils.numberToLocaleString(changePctDay, 2))
|
||||||
secondaryLabel.customColor: changePctDay === 0 ? Theme.palette.directColor1 :
|
secondaryLabel.customColor: changePctDay === 0 ? Theme.palette.directColor1 :
|
||||||
changePctDay < 0 ? Theme.palette.dangerColor1 :
|
changePctDay < 0 ? Theme.palette.dangerColor1 :
|
||||||
|
@ -388,6 +393,7 @@ Item {
|
||||||
readonly property double changePct24hour: token && token.marketDetails ? token.marketDetails.changePct24hour : 0
|
readonly property double changePct24hour: token && token.marketDetails ? token.marketDetails.changePct24hour : 0
|
||||||
maxWidth: parent.width
|
maxWidth: parent.width
|
||||||
primaryText: qsTr("24 Hours")
|
primaryText: qsTr("24 Hours")
|
||||||
|
objectName: "24HoursInformationTile"
|
||||||
secondaryText: "%1%".arg(LocaleUtils.numberToLocaleString(changePct24hour, 2))
|
secondaryText: "%1%".arg(LocaleUtils.numberToLocaleString(changePct24hour, 2))
|
||||||
secondaryLabel.customColor: changePct24hour === 0 ? Theme.palette.directColor1 :
|
secondaryLabel.customColor: changePct24hour === 0 ? Theme.palette.directColor1 :
|
||||||
changePct24hour < 0 ? Theme.palette.dangerColor1 :
|
changePct24hour < 0 ? Theme.palette.dangerColor1 :
|
||||||
|
|
Loading…
Reference in New Issue