mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
fmt code
This commit is contained in:
@@ -1493,8 +1493,16 @@ impl FileTransferActivity {
|
|||||||
let mut remote_state: ListState = ListState::default();
|
let mut remote_state: ListState = ListState::default();
|
||||||
remote_state.select(Some(self.remote.index));
|
remote_state.select(Some(self.remote.index));
|
||||||
// Draw tabs
|
// Draw tabs
|
||||||
f.render_stateful_widget(self.draw_local_explorer(), tabs_chunks[0], &mut localhost_state);
|
f.render_stateful_widget(
|
||||||
f.render_stateful_widget(self.draw_remote_explorer(), tabs_chunks[1], &mut remote_state);
|
self.draw_local_explorer(),
|
||||||
|
tabs_chunks[0],
|
||||||
|
&mut localhost_state,
|
||||||
|
);
|
||||||
|
f.render_stateful_widget(
|
||||||
|
self.draw_remote_explorer(),
|
||||||
|
tabs_chunks[1],
|
||||||
|
&mut remote_state,
|
||||||
|
);
|
||||||
// Set log state
|
// Set log state
|
||||||
let mut log_state: ListState = ListState::default();
|
let mut log_state: ListState = ListState::default();
|
||||||
log_state.select(Some(self.log_index));
|
log_state.select(Some(self.log_index));
|
||||||
@@ -1507,8 +1515,13 @@ impl FileTransferActivity {
|
|||||||
let popup_area: Rect = self.draw_popup_area(f.size());
|
let popup_area: Rect = self.draw_popup_area(f.size());
|
||||||
f.render_widget(Clear, popup_area); //this clears out the background
|
f.render_widget(Clear, popup_area); //this clears out the background
|
||||||
match popup {
|
match popup {
|
||||||
PopupType::Alert(color, txt) => f.render_widget(self.draw_popup_alert(color.clone(), txt.clone()), popup_area),
|
PopupType::Alert(color, txt) => f.render_widget(
|
||||||
PopupType::Fatal(txt) => f.render_widget(self.draw_popup_fatal(txt.clone()), popup_area),
|
self.draw_popup_alert(color.clone(), txt.clone()),
|
||||||
|
popup_area,
|
||||||
|
),
|
||||||
|
PopupType::Fatal(txt) => {
|
||||||
|
f.render_widget(self.draw_popup_fatal(txt.clone()), popup_area)
|
||||||
|
}
|
||||||
PopupType::Input(txt, _) => {
|
PopupType::Input(txt, _) => {
|
||||||
f.render_widget(self.draw_popup_input(txt.clone()), popup_area);
|
f.render_widget(self.draw_popup_input(txt.clone()), popup_area);
|
||||||
// Set cursor
|
// Set cursor
|
||||||
@@ -1516,10 +1529,16 @@ impl FileTransferActivity {
|
|||||||
popup_area.x + self.input_txt.width() as u16 + 1,
|
popup_area.x + self.input_txt.width() as u16 + 1,
|
||||||
popup_area.y + 1,
|
popup_area.y + 1,
|
||||||
)
|
)
|
||||||
},
|
}
|
||||||
PopupType::Progress(txt) => f.render_widget(self.draw_popup_progress(txt.clone()), popup_area),
|
PopupType::Progress(txt) => {
|
||||||
PopupType::Wait(txt) => f.render_widget(self.draw_popup_wait(txt.clone()), popup_area),
|
f.render_widget(self.draw_popup_progress(txt.clone()), popup_area)
|
||||||
PopupType::YesNo(txt, _, _) => f.render_widget(self.draw_popup_yesno(txt.clone()), popup_area),
|
}
|
||||||
|
PopupType::Wait(txt) => {
|
||||||
|
f.render_widget(self.draw_popup_wait(txt.clone()), popup_area)
|
||||||
|
}
|
||||||
|
PopupType::YesNo(txt, _, _) => {
|
||||||
|
f.render_widget(self.draw_popup_yesno(txt.clone()), popup_area)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user