summaryrefslogtreecommitdiffstats
path: root/src/client/ui.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-29 23:06:22 +0100
committersalmonik <salmonik@tuta.io>2026-10-29 23:06:22 +0100
commit810e212b4b255914cfa73e85b52ec23db281c0e3 (patch)
tree01e8035ce2945112af5ef41ef8959890bb0ef722 /src/client/ui.rs
parentv3.0.0: cursor-driven roulette felt with splits and corners; drop schema migr... (diff)
downloadzagan-bet-810e212b4b255914cfa73e85b52ec23db281c0e3.tar.gz
zagan-bet-810e212b4b255914cfa73e85b52ec23db281c0e3.zip
v3.1.0: warn on shrink, but let a live round finish
Diffstat (limited to '')
-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