From b77d331792923eb0dc1bad7dd67e565698ef93c1 Mon Sep 17 00:00:00 2001 From: edouard Date: Mon, 5 Sep 2022 18:34:45 +0200 Subject: [PATCH 1/2] fix clippy errors --- gui/src/loader.rs | 1 - gui/src/main.rs | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gui/src/loader.rs b/gui/src/loader.rs index f4fc6f2a..f058de68 100644 --- a/gui/src/loader.rs +++ b/gui/src/loader.rs @@ -42,7 +42,6 @@ pub enum Message { Synced(GetInfoResult, Arc), Started(Result, Error>), Loaded(Result, Error>), - DaemonStarted(EmbeddedDaemon), Failure(DaemonError), } diff --git a/gui/src/main.rs b/gui/src/main.rs index 941ae252..5f6e1f37 100644 --- a/gui/src/main.rs +++ b/gui/src/main.rs @@ -69,8 +69,8 @@ pub struct GUI { } enum State { - Installer(Installer), - Loader(Loader), + Installer(Box), + Loader(Box), App(App), } @@ -109,7 +109,7 @@ impl Application for GUI { let (install, command) = Installer::new(config_path, network); ( Self { - state: State::Installer(install), + state: State::Installer(Box::new(install)), }, Command::batch(vec![ command.map(|msg| Message::Install(Box::new(msg))), @@ -123,7 +123,7 @@ impl Application for GUI { let (loader, command) = Loader::new(cfg, daemon_cfg); ( Self { - state: State::Loader(loader), + state: State::Loader(Box::new(loader)), }, Command::batch(vec![ command.map(|msg| Message::Load(Box::new(msg))), @@ -154,7 +154,7 @@ impl Application for GUI { let daemon_cfg = DaemonConfig::from_file(Some(cfg.minisafed_config_path.clone())).unwrap(); let (loader, command) = Loader::new(cfg, daemon_cfg); - self.state = State::Loader(loader); + self.state = State::Loader(Box::new(loader)); command.map(|msg| Message::Load(Box::new(msg))) } else { i.update(*msg).map(|msg| Message::Install(Box::new(msg))) From baa87375d046046478bc9195ff4802518a3247d3 Mon Sep 17 00:00:00 2001 From: edouard Date: Mon, 5 Sep 2022 18:36:33 +0200 Subject: [PATCH 2/2] fix windows title and doc --- gui/README.md | 2 +- gui/src/loader.rs | 2 +- gui/src/main.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gui/README.md b/gui/README.md index de0cb3df..820c6e96 100644 --- a/gui/README.md +++ b/gui/README.md @@ -1,6 +1,6 @@ # minisafe-gui -Revault GUI is an user graphical interface written in rust for the +Minisafe GUI is an user graphical interface written in rust for the [Minisafe daemon](https://github.com/revault/minisafe). ## Dependencies diff --git a/gui/src/loader.rs b/gui/src/loader.rs index f058de68..5cf275dc 100644 --- a/gui/src/loader.rs +++ b/gui/src/loader.rs @@ -248,7 +248,7 @@ impl std::fmt::Display for Error { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::Config(e) => write!(f, "Config error: {}", e), - Self::Daemon(e) => write!(f, "RevaultD error: {}", e), + Self::Daemon(e) => write!(f, "Minisafed error: {}", e), } } } diff --git a/gui/src/main.rs b/gui/src/main.rs index 5f6e1f37..e6a7b1ef 100644 --- a/gui/src/main.rs +++ b/gui/src/main.rs @@ -97,9 +97,9 @@ impl Application for GUI { fn title(&self) -> String { match self.state { - State::Installer(_) => String::from("Revault Installer"), - State::App(_) => String::from("Revault GUI"), - State::Loader(..) => String::from("Revault"), + State::Installer(_) => String::from("Minisafe Installer"), + State::App(_) => String::from("Minisafe"), + State::Loader(..) => String::from("Minisafe"), } }