mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
committed by
GitHub
parent
2caa0432df
commit
816270d545
@@ -287,13 +287,22 @@ impl FileTransferActivity {
|
||||
f.render_widget(Clear, popup);
|
||||
// make popup
|
||||
self.app.view(&Id::QuitPopup, f, popup);
|
||||
} else if self.app.mounted(&Id::WatchedPathsList) {
|
||||
let popup = draw_area_in(f.size(), 60, 50);
|
||||
f.render_widget(Clear, popup);
|
||||
// make popup
|
||||
self.app.view(&Id::WatchedPathsList, f, popup);
|
||||
} else if self.app.mounted(&Id::WatcherPopup) {
|
||||
let popup = draw_area_in(f.size(), 60, 10);
|
||||
f.render_widget(Clear, popup);
|
||||
// make popup
|
||||
self.app.view(&Id::WatcherPopup, f, popup);
|
||||
} else if self.app.mounted(&Id::SortingPopup) {
|
||||
let popup = draw_area_in(f.size(), 50, 10);
|
||||
f.render_widget(Clear, popup);
|
||||
// make popup
|
||||
self.app.view(&Id::SortingPopup, f, popup);
|
||||
} else if self.app.mounted(&Id::ErrorPopup) {
|
||||
// TODO: inject dynamic height here
|
||||
let popup = draw_area_in(
|
||||
f.size(),
|
||||
50,
|
||||
@@ -303,7 +312,6 @@ impl FileTransferActivity {
|
||||
// make popup
|
||||
self.app.view(&Id::ErrorPopup, f, popup);
|
||||
} else if self.app.mounted(&Id::FatalPopup) {
|
||||
// TODO: inject dynamic height here
|
||||
let popup = draw_area_in(
|
||||
f.size(),
|
||||
50,
|
||||
@@ -717,6 +725,42 @@ impl FileTransferActivity {
|
||||
let _ = self.app.umount(&Id::DeletePopup);
|
||||
}
|
||||
|
||||
pub(super) fn mount_radio_watch(&mut self, watch: bool, local: &str, remote: &str) {
|
||||
let info_color = self.theme().misc_info_dialog;
|
||||
assert!(self
|
||||
.app
|
||||
.remount(
|
||||
Id::WatcherPopup,
|
||||
Box::new(components::WatcherPopup::new(
|
||||
watch, local, remote, info_color
|
||||
)),
|
||||
vec![],
|
||||
)
|
||||
.is_ok());
|
||||
assert!(self.app.active(&Id::WatcherPopup).is_ok());
|
||||
}
|
||||
|
||||
pub(super) fn umount_radio_watcher(&mut self) {
|
||||
let _ = self.app.umount(&Id::WatcherPopup);
|
||||
}
|
||||
|
||||
pub(super) fn mount_watched_paths_list(&mut self, paths: &[std::path::PathBuf]) {
|
||||
let info_color = self.theme().misc_info_dialog;
|
||||
assert!(self
|
||||
.app
|
||||
.remount(
|
||||
Id::WatchedPathsList,
|
||||
Box::new(components::WatchedPathsList::new(paths, info_color)),
|
||||
vec![],
|
||||
)
|
||||
.is_ok());
|
||||
assert!(self.app.active(&Id::WatchedPathsList).is_ok());
|
||||
}
|
||||
|
||||
pub(super) fn umount_watched_paths_list(&mut self) {
|
||||
let _ = self.app.umount(&Id::WatchedPathsList);
|
||||
}
|
||||
|
||||
pub(super) fn mount_radio_replace(&mut self, file_name: &str) {
|
||||
let warn_color = self.theme().misc_warn_dialog;
|
||||
assert!(self
|
||||
@@ -1040,9 +1084,19 @@ impl FileTransferActivity {
|
||||
Box::new(SubClause::Not(Box::new(SubClause::IsMounted(
|
||||
Id::SymlinkPopup,
|
||||
)))),
|
||||
Box::new(SubClause::Not(Box::new(SubClause::IsMounted(
|
||||
Id::WaitPopup,
|
||||
)))),
|
||||
Box::new(SubClause::And(
|
||||
Box::new(SubClause::Not(Box::new(SubClause::IsMounted(
|
||||
Id::WatcherPopup,
|
||||
)))),
|
||||
Box::new(SubClause::And(
|
||||
Box::new(SubClause::Not(Box::new(SubClause::IsMounted(
|
||||
Id::WatchedPathsList,
|
||||
)))),
|
||||
Box::new(SubClause::Not(Box::new(SubClause::IsMounted(
|
||||
Id::WaitPopup,
|
||||
)))),
|
||||
)),
|
||||
)),
|
||||
)),
|
||||
)),
|
||||
)),
|
||||
|
||||
Reference in New Issue
Block a user