update gui
This commit is contained in:
+1
-1
@@ -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
@@ -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]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user