From b656e99820cb39aa36f22f1be6172c1c8cc639a7 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Sun, 25 Oct 2026 12:17:28 +0100 Subject: [PATCH] post-pve-install: hide the mobile subscription nag in every UI language (#18143) The mobile UI patch removed the dialog and card only when their text contained "subscription", so translated UIs (de: "Subskription", fr: "Abonnement", ...) kept the nag. It also deleted DOM nodes Yew still owns and polled every 300 ms for good. The helper now injects a fetch wrapper into the mobile index template that fills the empty subscription level of each node in the /nodes response, so the app never shows the alert or card. The API response itself is unchanged; the node list shows "-" instead of "No subscription". The mobile UI package is reinstalled alongside the widget toolkit so old blocks are dropped, and "no" also removes the helper. --- tools/pve/post-pve-install.sh | 56 +++++++++++++---------------------- 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/tools/pve/post-pve-install.sh b/tools/pve/post-pve-install.sh index 2dd551a5e..bf1de735e 100644 --- a/tools/pve/post-pve-install.sh +++ b/tools/pve/post-pve-install.sh @@ -565,42 +565,23 @@ if [ -s "$WEB_JS" ] && ! grep -q NoMoreNagging "$WEB_JS"; then fi MOBILE_TPL=/usr/share/pve-yew-mobile-gui/index.html.tpl -MARKER="" -if [ -f "$MOBILE_TPL" ] && ! grep -q "$MARKER" "$MOBILE_TPL"; then +if [ -s "$MOBILE_TPL" ] && ! grep -q NoMoreNagging "$MOBILE_TPL"; then echo "Patching Mobile UI nag..." - printf "%s\n" \ - "$MARKER" \ - "" \ - "" >> "$MOBILE_TPL" + sed -i '/
/r /dev/stdin' "$MOBILE_TPL" <<'HTML' + +HTML fi EOF chmod 755 /usr/local/bin/pve-remove-nag.sh @@ -615,10 +596,13 @@ EOF no) whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 msg_error "Selected no to Disabling subscription nag" - [[ -f /etc/apt/apt.conf.d/no-nag-script ]] && rm /etc/apt/apt.conf.d/no-nag-script + rm -f /etc/apt/apt.conf.d/no-nag-script /usr/local/bin/pve-remove-nag.sh ;; esac apt --reinstall install proxmox-widget-toolkit &>/dev/null || msg_error "Widget toolkit reinstall failed" + if dpkg -s pve-yew-mobile-gui &>/dev/null; then + apt --reinstall install pve-yew-mobile-gui &>/dev/null || msg_error "Mobile UI reinstall failed" + fi if ! systemctl is-active --quiet pve-ha-lrm; then CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HIGH AVAILABILITY" --menu "Enable high availability?" 10 58 2 \ "yes" " " \