mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Fixed popups
This commit is contained in:
@@ -38,6 +38,7 @@ use crate::ui::layout::Payload;
|
|||||||
use tui::{
|
use tui::{
|
||||||
layout::{Constraint, Direction, Layout},
|
layout::{Constraint, Direction, Layout},
|
||||||
style::Color,
|
style::Color,
|
||||||
|
widgets::Clear,
|
||||||
};
|
};
|
||||||
|
|
||||||
impl AuthActivity {
|
impl AuthActivity {
|
||||||
@@ -251,22 +252,18 @@ impl AuthActivity {
|
|||||||
// Popups
|
// Popups
|
||||||
if let Some(mut props) = self.view.get_props(super::COMPONENT_TEXT_ERROR) {
|
if let Some(mut props) = self.view.get_props(super::COMPONENT_TEXT_ERROR) {
|
||||||
if props.build().visible {
|
if props.build().visible {
|
||||||
|
let popup = draw_area_in(f.size(), 50, 10);
|
||||||
|
f.render_widget(Clear, popup);
|
||||||
// make popup
|
// make popup
|
||||||
self.view.render(
|
self.view.render(super::COMPONENT_TEXT_ERROR, f, popup);
|
||||||
super::COMPONENT_TEXT_ERROR,
|
|
||||||
f,
|
|
||||||
draw_area_in(f.size(), 50, 10),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(mut props) = self.view.get_props(super::COMPONENT_RADIO_QUIT) {
|
if let Some(mut props) = self.view.get_props(super::COMPONENT_RADIO_QUIT) {
|
||||||
if props.build().visible {
|
if props.build().visible {
|
||||||
// make popup
|
// make popup
|
||||||
self.view.render(
|
let popup = draw_area_in(f.size(), 30, 10);
|
||||||
super::COMPONENT_RADIO_QUIT,
|
f.render_widget(Clear, popup);
|
||||||
f,
|
self.view.render(super::COMPONENT_RADIO_QUIT, f, popup);
|
||||||
draw_area_in(f.size(), 30, 10),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(mut props) = self
|
if let Some(mut props) = self
|
||||||
@@ -275,11 +272,10 @@ impl AuthActivity {
|
|||||||
{
|
{
|
||||||
if props.build().visible {
|
if props.build().visible {
|
||||||
// make popup
|
// make popup
|
||||||
self.view.render(
|
let popup = draw_area_in(f.size(), 30, 10);
|
||||||
super::COMPONENT_RADIO_BOOKMARK_DEL_BOOKMARK,
|
f.render_widget(Clear, popup);
|
||||||
f,
|
self.view
|
||||||
draw_area_in(f.size(), 30, 10),
|
.render(super::COMPONENT_RADIO_BOOKMARK_DEL_BOOKMARK, f, popup);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(mut props) = self
|
if let Some(mut props) = self
|
||||||
@@ -288,21 +284,18 @@ impl AuthActivity {
|
|||||||
{
|
{
|
||||||
if props.build().visible {
|
if props.build().visible {
|
||||||
// make popup
|
// make popup
|
||||||
self.view.render(
|
let popup = draw_area_in(f.size(), 30, 10);
|
||||||
super::COMPONENT_RADIO_BOOKMARK_DEL_RECENT,
|
f.render_widget(Clear, popup);
|
||||||
f,
|
self.view
|
||||||
draw_area_in(f.size(), 30, 10),
|
.render(super::COMPONENT_RADIO_BOOKMARK_DEL_RECENT, f, popup);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(mut props) = self.view.get_props(super::COMPONENT_TEXT_HELP) {
|
if let Some(mut props) = self.view.get_props(super::COMPONENT_TEXT_HELP) {
|
||||||
if props.build().visible {
|
if props.build().visible {
|
||||||
// make popup
|
// make popup
|
||||||
self.view.render(
|
let popup = draw_area_in(f.size(), 50, 70);
|
||||||
super::COMPONENT_TEXT_HELP,
|
f.render_widget(Clear, popup);
|
||||||
f,
|
self.view.render(super::COMPONENT_TEXT_HELP, f, popup);
|
||||||
draw_area_in(f.size(), 50, 70),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(mut props) = self
|
if let Some(mut props) = self
|
||||||
@@ -312,6 +305,7 @@ impl AuthActivity {
|
|||||||
if props.build().visible {
|
if props.build().visible {
|
||||||
// make popup
|
// make popup
|
||||||
let popup = draw_area_in(f.size(), 20, 20);
|
let popup = draw_area_in(f.size(), 20, 20);
|
||||||
|
f.render_widget(Clear, popup);
|
||||||
self.view
|
self.view
|
||||||
.render(super::COMPONENT_INPUT_BOOKMARK_NAME, f, popup);
|
.render(super::COMPONENT_INPUT_BOOKMARK_NAME, f, popup);
|
||||||
self.view
|
self.view
|
||||||
|
|||||||
Reference in New Issue
Block a user