WIP: Add UI to application #1
30
src/main.rs
30
src/main.rs
@ -23,7 +23,6 @@ use crossterm::terminal::{
|
||||
use ratatui::backend::{Backend, CrosstermBackend};
|
||||
use ratatui::Terminal;
|
||||
use std::error::Error;
|
||||
use std::io::Write;
|
||||
use std::io::{self, stderr};
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
@ -39,7 +38,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
let config = Config::from_file("test.ini".to_string());
|
||||
|
||||
// Run the app
|
||||
let res = run_app(&mut terminal, &mut app, &config);
|
||||
let _res = run_app(&mut terminal, &mut app, &config);
|
||||
|
||||
disable_raw_mode()?;
|
||||
execute!(
|
||||
@ -48,33 +47,6 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
DisableMouseCapture
|
||||
)?;
|
||||
terminal.show_cursor()?;
|
||||
// Clear screen
|
||||
// print!("{}[2J", 27 as char);
|
||||
//
|
||||
// loop {
|
||||
// let mut domain = String::new();
|
||||
// print!("Enter domain name: ");
|
||||
// io::stdout().flush().expect("Failed to flush buffer");
|
||||
// match io::stdin().read_line(&mut domain) {
|
||||
// Ok(_n) => {
|
||||
// domain = String::from(domain.trim());
|
||||
// match domain.as_ref() {
|
||||
// "q" => break,
|
||||
// "" => continue,
|
||||
// _ => {
|
||||
// let mut dns = Domain::new(domain.clone());
|
||||
// dns.apply_config(&config);
|
||||
// dns.lookup_all_records();
|
||||
// let whois = WhoisData::new(domain);
|
||||
// println!("DNS: {}\n\n\nWhois: {}", dns, whois); // Replace this with fancy UI render update command
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// Err(err) => {
|
||||
// println!("{}", err);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user