Mask password input with asterisk
This commit is contained in:
parent
fdcec0f302
commit
a3569628e0
@ -41,7 +41,9 @@ pub fn run() -> io::Result<(String, String)> {
|
||||
Style::default()
|
||||
});
|
||||
|
||||
let pass = Paragraph::new(password.as_str())
|
||||
let masked_password = "*".repeat(password.len());
|
||||
|
||||
let pass = Paragraph::new(masked_password)
|
||||
.block(Block::default().borders(Borders::ALL).title("Password"))
|
||||
.style(if focus == 1 {
|
||||
Style::new().fg(Color::from_u32(0x00_235759))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user