mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-05 20:03:48 +00:00
Update menu_Helper_Scripts.sh
This commit is contained in:
@@ -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=()
|
||||
|
||||
Reference in New Issue
Block a user