This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Build Issues On Windows, Among Several Other Changes (#29)
* docs: fix readme * feat: clean up wget functionality, add tests * deps: remove unnecessary dependencies * fix: get rid of snake case warning * feat: Added Windows Recursive File Downloading Powered By Powershell. [I TESTED THE SCRIPT, BUT NOT THE APP SIDE OF IT] * feat: Added Windows Recursive File Downloading & Windows Specific Code. * fix: Got test_execute() working for the windows version. * fix: Converted WGET Tests To Windows Specific. All Pass. * organized things in to screens and widgets. I think that most of this makes sense. I felt like I needed to further break this part of the code down. * organized things in to screens and widgets. I think that most of this makes sense. I felt like I needed to further break this part of the code down. #2 * feat: Added Debug Menu To Home Menu. * fix: Fixed A Bug Where The Cursor Would Roll Off The Screen. And I Fixed Another Bug, Where the the app.input.value() would persist if you entered something in and then you left the screen. So now , input.value() gets clearwed upon backing out to the previous screen. That unfortunatly led me to another bug where after backing out of a screen the cursor doesnt move again until you go into whatever menu option youre stuck on and then back out again? * fix: Removed Useless Imports. * feat: Okay, i fixed an issue where the cursor would roll off the screen. I put all the individual screens in thier own files. I fixed the build issues @PThorpe92 was having. We should be good. * fix: Fixed Test Build Issues With Windows. * fix: Fixed Test Build Issues With Windows. Fixed A Fuck Ton Of Glaring Issues. Im Still Not Convinced It All Works, But It Passes The Tests As They Were Intended To Be Written So. * Update render.rs * Update wget.rs * Update wget.rs * Update render.rs * Update wget.rs --------- Co-authored-by: PThorpe92 <[email protected]>
- Loading branch information
1 parent
73e76d6
commit 73bf9fa
Showing
33 changed files
with
1,328 additions
and
530 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
use tui::backend::Backend; | ||
use tui::widgets::ListState; | ||
use tui::Frame; | ||
|
||
use crate::app::App; | ||
use crate::display::inputopt::InputOpt; | ||
use crate::request::curl::AuthKind; | ||
use crate::screens::screen::Screen; | ||
use crate::ui::widgets::boxes::default_rect; | ||
use crate::ui::widgets::menu::menu_widget; | ||
|
||
pub fn handle_authentication_screen<B: Backend>(app: &mut App, frame: &mut Frame<'_, B>) { | ||
let area = default_rect(frame.size()); | ||
let new_list = app.current_screen.get_list(); | ||
let mut state = ListState::with_selected(ListState::default(), Some(app.cursor)); | ||
app.items = app.current_screen.get_opts(); | ||
app.state = Some(state.clone()); | ||
app.state.as_mut().unwrap().select(Some(app.cursor)); | ||
frame.set_cursor(0, app.cursor as u16); | ||
frame.render_stateful_widget(new_list, area, &mut state); | ||
frame.render_widget(menu_widget(), frame.size()); | ||
if let Some(num) = app.selected { | ||
match num { | ||
0 => app.goto_screen(Screen::InputMenu(InputOpt::Auth(AuthKind::Basic( | ||
String::new(), | ||
)))), | ||
1 => app.goto_screen(Screen::InputMenu(InputOpt::Auth(AuthKind::Bearer( | ||
String::new(), | ||
)))), | ||
2 => app.goto_screen(Screen::InputMenu(InputOpt::Auth(AuthKind::Digest( | ||
String::new(), | ||
)))), | ||
3 => app.goto_screen(Screen::InputMenu(InputOpt::Auth(AuthKind::AwsSigv4( | ||
String::new(), | ||
)))), | ||
4 => app.goto_screen(Screen::InputMenu(InputOpt::Auth(AuthKind::Spnego( | ||
String::new(), | ||
)))), | ||
5 => app.goto_screen(Screen::InputMenu(InputOpt::Auth(AuthKind::Kerberos( | ||
String::new(), | ||
)))), | ||
6 => app.goto_screen(Screen::InputMenu(InputOpt::Auth(AuthKind::Ntlm( | ||
String::new(), | ||
)))), | ||
_ => {} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
use tui::backend::Backend; | ||
use tui::widgets::ListState; | ||
use tui::Frame; | ||
|
||
use crate::app::App; | ||
use crate::screens::screen::Screen; | ||
use crate::ui::widgets::boxes::centered_rect; | ||
use crate::ui::widgets::menu::menu_widget; | ||
|
||
pub fn handle_debug_screen<B: Backend>(app: &mut App, frame: &mut Frame<'_, B>) { | ||
let menu_options = app.current_screen.get_list(); | ||
let area = centered_rect(70, 60, frame.size()); | ||
|
||
let mut state = ListState::with_selected(ListState::default(), Some(app.cursor)); | ||
|
||
app.state = Some(state.clone()); | ||
app.state.as_mut().unwrap().select(Some(app.cursor)); | ||
|
||
frame.set_cursor(0, app.cursor as u16); | ||
frame.render_stateful_widget(menu_options, area, &mut state); | ||
frame.render_widget(menu_widget(), frame.size()); | ||
|
||
match app.selected { | ||
Some(0) => { | ||
// Back To Home | ||
app.goto_screen(Screen::Home); // Back | ||
} | ||
Some(1) => { | ||
// Test Single Line Input Screen | ||
app.goto_screen(Screen::URLInput); | ||
} | ||
_ => {} | ||
} | ||
} |
Oops, something went wrong.