Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-Busch committed Nov 11, 2023
1 parent a873ebc commit 9df183d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
16 changes: 10 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,26 @@ And run it with


## Commands
**A** : show assignment
**CTRL + a** : show assignment

**C**: show closed
**CTRL + c**: show closed

**Q**: close app
**CTRL + h**: home

**q**: close app

**CTRL + r**: reload content

**ENTER**: open the issue in the browser

**p**: show actions
**CTRL + p**: show actions

**1**: close issue

## Contributing
We welcome contributions to the project. Please feel free to open a pull request or an issue on the GitHub repository.
Contributions are more than welcome. Please feel free to open a pull request or an issue on the GitHub repository.

## Disclaimer
This application is not affiliated with, maintained, authorized, endorsed, or sponsored by GitHub Inc. or any of its subsidiaries or affiliates.

🚧 This is an alpha version, it's possible that you experience some bugs, still actively working on it. If you do, don't hesitate to open an issue
🚧 This is an alpha version, it's possible that you experience some bugs, still actively working on it. If you do, don't hesitate to open an issue.
30 changes: 15 additions & 15 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use tui::{
Terminal,
};
use crossterm::{
event::{self, Event as CEvent, KeyCode},
event::{self, Event as CEvent, KeyCode, KeyEvent, KeyModifiers},
terminal::{disable_raw_mode, enable_raw_mode},
};
use std::time::{Duration, Instant};
Expand Down Expand Up @@ -251,24 +251,24 @@ async fn main() -> Result<(), Box<dyn Error>> {
})?;

match rx.recv()? {
Event::Input(event) => match event.code {
KeyCode::Char('q') => {
Event::Input(event) => match (event.code, event.modifiers) {
(KeyCode::Char('q'), _) => {
disable_raw_mode()?;
terminal.show_cursor()?;
break;
},
KeyCode::Char('h') => active_menu_item = MenuItem::Home,
KeyCode::Char('a') => {
(KeyCode::Char('h'), KeyModifiers::CONTROL) => active_menu_item = MenuItem::Home,
(KeyCode::Char('a'), KeyModifiers::CONTROL) => {
active_open = true;
to_review_open = false;
active_menu_item = MenuItem::Assignments;
},
KeyCode::Char('c') => {
(KeyCode::Char('c'), KeyModifiers::CONTROL) => {
active_open = false;
to_review_open = false;
active_menu_item = MenuItem::Closed
},
KeyCode::Down => {
(KeyCode::Down, _) => {
let (state, items) = get_current_state_and_list(
active_open,
to_review_open,
Expand All @@ -281,7 +281,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
);
move_selection(state, items, 1);
}
KeyCode::Up => {
(KeyCode::Up, _) => {
let (state, _) = get_current_state_and_list(
active_open,
to_review_open,
Expand All @@ -294,7 +294,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
);
move_selection(state, &issues_list_open, -1);
}
KeyCode::Enter => {
(KeyCode::Enter, _) => {
let (state, list) = get_current_state_and_list(
active_open,
to_review_open,
Expand All @@ -312,17 +312,17 @@ async fn main() -> Result<(), Box<dyn Error>> {
}
}
}
KeyCode::Right => {
(KeyCode::Right, _) => {
if active_open == true {
show_comment = true;
}
},
KeyCode::Left => {
(KeyCode::Left, _) => {
if active_open == true {
show_comment = false;
}
},
KeyCode::Char('1')=> {
(KeyCode::Char('1'), _)=> {
// close issue
let state;
let list: &Vec<ApiResponseItem>;
Expand All @@ -349,15 +349,15 @@ async fn main() -> Result<(), Box<dyn Error>> {
}
}
},
KeyCode::Char('p') => {
(KeyCode::Char('p'), _) => {
if active_open == true {
prompt_open = !prompt_open;
}
},
KeyCode::Char('r') => {
(KeyCode::Char('r'), KeyModifiers::CONTROL) => {
(issues_list_open, issues_list_closed, assigned_pr_list, issues_list_open_len, issues_list_closed_len, assigned_pr_list_len) = init_gh_data(&username, &access_token).await.unwrap();
},
KeyCode::Char('t') => {
(KeyCode::Char('t'), KeyModifiers::CONTROL) => {
if to_review_open == false {
to_review_open = true;
active_menu_item = MenuItem::ToReview;
Expand Down

0 comments on commit 9df183d

Please sign in to comment.