New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Statistics Page #445
Statistics Page #445
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ui/statistics_page.go
Outdated
return func(gtx C) D { | ||
return pg.theme.Separator().Layout(gtx) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return func(gtx C) D { | |
return pg.theme.Separator().Layout(gtx) | |
} | |
return pg.theme.Separator().Layout |
ui/statistics_page.go
Outdated
txs **wallet.Transactions | ||
theme *decredmaterial.Theme | ||
l layout.List | ||
startupTime string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed and can be removed.
startupTime string | |
ui/statistics_page.go
Outdated
Axis: layout.Vertical, | ||
}, | ||
} | ||
pg.startupTime = time.Now().String() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed and can be removed.
pg.startupTime = time.Now().String() |
ui/statistics_page.go
Outdated
pg.lineSeparator(), | ||
item("Peers connected", strconv.Itoa(int(pg.syncStatus.ConnectedPeers))), | ||
pg.lineSeparator(), | ||
item("Uptime", pg.startupTime), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
item("Uptime", pg.startupTime), | |
item("Uptime", time.Now().String()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
time.Now() returns the current time, Uptime should be how long the app has been running.
ui/statistics_page.go
Outdated
l := pg.theme.Label(values.TextSize14, t) | ||
r := pg.theme.Label(values.TextSize14, v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l := pg.theme.Label(values.TextSize14, t) | |
r := pg.theme.Label(values.TextSize14, v) | |
l := pg.theme.Body2(t) | |
r := pg.theme.Body2(v) |
ui/statistics_page.go
Outdated
m16 := values.MarginPadding16 | ||
return layout.Inset{Left: m16}.Layout(gtx, func(gtx C) D { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m16 := values.MarginPadding16 | |
return layout.Inset{Left: m16}.Layout(gtx, func(gtx C) D { | |
return layout.Inset{Left: values.MarginPadding16}.Layout(gtx, func(gtx C) D { |
No need for the extra variable as it can fit into the Inset.
ui/statistics_page.go
Outdated
body: func(gtx C) D { | ||
return pg.layoutStats(gtx) | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
body: func(gtx C) D { | |
return pg.layoutStats(gtx) | |
}, | |
body: pg.layoutStats, |
ui/statistics_page.go
Outdated
pg.lineSeparator(), | ||
item("Peers connected", strconv.Itoa(int(pg.syncStatus.ConnectedPeers))), | ||
pg.lineSeparator(), | ||
item("Uptime", pg.startupTime), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
time.Now() returns the current time, Uptime should be how long the app has been running.
f4ec5af
to
37ccba4
Compare
- Add spacing to page - Show network name, bestblock, data directory, wallet data size, number of txs and wallet
- Use theme Separator in layout widget slice - Correct uptime value - Change network name with suffix to actual name - Refresh frame for each 1 second
requested changes have been resolved
* Refactor Statistics Page - Show network name, bestblock, data directory, wallet data size, number of txs and wallet * Use theme Separator widget to layout page list - Correct uptime value - Change network name with suffix to actual name - Refresh frame after 1 second to update the uptime value
* Refactor Statistics Page - Show network name, bestblock, data directory, wallet data size, number of txs and wallet * Use theme Separator widget to layout page list - Correct uptime value - Change network name with suffix to actual name - Refresh frame after 1 second to update the uptime value
This PR continue process #423