Add key bindings to dis-/connect from/to all rooms
This commit is contained in:
parent
ac13f4b490
commit
74561c791b
2 changed files with 19 additions and 3 deletions
|
|
@ -22,6 +22,10 @@ Procedure when bumping the version number:
|
|||
- `euph.rooms.<name>.force_username` config option
|
||||
- `euph.rooms.<name>.password` config option
|
||||
- Key binding to change rooms sort order
|
||||
- Key bindings to connect to/disconnect from all rooms
|
||||
|
||||
### Changed
|
||||
- Some key bindings in the rooms list
|
||||
|
||||
## v0.3.0 - 2022-08-22
|
||||
|
||||
|
|
|
|||
|
|
@ -282,9 +282,11 @@ impl Rooms {
|
|||
bindings.empty();
|
||||
bindings.binding("enter", "enter selected room");
|
||||
bindings.binding("c", "connect to selected room");
|
||||
bindings.binding("C", "connect to new room");
|
||||
bindings.binding("C", "connect to all rooms");
|
||||
bindings.binding("d", "disconnect from selected room");
|
||||
bindings.binding("D", "delete room");
|
||||
bindings.binding("D", "disconnect from all rooms");
|
||||
bindings.binding("n", "connect to new room");
|
||||
bindings.binding("X", "delete room");
|
||||
bindings.empty();
|
||||
bindings.binding("s", "change sort order");
|
||||
}
|
||||
|
|
@ -340,7 +342,11 @@ impl Rooms {
|
|||
}
|
||||
}
|
||||
}
|
||||
key!('C') => self.state = State::Connect(EditorState::new()),
|
||||
key!('C') => {
|
||||
for room in self.euph_rooms.values_mut() {
|
||||
room.connect();
|
||||
}
|
||||
}
|
||||
key!('d') => {
|
||||
if let Some(name) = self.list.cursor() {
|
||||
if let Some(room) = self.euph_rooms.get_mut(&name) {
|
||||
|
|
@ -349,6 +355,12 @@ impl Rooms {
|
|||
}
|
||||
}
|
||||
key!('D') => {
|
||||
for room in self.euph_rooms.values_mut() {
|
||||
room.disconnect();
|
||||
}
|
||||
}
|
||||
key!('n') => self.state = State::Connect(EditorState::new()),
|
||||
key!('X') => {
|
||||
// TODO Check whether user wanted this via popup
|
||||
if let Some(name) = self.list.cursor() {
|
||||
self.euph_rooms.remove(&name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue