1
0

add initial fee histogram

This commit is contained in:
Sander van Grieken
2022-03-23 13:48:30 +01:00
parent 03048d39b6
commit cf059cb31b
2 changed files with 85 additions and 11 deletions

View File

@@ -7,17 +7,80 @@ Pane {
property string title: qsTr('Network')
GridLayout {
columns: 2
columns: 3
Label { text: qsTr("Network: "); color: Material.primaryHighlightedTextColor; font.bold: true }
Label { text: Network.networkName }
Label { text: qsTr("Server: "); color: Material.primaryHighlightedTextColor; font.bold: true }
Label { text: Network.server }
Label { text: qsTr("Local Height: "); color: Material.primaryHighlightedTextColor; font.bold: true }
Label { text: Network.height }
Label { text: qsTr("Status: "); color: Material.primaryHighlightedTextColor; font.bold: true }
Label { text: Network.status }
Label { text: qsTr("Wallet: "); color: Material.primaryHighlightedTextColor; font.bold: true }
Label { text: Daemon.walletName }
Label {
text: qsTr("Network: ");
color: Material.primaryHighlightedTextColor;
font.bold: true
}
Label {
text: Network.networkName
Layout.columnSpan: 2
}
Label {
text: qsTr("Server: ");
color: Material.primaryHighlightedTextColor;
font.bold: true
}
Label {
text: Network.server
Layout.columnSpan: 2
}
Label {
text: qsTr("Local Height: ");
color: Material.primaryHighlightedTextColor;
font.bold: true
}
Label {
text: Network.height
Layout.columnSpan: 2
}
Label {
text: qsTr("Status: ");
color: Material.primaryHighlightedTextColor;
font.bold: true
}
Image {
Layout.preferredWidth: 16
Layout.preferredHeight: 16
source: Daemon.currentWallet.isUptodate
? "../../icons/status_connected.png"
: "../../icons/status_lagging.png"
}
Label {
text: Network.status
}
Label {
text: qsTr("Network fees: ");
color: Material.primaryHighlightedTextColor;
font.bold: true
}
Label {
id: feeHistogram
Layout.columnSpan: 2
}
}
function setFeeHistogram() {
var txt = ''
Network.feeHistogram.forEach(function(item) {
txt = txt + item[0] + ': ' + item[1] + '\n';
})
feeHistogram.text = txt.trim()
}
Connections {
target: Network
function onFeeHistogramUpdated() {
setFeeHistogram()
}
}
Component.onCompleted: setFeeHistogram()
}