mirror of
https://github.com/veeso/termscp.git
synced 2026-07-27 18:11:06 +02:00
Open file with
This commit is contained in:
@@ -215,6 +215,14 @@ impl FileTransferActivity {
|
||||
self.view.render(super::COMPONENT_INPUT_NEWFILE, f, popup);
|
||||
}
|
||||
}
|
||||
if let Some(props) = self.view.get_props(super::COMPONENT_INPUT_OPEN_WITH) {
|
||||
if props.visible {
|
||||
let popup = draw_area_in(f.size(), 40, 10);
|
||||
f.render_widget(Clear, popup);
|
||||
// make popup
|
||||
self.view.render(super::COMPONENT_INPUT_OPEN_WITH, f, popup);
|
||||
}
|
||||
}
|
||||
if let Some(props) = self.view.get_props(super::COMPONENT_INPUT_RENAME) {
|
||||
if props.visible {
|
||||
let popup = draw_area_in(f.size(), 40, 10);
|
||||
@@ -593,6 +601,23 @@ impl FileTransferActivity {
|
||||
self.view.umount(super::COMPONENT_INPUT_NEWFILE);
|
||||
}
|
||||
|
||||
pub(super) fn mount_openwith(&mut self) {
|
||||
self.view.mount(
|
||||
super::COMPONENT_INPUT_OPEN_WITH,
|
||||
Box::new(Input::new(
|
||||
InputPropsBuilder::default()
|
||||
.with_borders(Borders::ALL, BorderType::Rounded, Color::White)
|
||||
.with_label(String::from("Open file with..."))
|
||||
.build(),
|
||||
)),
|
||||
);
|
||||
self.view.active(super::COMPONENT_INPUT_OPEN_WITH);
|
||||
}
|
||||
|
||||
pub(super) fn umount_openwith(&mut self) {
|
||||
self.view.umount(super::COMPONENT_INPUT_OPEN_WITH);
|
||||
}
|
||||
|
||||
pub(super) fn mount_rename(&mut self) {
|
||||
self.view.mount(
|
||||
super::COMPONENT_INPUT_RENAME,
|
||||
|
||||
Reference in New Issue
Block a user