3 files changed
+10
-6
smbcloud-cli/src/account/login/process.rs
+3
-3
@@ -3,7 +3,7 @@ use crate::{
3
lib::{authorize_github, save_token},
4
signup::{do_signup, SignupMethod},
5
},
6
- cli::CommandResult, ui::{fail_symbol, succeed_message, succeed_symbol},
6
+ cli::CommandResult, ui::{fail_message, fail_symbol, succeed_message, succeed_symbol},
7
};
8
use anyhow::{anyhow, Result};
9
use console::{style, Term};
@@ -36,8 +36,8 @@ pub async fn process_login(env: Environment) -> Result<CommandResult> {
36
spinners::Spinners::SimpleDotsScrolling,
37
style("Loading...").green().bold().to_string(),
38
),
39
- symbol: succeed_symbol(),
40
- msg: "You are already logged in. Please logout first.".to_owned(),
39
+ symbol: fail_symbol(),
40
+ msg: fail_message("You are already logged in. Please logout first."),
41
});
42
}
43
smbcloud-cli/src/account/signup/process.rs
+2
-2
@@ -1,5 +1,5 @@
1
use super::SignupMethod;
2
-use crate::{account::lib::authorize_github, cli::CommandResult};
2
+use crate::{account::lib::authorize_github, cli::CommandResult, ui::fail_symbol};
3
use anyhow::{anyhow, Result};
4
use console::{style, Term};
5
use dialoguer::{theme::ColorfulTheme, Input, Password, Select};
@@ -21,7 +21,7 @@ pub async fn process_signup(env: Environment) -> Result<CommandResult> {
21
spinners::Spinners::SimpleDotsScrolling,
22
style("Loading...").green().bold().to_string(),
23
),
24
- symbol: "✅".to_owned(),
24
+ symbol: fail_symbol(),
25
msg: "You are already logged in. Please logout first.".to_owned(),
26
});
27
}
smbcloud-cli/src/ui/mod.rs
+5
-1
@@ -10,4 +10,8 @@ pub fn fail_symbol() -> String {
10
11
pub fn succeed_message(message: &str) -> String {
12
style(message).bold().white().to_string()
13
-}
\ No newline at end of file
13
+}
14
+
15
+pub fn fail_message(message: &str) -> String {
16
+ style(message).italic().red().to_string()
17
+}