script: rename general_ui and separate dialog

This commit is contained in:
Yifei Ding
2021-11-13 00:46:17 -08:00
parent e7873fd057
commit f42ce0f0c5
2 changed files with 28 additions and 29 deletions

View File

@@ -0,0 +1,27 @@
#######################################
# description Advise user to update KIAUH
# Globals:
# KIAUH_WHIPTAIL_NORMAL_HEIGHT
# KIAUH_WHIPTAIL_NORMAL_WIDTH
# RET
# Arguments:
# None
#######################################
kiauh_update_dialog() {
whiptail --title "New KIAUH update available!" \
--yesno \
"View Changelog: https://git.io/JnmlX
It is recommended to keep KIAUH up to date. Updates usually contain bugfixes, \
important changes or new features. Please consider updating!
Do you want to update now?" \
"$KIAUH_WHIPTAIL_NORMAL_HEIGHT" "$KIAUH_WHIPTAIL_NORMAL_WIDTH"
local out=$?
if [ $out -eq 0 ]; then
do_action "update_kiauh"
else
deny_action "kiauh_update_dialog"
fi
}