Merge #23: gui: fix clippy errors and wrong title
baa87375d046046478bc9195ff4802518a3247d3 fix windows title and doc (edouard)
b77d331792923eb0dc1bad7dd67e565698ef93c1 fix clippy errors (edouard)
Pull request description:
ACKs for top commit:
edouardparis:
ACK baa87375d046046478bc9195ff4802518a3247d3
Tree-SHA512: c9cefb39664512c0618422710e5d9d0e6a980f5a724d1e0f62cc2269f7520db8fc5529102e236c3ac3624a742da74864986e6766b19e015b7f058cde2b6956f5
This commit is contained in:
commit
4a80289063
@ -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
|
||||
|
||||
@ -42,7 +42,6 @@ pub enum Message {
|
||||
Synced(GetInfoResult, Arc<dyn Daemon + Sync + Send>),
|
||||
Started(Result<Arc<dyn Daemon + Sync + Send>, Error>),
|
||||
Loaded(Result<Arc<dyn Daemon + Sync + Send>, Error>),
|
||||
DaemonStarted(EmbeddedDaemon),
|
||||
Failure(DaemonError),
|
||||
}
|
||||
|
||||
@ -249,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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,8 +69,8 @@ pub struct GUI {
|
||||
}
|
||||
|
||||
enum State {
|
||||
Installer(Installer),
|
||||
Loader(Loader),
|
||||
Installer(Box<Installer>),
|
||||
Loader(Box<Loader>),
|
||||
App(App),
|
||||
}
|
||||
|
||||
@ -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"),
|
||||
}
|
||||
}
|
||||
|
||||
@ -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)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user