From 1c7a8ea44386caae77ef345dc032405eb3b5fb0d Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Fri, 17 Apr 2026 20:37:29 -0400 Subject: [PATCH] More copyparty tweaks. --- .includes/copyparty.sh | 2 +- .includes/ui.sh | 8 +++++++- configure-server.sh | 0 3 files changed, 8 insertions(+), 2 deletions(-) mode change 100644 => 100755 configure-server.sh diff --git a/.includes/copyparty.sh b/.includes/copyparty.sh index 05d6c9e..254e22a 100644 --- a/.includes/copyparty.sh +++ b/.includes/copyparty.sh @@ -148,7 +148,7 @@ choose_copyparty_user() { return 1 fi - selectedUser="$(menulist "${userEntries[@]}")" || return 1 + selectedUser="$(menulist --prompt "Please select the user Copyparty should be run as." "${userEntries[@]}")" || return 1 printf '%s\n' "$selectedUser" return 0 } diff --git a/.includes/ui.sh b/.includes/ui.sh index a153f58..296db32 100644 --- a/.includes/ui.sh +++ b/.includes/ui.sh @@ -37,9 +37,15 @@ yesno() { } menulist() { + local promptText="Please select an option" local menuList=() local menuItem="" + if [[ "$1" == --prompt ]]; then + promptText="$2" + shift 2 + fi + for menuItem in "$@"; do menuList+=("$menuItem" "$menuItem") done @@ -47,7 +53,7 @@ menulist() { dialog --backtitle "Configure Server" \ --clear \ --no-tags \ - --menu "Please select an option" 0 0 0 "${menuList[@]}" --stdout + --menu "$promptText" 0 0 0 "${menuList[@]}" --stdout } textbox() { diff --git a/configure-server.sh b/configure-server.sh old mode 100644 new mode 100755