fix all progressbox issues

This commit is contained in:
Ing 2023-10-12 20:56:38 +08:00
parent 9db8962e88
commit c287fa638d
5 changed files with 17 additions and 14 deletions

View File

@ -729,7 +729,7 @@ msgid "Temporary IP: (UI will not refresh)"
msgstr "" msgstr ""
#: menu.sh:1149 #: menu.sh:1149
msgid "Set IP.." msgid "Setting IP ..."
msgstr "" msgstr ""
#: menu.sh:1210 #: menu.sh:1210

View File

@ -733,7 +733,7 @@ msgid "Temporary IP: (UI will not refresh)"
msgstr "临时 IP: (UI 不会刷新)" msgstr "临时 IP: (UI 不会刷新)"
#: menu.sh:1149 #: menu.sh:1149
msgid "Set IP.." msgid "Setting IP ..."
msgstr "设置 IP.." msgstr "设置 IP.."
#: menu.sh:1210 #: menu.sh:1210

View File

@ -733,7 +733,7 @@ msgid "Temporary IP: (UI will not refresh)"
msgstr "臨時 IP: (UI 不會重繪)" msgstr "臨時 IP: (UI 不會重繪)"
#: menu.sh:1149 #: menu.sh:1149
msgid "Set IP.." msgid "Setting IP ..."
msgstr "設定 IP.." msgstr "設定 IP.."
#: menu.sh:1210 #: menu.sh:1210

View File

@ -584,6 +584,9 @@ msgstr "設定代理"
msgid "Setting %s MAC to %s" msgid "Setting %s MAC to %s"
msgstr "設定 %s 的 MAC 為 %s" msgstr "設定 %s 的 MAC 為 %s"
msgid "Setting IP ..."
msgstr "設定 IP.."
msgid "Setting hash: " msgid "Setting hash: "
msgstr "設定 hash: " msgstr "設定 hash: "

View File

@ -1145,8 +1145,8 @@ function advancedMenu() {
done done
sleep 1 sleep 1
IP=$(ip route 2>/dev/null | sed -n 's/.* via .* dev \(.*\) src \(.*\) metric .*/\1: \2 /p' | head -1) IP=$(ip route 2>/dev/null | sed -n 's/.* via .* dev \(.*\) src \(.*\) metric .*/\1: \2 /p' | head -1)
) | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ ) 2>&1 | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \
--progressbox "$(TEXT "Set IP..")" 20 70 --progressbox "$(TEXT "Setting IP ...")" 20 100
NEXT="e" NEXT="e"
;; ;;
u) u)
@ -1247,8 +1247,8 @@ function advancedMenu() {
umount "${I}" umount "${I}"
done done
rm -rf "${TMP_PATH}/sdX1" rm -rf "${TMP_PATH}/sdX1"
) | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ ) 2>&1 | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \
--progressbox "$(TEXT "Removing ...")" 20 70 --progressbox "$(TEXT "Removing ...")" 20 100
MSG="$(TEXT "Remove VERSION file for all disks completed.")" MSG="$(TEXT "Remove VERSION file for all disks completed.")"
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \
--msgbox "${MSG}" 0 0 --msgbox "${MSG}" 0 0
@ -1279,10 +1279,10 @@ function advancedMenu() {
fi fi
( (
for I in ${RESP}; do for I in ${RESP}; do
echo y | mkfs.ext4 -T largefile4 "${I}" 2>&1 echo y | mkfs.ext4 -T largefile4 "${I}"
done done
) | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ ) 2>&1 | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \
--progressbox "$(TEXT "Formatting ...")" 20 70 --progressbox "$(TEXT "Formatting ...")" 20 100
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \
--msgbox "$(TEXT "Formatting is complete.")" 0 0 --msgbox "$(TEXT "Formatting is complete.")" 0 0
;; ;;
@ -1332,8 +1332,8 @@ function advancedMenu() {
umount "${I}" umount "${I}"
done done
rm -rf "${TMP_PATH}/sdX1" rm -rf "${TMP_PATH}/sdX1"
) | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ ) 2>&1 | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \
--progressbox "$(TEXT "Resetting ...")" 20 70 --progressbox "$(TEXT "Resetting ...")" 20 100
[ -f "${SHADOW_FILE}" ] && rm -rf "${SHADOW_FILE}" [ -f "${SHADOW_FILE}" ] && rm -rf "${SHADOW_FILE}"
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \
--msgbox "$(TEXT "Password reset completed.")" 0 0 --msgbox "$(TEXT "Password reset completed.")" 0 0
@ -1483,8 +1483,8 @@ function advancedMenu() {
source ~/.bashrc source ~/.bashrc
opkg update opkg update
#opkg install python3 python3-pip #opkg install python3 python3-pip
) | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ ) 2>&1 | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \
--progressbox "$(TEXT "opkg installing ...")" 20 70 --progressbox "$(TEXT "opkg installing ...")" 20 100
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \
--msgbox "$(TEXT "opkg install is complete. Please reconnect to SSH/web, or execute 'source ~/.bashrc'")" 0 0 --msgbox "$(TEXT "opkg install is complete. Please reconnect to SSH/web, or execute 'source ~/.bashrc'")" 0 0
;; ;;