Compare commits
2 Commits
067112ae2d
...
7c6a4bf70e
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c6a4bf70e | |||
| b7aa022bfd |
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(())
|
||||
}
|
||||
|
||||
|
||||
13
src/ui.rs
13
src/ui.rs
@ -51,19 +51,6 @@ pub fn ui(f: &mut Frame, app: &App) {
|
||||
.constraints([Constraint::Percentage(50), Constraint::Percentage(50)])
|
||||
.split(chunks[1]);
|
||||
|
||||
// let whois_block = Block::default()
|
||||
// .borders(Borders::RIGHT)
|
||||
// .style(Style::default());
|
||||
|
||||
// let whois_text = Paragraph::new(Text::styled(
|
||||
// "Whois data in
|
||||
// style
|
||||
// with
|
||||
// multiline support",
|
||||
// Style::default().fg(Color::Green),
|
||||
// ))
|
||||
// .block(whois_block);
|
||||
|
||||
// Whois list
|
||||
let mut whois_list_items = Vec::<ListItem>::new();
|
||||
for record in &app.whois_info {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user