Reworked statistics
This commit is contained in:
@@ -192,6 +192,7 @@ pub fn handle_key(state: &mut AppState, runtime: &mut Runtime, key: KeyEvent) {
|
||||
Popup::ConfirmDeviceRevoke { device_id, name } => {
|
||||
handle_device_revoke(state, runtime, device_id, name, key);
|
||||
}
|
||||
Popup::ConfirmDeviceLeave => handle_device_leave(state, runtime, key),
|
||||
Popup::ConnectedDevices { cursor } => {
|
||||
handle_connected_devices(state, runtime, cursor, key);
|
||||
}
|
||||
@@ -585,6 +586,16 @@ fn handle_device_revoke(
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_device_leave(state: &mut AppState, runtime: &mut Runtime, key: KeyEvent) {
|
||||
match key.code {
|
||||
KeyCode::Esc | KeyCode::Enter | KeyCode::Char('n') | KeyCode::Char('q') => {}
|
||||
KeyCode::Char('y') => {
|
||||
super::perform_effect(state, runtime, crate::app::update::Effect::DeviceLeaveGroup);
|
||||
}
|
||||
_ => state.popup = Some(Popup::ConfirmDeviceLeave),
|
||||
}
|
||||
}
|
||||
|
||||
/// Pasted text goes into the focused text field when one is open.
|
||||
pub fn handle_paste(state: &mut AppState, pasted: &str) {
|
||||
let cleaned: String = pasted.chars().filter(|c| !c.is_control()).collect();
|
||||
|
||||
Reference in New Issue
Block a user