From 8c6a6bece6056e2a9610183a5da6ec10bcb56d48 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Thu, 26 Mar 2026 17:43:34 +0100 Subject: [PATCH] Update menu_Helper_Scripts.sh --- scripts/menus/menu_Helper_Scripts.sh | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/menus/menu_Helper_Scripts.sh b/scripts/menus/menu_Helper_Scripts.sh index 50ace89e..e1df7113 100644 --- a/scripts/menus/menu_Helper_Scripts.sh +++ b/scripts/menus/menu_Helper_Scripts.sh @@ -173,13 +173,28 @@ run_script_by_slug() { credentials=$(format_credentials "$first") # Build info message - local msg="\Zb\Z4$(translate "Description"):\Zn\n$desc" - [[ -n "$notes_dialog" ]] && msg+="\n\n\Zb\Z4$(translate "Notes"):\Zn\n$notes_dialog" +local msg="\Zb\Z4$(translate "Description"):\Zn\n$desc" + if [[ -n "$notes" ]]; then + local notes_short="" + local char_count=0 + local max_chars=400 + while IFS= read -r line; do + [[ -z "$line" ]] && continue + char_count=$(( char_count + ${#line} )) + if [[ $char_count -lt $max_chars ]]; then + notes_short+="• $line\n" + else + notes_short+="...\n" + break + fi + done <<< "$notes" + msg+="\n\n\Zb\Z4$(translate "Notes"):\Zn\n$notes_short" + fi [[ -n "$credentials" ]] && msg+="\n\n\Zb\Z4$(translate "Default Credentials"):\Zn\n$credentials" [[ "$port" -gt 0 ]] && msg+="\n\n\Zb\Z4$(translate "Default Port"):\Zn $port" [[ -n "$website" ]] && msg+="\n\Zb\Z4$(translate "Website"):\Zn $website" - msg+="\n\n$(translate "Choose how to run the script:"):" + msg+="\n\n$(translate "Choose how to run the script:")" # Build menu: one or two entries per script_info (GH + optional Mirror) declare -a MENU_OPTS=()