Merge #721: gui: show more info on synchronisation screen
2a9274adba60b9d4f2895f5547aa88c432ac9349 gui: show more info on synchronisation screen (jp1ac4) Pull request description: This is to resolve #646. I've added the specified text to the synchronisation screen and also display the progress as a percentage above the progress bar. This is how it looks (on signet with Liana-managed bitcoind):    Also, for external bitcoind:  ACKs for top commit: edouardparis: ACK 2a9274adba60b9d4f2895f5547aa88c432ac9349 Tree-SHA512: d12ab5c4dc4951c2393f2a9f26f3d01bcee82592b7dfc33c2fbf522e29745b1d894e1023daeb6ad1ae8082f1a9715c6487e1fd8e84db61574d96919f040c9323
This commit is contained in:
commit
b38d63d665
@ -31,6 +31,10 @@ use crate::{
|
||||
daemon::{client, embedded::EmbeddedDaemon, model::*, Daemon, DaemonError},
|
||||
};
|
||||
|
||||
const SYNCING_PROGRESS_1: &str = "Bitcoin Core is synchronising the blockchain. A full synchronisation typically take a few days, and is resource intensive. Once the initial synchronisation is done, the next ones will be much faster.";
|
||||
const SYNCING_PROGRESS_2: &str = "Bitcoin Core is synchronising the blockchain. This will take a while, depending on the last time it was done, your internet connection, and your computer performance.";
|
||||
const SYNCING_PROGRESS_3: &str = "Bitcoin Core is synchronising the blockchain. This may take a few minutes, depending on the last time it was done, your internet connection, and your computer performance.";
|
||||
|
||||
type Lianad = client::Lianad<client::jsonrpc::JsonRPCClient>;
|
||||
|
||||
pub struct Loader {
|
||||
@ -358,8 +362,16 @@ pub fn view(step: &Step) -> Element<ViewMessage> {
|
||||
None,
|
||||
Column::new()
|
||||
.width(Length::Fill)
|
||||
.spacing(5)
|
||||
.push(text(format!("Progress {:.2}%", 100.0 * *progress)))
|
||||
.push(ProgressBar::new(0.0..=1.0, *progress as f32).width(Length::Fill))
|
||||
.push(text("Syncing the wallet with the blockchain..."))
|
||||
.push(text(if *progress > 0.98 {
|
||||
SYNCING_PROGRESS_3
|
||||
} else if *progress > 0.9 {
|
||||
SYNCING_PROGRESS_2
|
||||
} else {
|
||||
SYNCING_PROGRESS_1
|
||||
}))
|
||||
.push(p2_regular(bitcoind_logs).style(color::GREY_3)),
|
||||
),
|
||||
Step::Error(error) => cover(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user