diff --git a/scripts/vm/create_vm.sh b/scripts/vm/create_vm.sh index f05b16f..735ee21 100644 --- a/scripts/vm/create_vm.sh +++ b/scripts/vm/create_vm.sh @@ -78,7 +78,7 @@ function start_vm_configuration() { while true; do OS_TYPE=$(dialog --backtitle "ProxMenux" \ --title "$(translate "Select System Type")" \ - --menu "$(translate "Choose the type of virtual system to install:")" 18 64 8 \ + --menu "$(translate "Choose the type of virtual system to install:")" 18 70 8 \ 1 "$(translate "Create") VM System NAS" \ 2 "$(translate "Create") VM System Windows" \ 3 "$(translate "Create") VM System Linux" \ diff --git a/scripts/vm/select_nas_iso.sh b/scripts/vm/select_nas_iso.sh index ee726a7..6098cc9 100644 --- a/scripts/vm/select_nas_iso.sh +++ b/scripts/vm/select_nas_iso.sh @@ -20,19 +20,19 @@ mkdir -p "$ISO_DIR" function select_nas_iso() { local NAS_OPTIONS=( - "1" "Synology DSM VM" - "2" "TrueNAS SCALE VM (Fangtooth)" - "3" "TrueNAS CORE VM (FreeBSD based)" - "4" "OpenMediaVault VM (Debian based)" - "5" "Rockstor VM (openSUSE based)" - "6" "ZimaOS VM (R0GGER proxmox-zimaos)" + "1" "Synology DSM VM (Loader Linux-based)" + "2" "TrueNAS SCALE VM (Dragonfish)" + "3" "TrueNAS CORE VM (FreeBSD based)" + "4" "OpenMediaVault VM (Debian based)" + "5" "Rockstor VM (openSUSE based)" + "6" "ZimaOS VM (R0GGER proxmox-zimaos)" "7" "$(translate "Return to Main Menu")" ) local NAS_TYPE NAS_TYPE=$(dialog --backtitle "ProxMenux" \ --title "$(translate "NAS Systems")" \ - --menu "$(translate "Select the NAS system to install:")" 18 64 10 \ + --menu "\n$(translate "Select the NAS system to install:")" 18 70 10 \ "${NAS_OPTIONS[@]}" 3>&1 1>&2 2>&3) # Si se pulsa ESC o Cancelar diff --git a/scripts/vm/select_windows_iso.sh b/scripts/vm/select_windows_iso.sh index 287677c..9bfc03f 100644 --- a/scripts/vm/select_windows_iso.sh +++ b/scripts/vm/select_windows_iso.sh @@ -17,35 +17,66 @@ initialize_cache mkdir -p "$ISO_DIR" function select_windows_iso() { - local CHOICE - CHOICE=$(dialog --backtitle "ProxMenux" --title "$(translate "Windows ISO")" \ - --menu "$(translate "Select how to provide the Windows ISO:")" 15 60 5 \ - 1 "$(translate "Use existing ISO from storage")" \ - 2 "$(translate "Download ISO using UUP Dump")" \ - 3 "$(translate "Return to Main Menu")" 3>&1 1>&2 2>&3) + local EXIT_FLAG="no" + local header + if [[ "$LANGUAGE" == "es" ]]; then + header=$(printf "%-41s│ %s" " Descripción" "Fuente") + else + header=$(printf "%-42s│ %s" " $(translate "Description")" "$(translate "Source")") + fi - [[ $? -ne 0 ]] && return 1 # ESC o cancelar + while [[ "$EXIT_FLAG" != "yes" ]]; do + if [[ "$LANGUAGE" == "es" ]]; then + CHOICE=$(dialog --clear \ + --backtitle "ProxMenux" \ + --title "Opciones de instalación de Windows" \ + --menu "\nSeleccione el tipo de instalación de Windows:\n\n$header" \ + 18 70 10 \ + 1 "$(printf '%-34s│ %s' 'Instalar con ISO UUP Dump' 'UUP Dump ISO creator')" \ + 2 "$(printf '%-34s│ %s' 'Instalar con ISO personal' 'Almacenamiento local')" \ + 3 "Volver al menú principal" \ + 3>&1 1>&2 2>&3) + else + local desc1 desc2 back + desc1="$(translate "Install with ISO from UUP Dump")" + desc2="$(translate "Install with personal ISO")" + back="$(translate "Return to main menu")" + CHOICE=$(dialog --clear \ + --backtitle "ProxMenux" \ + --title "$(translate "Windows Installation Options")" \ + --menu "\n$(translate "Select the type of Windows installation:")\n\n$header" \ + 16 70 10 \ + 1 "$(printf '%-35s│ %s' "$desc1" "UUP Dump creator")" \ + 2 "$(printf '%-35s│ %s' "$desc2" "Local Storage")" \ + 3 "$back" \ + 3>&1 1>&2 2>&3) + fi - case "$CHOICE" in - 1) - select_existing_iso || return 1 - ;; - 2) - if source <(curl -fsSL "$UUP_REPO/uupdump_creator.sh"); then + if [[ $? -ne 0 || "$CHOICE" == "3" ]]; then + unset ISO_NAME ISO_TYPE ISO_URL ISO_FILE ISO_PATH HN + return 1 + fi + + case "$CHOICE" in + 1) + if source <(curl -fsSL "$UUP_REPO/uupdump_creator.sh"); then run_uupdump_creator || return 1 detect_latest_iso_created || return 1 - else - msg_error "$(translate "UUP Dump script not found.")" - return 1 - fi - ;; - 3) - return 1 - ;; - esac - return 0 + EXIT_FLAG="yes" + else + msg_error "$(translate "UUP Dump script not found.")" + return 1 + fi + ;; + 2) + select_existing_iso || return 1 + EXIT_FLAG="yes" + ;; + esac + done } + function select_existing_iso() { ISO_LIST=() while read -r line; do