summaryrefslogtreecommitdiffhomepage
path: root/mullvad-cli/src/cmds
diff options
context:
space:
mode:
authorJoakim Hulthe <joakim@hulthe.net>2024-07-09 11:10:08 +0200
committerMarkus Pettersson <markus.pettersson@mullvad.net>2024-08-01 15:27:02 +0200
commit7992055557e32fdbed2f8267ae6fb1b57ed9c1d8 (patch)
tree7b5c505570d2f64221ddc5a89f53593f4569492f /mullvad-cli/src/cmds
parent2b59f823d60de3063fa6b1c3da206d198f6218d0 (diff)
downloadmullvadvpn-7992055557e32fdbed2f8267ae6fb1b57ed9c1d8.tar.xz
mullvadvpn-7992055557e32fdbed2f8267ae6fb1b57ed9c1d8.zip
Implement feature indicators in daemon
- Add a GetFeatureIndicators gRPC call that get's the current set of active "features" that should be shown in the UI. - Extend the TunnelState with a FeatureIndicators value. Clients who listens for TunnelState events will get updates automatically.
Diffstat (limited to 'mullvad-cli/src/cmds')
-rw-r--r--mullvad-cli/src/cmds/status.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/mullvad-cli/src/cmds/status.rs b/mullvad-cli/src/cmds/status.rs
index 939beeca4a..96631d02d0 100644
--- a/mullvad-cli/src/cmds/status.rs
+++ b/mullvad-cli/src/cmds/status.rs
@@ -54,9 +54,15 @@ impl Status {
// Do print an updated state if the lockdown setting was changed
) if was_locked_down == locked_down => continue,
(
- Some(TunnelState::Connected { .. }),
- TunnelState::Connected { .. },
- ) => continue,
+ Some(TunnelState::Connected {
+ feature_indicators: old_feature_indicators,
+ ..
+ }),
+ TunnelState::Connected {
+ feature_indicators, ..
+ },
+ // Do print an updated state if the feature indicators changed
+ ) if old_feature_indicators == feature_indicators => continue,
_ => {}
}
format::print_state(&new_state, args.verbose);