mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
renamed sync feature to account-sync, put wizard stuff under feature
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
pub mod choice;
|
||||
pub mod editor;
|
||||
pub(crate) mod prompt;
|
||||
pub mod table;
|
||||
|
||||
use dialoguer::theme::ColorfulTheme;
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
pub use self::table::*;
|
||||
|
||||
pub(crate) static THEME: Lazy<ColorfulTheme> = Lazy::new(ColorfulTheme::default);
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
use dialoguer::Password;
|
||||
use std::io;
|
||||
|
||||
use super::THEME;
|
||||
|
||||
#[allow(unused)]
|
||||
pub(crate) fn passwd(prompt: &str) -> io::Result<String> {
|
||||
Password::with_theme(&*THEME)
|
||||
.with_prompt(prompt)
|
||||
.with_confirmation(
|
||||
"Confirm password",
|
||||
"Passwords do not match, please try again.",
|
||||
)
|
||||
.interact()
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
pub(crate) fn secret(prompt: &str) -> io::Result<String> {
|
||||
Password::with_theme(&*THEME)
|
||||
.with_prompt(prompt)
|
||||
.report(false)
|
||||
.interact()
|
||||
}
|
||||
Reference in New Issue
Block a user