From cc8eff1914027d303016c6b135004a83a311b5e2 Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:39:08 +0100 Subject: [PATCH] Update utils.sh --- scripts/utils.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/utils.sh b/scripts/utils.sh index 6c0e097..870c987 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -88,6 +88,10 @@ msg_info() { # Display warning or highlighted information message msg_warn() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then + kill $SPINNER_PID > /dev/null + fi + printf "\e[?25h" local msg="$1" echo -e "${BFR}${TAB}${YWB}${CL} ${YWB}${msg}${CL}" } @@ -104,8 +108,14 @@ msg_ok() { # Display error message msg_error() { - echo -e " ${RD}[ERROR] $1${CL}" + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then + kill $SPINNER_PID > /dev/null + fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${TAB}${RD}[ERROR] ${msg}${CL}" } + # Initialize cache initialize_cache() { @@ -218,9 +228,10 @@ EOF } show_proxmenu_logo_m() { + local color="${1:-$GN}" + clear - - echo -e "${YW}" + echo -e "${color}" cat << 'EOF' ██████╗ ██████╗ ██████╗ ██╗ ██╗███╗ ███╗███████╗███╗ ██╗██╗ ██╗ ██╔══██╗██╔══██╗██╔═══██╗╚██╗██╔╝████╗ ████║██╔════╝████╗ ██║██║ ██║