update gui

This commit is contained in:
David Schroeder
2026-07-28 21:15:50 -05:00
parent 72f6be5b43
commit c48e89af6c
2 changed files with 36 additions and 11 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
action="${1:-}" action="${1:-}"
FOLDER='/opt/idssys/ta-proxmenu' FOLDER='/opt/idssys/ta-proxmenu'
VERS='2026.7.28-6' VERS='2026.7.28-7'
noupdate=' ' noupdate=' '
+35 -10
View File
@@ -1653,7 +1653,13 @@ FORCE_UPDATE_CHECK() {
MENU_HEADER() { MENU_HEADER() {
local version_display local header_title='TA-ProxMenu - Proxmox Setup Scripts'
local header_width=75
local status_color=''
local status_display=''
local version_color="${idsCL[White]}"
local right_width
local spacer_width
# Reuse a settled update result instead of running Git checks on every # Reuse a settled update result instead of running Git checks on every
# arrow-key redraw. Continue refreshing only while the worker is pending. # arrow-key redraw. Continue refreshing only while the worker is pending.
@@ -1662,28 +1668,47 @@ MENU_HEADER() {
fi fi
case "$UPDATE_STATUS" in case "$UPDATE_STATUS" in
behind) behind)
version_display="${idsCL[LightYellow]}${VERS} ** UPDATE AVAILABLE **${idsCL[Default]}" status_display='** UPDATE AVAILABLE **'
status_color="${idsCL[LightYellow]}"
version_color="${idsCL[LightYellow]}"
;; ;;
ahead) ahead)
version_display="${idsCL[LightYellow]}${VERS} ** LOCAL COMMITS **${idsCL[Default]}" status_display='** LOCAL COMMITS **'
status_color="${idsCL[LightYellow]}"
version_color="${idsCL[LightYellow]}"
;; ;;
diverged) diverged)
version_display="${idsCL[LightRed]}${VERS} ** BRANCH DIVERGED **${idsCL[Default]}" status_display='** BRANCH DIVERGED **'
status_color="${idsCL[LightRed]}"
version_color="${idsCL[LightRed]}"
;; ;;
dirty) dirty)
version_display="${idsCL[LightYellow]}${VERS} ** LOCAL CHANGES **${idsCL[Default]}" status_display='** LOCAL CHANGES **'
status_color="${idsCL[LightYellow]}"
version_color="${idsCL[LightYellow]}"
;; ;;
checking) checking)
version_display="${idsCL[LightCyan]}${VERS} (checking for updates)${idsCL[Default]}" status_display='(checking for updates)'
;; status_color="${idsCL[LightCyan]}"
*) version_color="${idsCL[LightCyan]}"
version_display="${idsCL[White]}${VERS}${idsCL[Default]}"
;; ;;
esac esac
right_width="${#VERS}"
if [[ -n "$status_display" ]]; then
right_width=$((right_width + ${#status_display} + 2))
fi
spacer_width=$((header_width - 1 - ${#header_title} - right_width))
((spacer_width < 2)) && spacer_width=2
clear clear
echo echo
echo -e " ${idsCL[Green]}TA-ProxMenu - Proxmox Setup Scripts${idsCL[Default]} ${version_display}" printf ' %b%s%b%*s' \
"${idsCL[Green]}" "$header_title" "${idsCL[Default]}" "$spacer_width" ''
if [[ -n "$status_display" ]]; then
printf '%b%s%b ' "$status_color" "$status_display" "${idsCL[Default]}"
fi
printf '%b%s%b\n' "$version_color" "$VERS" "${idsCL[Default]}"
echo -e "${idsCL[Green]}---------------------------------------------------------------------------${idsCL[Default]}" echo -e "${idsCL[Green]}---------------------------------------------------------------------------${idsCL[Default]}"
echo -e " Hostname: ${idsCL[Cyan]}$(hostname -s)${idsCL[Default]}" echo -e " Hostname: ${idsCL[Cyan]}$(hostname -s)${idsCL[Default]}"
echo -e " IP Address: ${idsCL[Cyan]}${RNIP:-Unavailable}${idsCL[Default]}" echo -e " IP Address: ${idsCL[Cyan]}${RNIP:-Unavailable}${idsCL[Default]}"