Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
fix: redirect input menu to collections
Browse files Browse the repository at this point in the history
  • Loading branch information
PThorpe92 committed Apr 17, 2024
1 parent 467530b commit 6768b8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,8 @@ impl<'a> App<'a> {
}
#[cfg(test)]
pub mod tests {


use super::App;
use crate::request::curl::{AuthKind};
use crate::request::curl::AuthKind;

#[test]
fn test_basic_get_method() {
Expand Down
4 changes: 2 additions & 2 deletions src/screens/collections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ pub fn handle_collection_alert_menu(app: &mut App, frame: &mut Frame<'_>, cmd: i
app.goto_screen(&Screen::SavedCommands(Some(selected.get_id())));
}
// Rename Collection
Some(1) => app.goto_screen(&Screen::InputMenu(InputOpt::RenameCollection(
Some(1) => app.goto_screen(&Screen::SavedCollections(Some(InputOpt::RenameCollection(
selected.get_id(),
))),
)))),
// delete collection
Some(2) => {
if let Err(e) = app.db.as_ref().delete_collection(selected.get_id()) {
Expand Down
2 changes: 2 additions & 0 deletions src/screens/screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ use std::fmt::{Display, Formatter};
use tui::style::{Color, Modifier, Style};
use tui::widgets::{Block, Borders, List, ListItem};

// TODO: Impl a trait for the screen to load the correct options,
// render the correct menu + styles and handle input
#[derive(Debug, PartialEq, Clone)]
pub enum ScreenLayout {
BasicMenu, // cursor + items. Input on top, options below
Expand Down

0 comments on commit 6768b8f

Please sign in to comment.