feat(menu): search options and applications from the main menu

The main menu opens with a search that finds an option of ProxMenux, an application of the OCI catalog or a Helper-Script by its name or by related words, in that order, and by category after the names.

Every result opens what its name says and nothing is run by the search itself: a script starts at its first screen, an application opens its page, an option of the post-install or a system utility opens its list with it marked, and an option that lives inside a menu is opened by that menu, which stays behind it.

The menus take the option to open as an argument and behave as before without one. The Helper-Scripts catalog is kept on the host and refreshed once a day. The main menu, the lists of OCI manager and the Helper-Scripts menu share the same height.
This commit is contained in:
MacRimi
2026-10-11 13:26:23 +02:00
parent 8b8fed2564
commit 0fd3be15c1
16 changed files with 1219 additions and 42 deletions
+23 -15
View File
@@ -130,27 +130,35 @@ function start_vm_configuration() {
# A system type given as argument, as the menu search does, is opened first;
# the menu follows.
PRESELECTED_OPTION="${1:-}"
while true; do
VM_STORAGE_IOMMU_PENDING_REBOOT=0
WIZARD_CONFLICT_POLICY=""
WIZARD_CONFLICT_SCOPE=""
export WIZARD_CONFLICT_POLICY WIZARD_CONFLICT_SCOPE
OS_TYPE=$(dialog --colors --backtitle "ProxMenux" \
--title "$(translate "Select System Type")" \
--menu "\n$(translate "Choose the type of virtual system to install:")" 20 70 10 \
1 "$(translate "Create VM System NAS")" \
2 "$(translate "Create VM System Windows")" \
3 "$(translate "Create VM System Linux")" \
"" "" \
"" "\Z4───────────────── $(translate "Community Scripts") ─────────────────\Zn" \
"" "" \
4 "$(translate "Create VM System macOS (OSX-PROXMOX)")" \
5 "$(translate "Create VM System Others (based Linux)")" \
"" "" \
6 "$(translate "Return to Main Menu")" \
3>&1 1>&2 2>&3)
if [[ "$PRESELECTED_OPTION" =~ ^[1-5]$ ]]; then
OS_TYPE="$PRESELECTED_OPTION"
PRESELECTED_OPTION=""
else
OS_TYPE=$(dialog --colors --backtitle "ProxMenux" \
--title "$(translate "Select System Type")" \
--menu "\n$(translate "Choose the type of virtual system to install:")" 20 70 10 \
1 "$(translate "Create VM System NAS")" \
2 "$(translate "Create VM System Windows")" \
3 "$(translate "Create VM System Linux")" \
"" "" \
"" "\Z4───────────────── $(translate "Community Scripts") ─────────────────\Zn" \
"" "" \
4 "$(translate "Create VM System macOS (OSX-PROXMOX)")" \
5 "$(translate "Create VM System Others (based Linux)")" \
"" "" \
6 "$(translate "Return to Main Menu")" \
3>&1 1>&2 2>&3)
[[ $? -ne 0 || "$OS_TYPE" == "6" ]] && exec bash "$MENU_REPO/main_menu.sh"
[[ $? -ne 0 || "$OS_TYPE" == "6" ]] && exec bash "$MENU_REPO/main_menu.sh"
fi
case "$OS_TYPE" in
1)