summaryrefslogtreecommitdiffstats
path: root/src/client/ui.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/ui.rs')
-rw-r--r--src/client/ui.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/ui.rs b/src/client/ui.rs
index 6161166..ca001c2 100644
--- a/src/client/ui.rs
+++ b/src/client/ui.rs
@@ -261,6 +261,16 @@ pub fn terminal_too_small(columns: u16, rows: u16) -> Option<String> {
261 )) 261 ))
262} 262}
263 263
264/// One-line warning for a terminal that shrank while the client is running.
265pub fn terminal_size_warning(columns: u16, rows: u16) -> Option<String> {
266 if columns >= MIN_COLUMNS && rows >= MIN_ROWS {
267 return None;
268 }
269 Some(format!(
270 "WARNING: terminal is {columns}x{rows}; zagan.bet needs at least {MIN_COLUMNS}x{MIN_ROWS}. Resize to fit."
271 ))
272}
273
264/// Render remembered hosts. 274/// Render remembered hosts.
265/// 275///
266/// Two addresses that present the same certificate key are the same server, so 276/// Two addresses that present the same certificate key are the same server, so