From 5568670f515e34b23fc67b7ae17b63c80b510303 Mon Sep 17 00:00:00 2001 From: samosvalishe Date: Mon, 7 Sep 2026 12:11:47 +0300 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=D1=83=D0=B1=D1=80=D0=B0=D1=82=D1=8C?= =?UTF-8?q?=20=D1=83=D1=82=D0=B5=D1=87=D0=BA=D1=83=20OSC=2011/CPR=20escape?= =?UTF-8?q?-=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=D0=B4=D0=BE=D0=B2=D0=B0=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE=D1=81=D1=82=D0=B5=D0=B9=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=BB=D0=B0=D1=88=D0=B5=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install.sh | 81 ++++++++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 35 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 713d680..2cdb887 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -112,6 +112,7 @@ OVERRIDES=() PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PATH:-}" export PATH +export COLORFGBG="15;0" valid_port() { [[ "$1" =~ ^[0-9]+$ ]] && [ "$1" -ge 1 ] && [ "$1" -le 65535 ]; } valid_hex64() { [[ "$1" =~ ^[0-9a-fA-F]{64}$ ]]; } @@ -217,7 +218,15 @@ die() { exit 1 } -ui_abort() { log_info "Отменено."; exit 0; } +ui_drain_input() { + [ -t 0 ] || [ -r /dev/tty ] || return 0 + stty -echo /dev/null || true + local discard + while read -r -t 0.05 -n 1000 discard /dev/null; do :; done + stty echo /dev/null || true +} + +ui_abort() { ui_drain_input; log_info "Отменено."; exit 0; } ui_banner() { [ "$_IS_RPC" = 1 ] && return 0 @@ -2417,23 +2426,24 @@ review_config() { [ "$INSTALL_AWG" = "0" ] && comp_name="Только FreeTurn" if [ "$HAS_GUM" = 1 ]; then - gum format <