summaryrefslogtreecommitdiffhomepage
path: root/mullvad-cli/src
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2023-12-29 17:56:06 +0100
committerDavid Lönnhager <david.l@mullvad.net>2023-12-29 17:56:06 +0100
commit710a6fe96733236bfd9189b69b387f1fa75cd7a6 (patch)
tree5904272e3efd08d1a8090be38ab5a819abfa41b4 /mullvad-cli/src
parent2d1e643e235db3882ac47f439bf844b45e6ed5d4 (diff)
parentabb1f6521d91beb6a57f87877359ea90211c8484 (diff)
downloadmullvadvpn-710a6fe96733236bfd9189b69b387f1fa75cd7a6.tar.xz
mullvadvpn-710a6fe96733236bfd9189b69b387f1fa75cd7a6.zip
Merge branch 'cli-add-account-id'
Diffstat (limited to 'mullvad-cli/src')
-rw-r--r--mullvad-cli/src/cmds/account.rs26
1 files changed, 16 insertions, 10 deletions
diff --git a/mullvad-cli/src/cmds/account.rs b/mullvad-cli/src/cmds/account.rs
index 3b3d12b153..229c2a9aa0 100644
--- a/mullvad-cli/src/cmds/account.rs
+++ b/mullvad-cli/src/cmds/account.rs
@@ -106,18 +106,24 @@ impl Account {
match state {
DeviceState::LoggedIn(device) => {
- println!("Mullvad account: {}", device.account_token);
- println!("Device name : {}", device.device.pretty_name());
- if verbose {
- println!("Device id : {}", device.device.id);
- println!("Device pubkey : {}", device.device.pubkey);
- println!("Device created : {}", device.device.created,);
- }
- let expiry = rpc.get_account_data(device.account_token).await?;
+ println!("{:<20}{}", "Mullvad account:", device.account_token);
+
+ let data = rpc.get_account_data(device.account_token).await?;
println!(
- "Expires at : {}",
- expiry.expiry.with_timezone(&chrono::Local),
+ "{:<20}{}",
+ "Expires at:",
+ data.expiry.with_timezone(&chrono::Local)
);
+ if verbose {
+ println!("{:<20}{}", "Account id:", data.id);
+ }
+
+ println!("{:<20}{}", "Device name:", device.device.pretty_name());
+ if verbose {
+ println!("{:<20}{}", "Device id:", device.device.id);
+ println!("{:<20}{}", "Device pubkey:", device.device.pubkey);
+ println!("{:<20}{}", "Device created:", device.device.created,);
+ }
}
DeviceState::LoggedOut => {
println!("{NOT_LOGGED_IN_MESSAGE}");