mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-23 15:51:03 +00:00
14 lines
382 B
Rust
14 lines
382 B
Rust
use tokio::sync::mpsc;
|
|
use yazi_config::popup::InputCfg;
|
|
use yazi_macro::{emit, relay};
|
|
use yazi_widgets::input::InputError;
|
|
|
|
pub struct InputProxy;
|
|
|
|
impl InputProxy {
|
|
pub fn show(cfg: InputCfg) -> mpsc::UnboundedReceiver<Result<String, InputError>> {
|
|
let (tx, rx) = mpsc::unbounded_channel();
|
|
emit!(Call(relay!(input:show).with_any("tx", tx).with_any("cfg", cfg)));
|
|
rx
|
|
}
|
|
}
|