This commit is contained in:
Mikhail Kilin
2026-01-24 02:22:47 +03:00
parent c18f43664e
commit 22c4e17377
9 changed files with 1199 additions and 226 deletions

View File

@@ -11,10 +11,10 @@ use ratatui::style::{Color, Modifier, Style};
use ratatui::widgets::Paragraph;
use crate::app::{App, AppScreen};
/// Минимальная ширина терминала
const MIN_WIDTH: u16 = 80;
/// Минимальная высота терминала
const MIN_HEIGHT: u16 = 20;
const MIN_HEIGHT: u16 = 10;
/// Минимальная ширина терминала
const MIN_WIDTH: u16 = 40;
pub fn render(f: &mut Frame, app: &mut App) {
let area = f.area();
@@ -34,7 +34,7 @@ pub fn render(f: &mut Frame, app: &mut App) {
fn render_size_warning(f: &mut Frame, width: u16, height: u16) {
let message = format!(
"Терминал слишком мал: {}x{}\n\nМинимум: {}x{}",
"{}x{}\nМинимум: {}x{}",
width, height, MIN_WIDTH, MIN_HEIGHT
);
let warning = Paragraph::new(message)