diff options
author | Aram Drevekenin <aram@poor.dev> | 2023-08-24 18:11:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-24 18:11:53 +0200 |
commit | 09d09759b594dc538a0e629d1778fe5107f344ac (patch) | |
tree | d185ecfa16eafdcdf42b187d1c85cee26cb71328 /zellij-server | |
parent | 4a1d11475388e6d4f19de0fa6c2d717d342b1877 (diff) |
fix(ux): various ui/ux fixes (#2722)
* force plugin render on permission request response
* clear warnings
* Revert "feat(ui): new status bar mode (#2619)"
This reverts commit 27763d26ab83dd9f81c69c75601cbf6075f13790.
* adjust status bar help
* fix colors in session manager and shortcut in status-bar
* adjust keybindings
Diffstat (limited to 'zellij-server')
-rw-r--r-- | zellij-server/src/plugins/wasm_bridge.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/zellij-server/src/plugins/wasm_bridge.rs b/zellij-server/src/plugins/wasm_bridge.rs index fdc8f3890..880392276 100644 --- a/zellij-server/src/plugins/wasm_bridge.rs +++ b/zellij-server/src/plugins/wasm_bridge.rs @@ -447,7 +447,7 @@ impl WasmBridge { // FIXME: This is very janky... Maybe I should write my own macro for Event -> EventType? let event_type = EventType::from_str(&event.to_string()).with_context(err_context)?; - if subs.contains(&event_type) + if (subs.contains(&event_type) || event_type == EventType::PermissionRequestResult) && ((pid.is_none() && cid.is_none()) || (pid.is_none() && cid == Some(*client_id)) || (cid.is_none() && pid == Some(*plugin_id)) @@ -822,10 +822,15 @@ pub fn apply_event_to_plugin( wasi_write_object(&plugin_env.wasi_env, &protobuf_event.encode_to_vec()) .with_context(err_context)?; let update_return = update.call(&[]).with_context(err_context)?; - let should_render = match update_return.get(0) { + let mut should_render = match update_return.get(0) { Some(Value::I32(n)) => *n == 1, _ => false, }; + if let Event::PermissionRequestResult(..) = event { + // we always render in this case, otherwise the request permission screen stays on + // screen + should_render = true; + } if rows > 0 && columns > 0 && should_render { let rendered_bytes = instance .exports |