-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Mode improvements for UI #3109
Mode improvements for UI #3109
Conversation
is active. | ||
off - Parity never syncs at all (default: {flag_mode}). | ||
dark - Parity syncs only when the RPC is active. | ||
offline - Parity doesn't sync. (default: {flag_mode}). |
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.
auto not mentioned here, but is set as the default
@@ -67,11 +85,28 @@ impl Visitor for UserDefaultsVisitor { | |||
let fat_db: Value = map.remove("fat_db".into()).unwrap_or_else(|| Value::Bool(false)); | |||
let fat_db = try!(fat_db.as_bool().ok_or_else(|| Error::custom("invalid fat_db value"))); | |||
|
|||
let mode: Value = map.remove("mode".into()).unwrap_or_else(|| Value::String("active".to_owned())); | |||
let mode = match try!(mode.as_str().ok_or_else(|| Error::custom("invalid mode value"))) { | |||
"off" => Mode::Off, |
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.
"offline" probably?
[ci:skip]
"off" => Ok(Mode::Off), | ||
_ => Err(format!("{}: Invalid address for --mode. Must be one of active, passive or dark.", s)), | ||
"offline" => Ok(Mode::Off), | ||
_ => Err(format!("{}: Invalid value for --mode. Must be one of active, passive or dark.", s)), |
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.
...or offline?
*mode = mode.clone().into(); | ||
match *self.on_mode_change.lock() { | ||
Some(ref mut f) => f(&*mode), | ||
_ => {} |
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.
if let Some
|
||
chown $USER $HOME/.parity $HOME/Library/LaunchAgents $HOME/Library/LaunchAgents/io.parity.ethereum.plist | ||
mkdir -p $HOME/.parity/906a34e69aec8c0d | ||
echo -n '{"fat_db":false,"mode":"passive","pruning":"archive","tracing":false}' > $HOME/.parity/906a34e69aec8c0d/user_defaults |
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.
"pruning":"archive"? That's harsh.
Changes Unknown when pulling 2024c05 on off-mode into * on master*. |
Changes Unknown when pulling 2024c05 on off-mode into * on master*. |
Changes Unknown when pulling 2024c05 on off-mode into * on master*. |
* `--mode=off` now works. * Add Mode::Off as a persistent CLI option. * "last" not "auto" as default. * Commit accidentally unsaved file. * Whitespace [ci:skip] * Mode CLI parse fix * or offline * Save mode when it gets changed. * Fix Offline mode * Fix up mode operations. * Make passive default, but not overriding. * Fix test * Maybe not everyone wants to run an archive node...
* Mode improvements for UI (#3109) * `--mode=off` now works. * Add Mode::Off as a persistent CLI option. * "last" not "auto" as default. * Commit accidentally unsaved file. * Whitespace [ci:skip] * Mode CLI parse fix * or offline * Save mode when it gets changed. * Fix Offline mode * Fix up mode operations. * Make passive default, but not overriding. * Fix test * Maybe not everyone wants to run an archive node... * Parity configuration settings, i.e. mode (#3212) * Add initial page * Add parity icon * opacity for parity icon * Mode selector * Actually set mode when value changes
Addressing #3049.