renamed sync feature to account-sync, put wizard stuff under feature

This commit is contained in:
Clément DOUIN
2024-01-09 09:28:45 +01:00
parent 921194da5c
commit b0d7e773dc
52 changed files with 1160 additions and 358 deletions
+6
View File
@@ -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);
+23
View File
@@ -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()
}