mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Exec command
This commit is contained in:
@@ -186,6 +186,14 @@ impl FileTransferActivity {
|
||||
self.view.render(super::COMPONENT_INPUT_SAVEAS, f, popup);
|
||||
}
|
||||
}
|
||||
if let Some(mut props) = self.view.get_props(super::COMPONENT_INPUT_EXEC) {
|
||||
if props.build().visible {
|
||||
let popup = draw_area_in(f.size(), 40, 10);
|
||||
f.render_widget(Clear, popup);
|
||||
// make popup
|
||||
self.view.render(super::COMPONENT_INPUT_EXEC, f, popup);
|
||||
}
|
||||
}
|
||||
if let Some(mut props) = self.view.get_props(super::COMPONENT_LIST_FILEINFO) {
|
||||
if props.build().visible {
|
||||
let popup = draw_area_in(f.size(), 50, 50);
|
||||
@@ -411,6 +419,22 @@ impl FileTransferActivity {
|
||||
self.view.umount(super::COMPONENT_INPUT_COPY);
|
||||
}
|
||||
|
||||
pub(super) fn mount_exec(&mut self) {
|
||||
self.view.mount(
|
||||
super::COMPONENT_INPUT_EXEC,
|
||||
Box::new(Input::new(
|
||||
PropsBuilder::default()
|
||||
.with_texts(TextParts::new(Some(String::from("Execute command")), None))
|
||||
.build(),
|
||||
)),
|
||||
);
|
||||
self.view.active(super::COMPONENT_INPUT_EXEC);
|
||||
}
|
||||
|
||||
pub(super) fn umount_exec(&mut self) {
|
||||
self.view.umount(super::COMPONENT_INPUT_EXEC);
|
||||
}
|
||||
|
||||
pub(super) fn mount_goto(&mut self) {
|
||||
self.view.mount(
|
||||
super::COMPONENT_INPUT_GOTO,
|
||||
|
||||
Reference in New Issue
Block a user