mirror of
https://github.com/veeso/termscp.git
synced 2026-09-26 22:11:26 -07:00
fix: panic if the terminal screen is too small
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
use tuirealm::props::Color;
|
||||||
use tuirealm::tui::layout::{Constraint, Direction, Layout};
|
use tuirealm::tui::layout::{Constraint, Direction, Layout};
|
||||||
use tuirealm::tui::widgets::Clear;
|
use tuirealm::tui::widgets::Clear;
|
||||||
use tuirealm::{State, StateValue, Sub, SubClause, SubEventClause};
|
use tuirealm::{State, StateValue, Sub, SubClause, SubEventClause};
|
||||||
@@ -413,12 +414,11 @@ impl AuthActivity {
|
|||||||
/// Mount size error
|
/// Mount size error
|
||||||
pub(super) fn mount_size_err(&mut self) {
|
pub(super) fn mount_size_err(&mut self) {
|
||||||
// Mount
|
// Mount
|
||||||
let err_color = self.theme().misc_error_dialog;
|
|
||||||
assert!(self
|
assert!(self
|
||||||
.app
|
.app
|
||||||
.remount(
|
.remount(
|
||||||
Id::WindowSizeError,
|
Id::WindowSizeError,
|
||||||
Box::new(components::WindowSizeError::new(err_color)),
|
Box::new(components::WindowSizeError::new(Color::Red)),
|
||||||
vec![]
|
vec![]
|
||||||
)
|
)
|
||||||
.is_ok());
|
.is_ok());
|
||||||
|
|||||||
Reference in New Issue
Block a user