From 3099308eb3146533762faaa697db0343eda673cd Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Wed, 15 Jan 2025 15:43:51 +0100 Subject: [PATCH 1/3] Distro verification: Display warning for 10 seconds and autocontinue --- .../modules/functions/check_distro_status.sh | 4 +--- tools/modules/functions/config_interface.sh | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/tools/modules/functions/check_distro_status.sh b/tools/modules/functions/check_distro_status.sh index b50f58865..30d507211 100644 --- a/tools/modules/functions/check_distro_status.sh +++ b/tools/modules/functions/check_distro_status.sh @@ -29,15 +29,13 @@ function check_distro_status() { else BACKTITLE="Warning: The current OS ($DISTROID) is not supported or not listed" set_colors 1 - get_user_continue "Warning: + info_wait_continue "Warning: The current OS ($DISTROID) is not a officially supported distro! The tool might still work well, but be aware that issues may not be accepted and addressed by the maintainers. However, you are welcome to contribute fixes for any problems you encounter. - - Would you like to continue? " process_input fi ;; diff --git a/tools/modules/functions/config_interface.sh b/tools/modules/functions/config_interface.sh index f4669824a..51172eb66 100644 --- a/tools/modules/functions/config_interface.sh +++ b/tools/modules/functions/config_interface.sh @@ -352,6 +352,30 @@ function get_user_continue() { fi } + +# +# Functions to display warning for 10 seconds with a gauge +# +module_options+=( + ["info_wait_autocontinue,author"]="@igorpecovnik" + ["info_wait_autocontinue,ref_link"]="" + ["info_wait_autocontinue,feature"]="info_wait_autocontinue" + ["info_wait_autocontinue,desc"]="Display a warning with a gauge for 10 seconds then continue" + ["info_wait_autocontinue,example"]="" + ["info_wait_autocontinue,doc_link"]="" + ["info_wait_autocontinue,status"]="Active" +) +function info_wait_continue() { + local message="$1" + local next_action="$2" + { + for ((i=0; i<=100; i+=10)); do + sleep 1 + echo $i + done + } | $DIALOG --gauge "$message" 15 80 0 +} + menu_options+=( ["get_user_continue,author"]="@Tearran" ["get_user_continue,ref_link"]="" From 155447704d13aad8cec72761db876f8056a65b8b Mon Sep 17 00:00:00 2001 From: Joey Turner Date: Wed, 15 Jan 2025 18:10:37 +0000 Subject: [PATCH 2/3] fix style --- tools/modules/functions/config_interface.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/modules/functions/config_interface.sh b/tools/modules/functions/config_interface.sh index 51172eb66..796d19acc 100644 --- a/tools/modules/functions/config_interface.sh +++ b/tools/modules/functions/config_interface.sh @@ -357,13 +357,13 @@ function get_user_continue() { # Functions to display warning for 10 seconds with a gauge # module_options+=( - ["info_wait_autocontinue,author"]="@igorpecovnik" - ["info_wait_autocontinue,ref_link"]="" - ["info_wait_autocontinue,feature"]="info_wait_autocontinue" - ["info_wait_autocontinue,desc"]="Display a warning with a gauge for 10 seconds then continue" - ["info_wait_autocontinue,example"]="" - ["info_wait_autocontinue,doc_link"]="" - ["info_wait_autocontinue,status"]="Active" + ["info_wait_autocontinue,author"]="@igorpecovnik" + ["info_wait_autocontinue,ref_link"]="" + ["info_wait_autocontinue,feature"]="info_wait_autocontinue" + ["info_wait_autocontinue,desc"]="Display a warning with a gauge for 10 seconds then continue" + ["info_wait_autocontinue,example"]="" + ["info_wait_autocontinue,doc_link"]="" + ["info_wait_autocontinue,status"]="Active" ) function info_wait_continue() { local message="$1" From 922d49a1560a087751c2d4a24c2c6a85151321f4 Mon Sep 17 00:00:00 2001 From: Joey Turner Date: Wed, 15 Jan 2025 18:13:24 +0000 Subject: [PATCH 3/3] fix style --- tools/modules/functions/config_interface.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/modules/functions/config_interface.sh b/tools/modules/functions/config_interface.sh index 796d19acc..4fd2e2052 100644 --- a/tools/modules/functions/config_interface.sh +++ b/tools/modules/functions/config_interface.sh @@ -367,7 +367,7 @@ module_options+=( ) function info_wait_continue() { local message="$1" - local next_action="$2" + local next_action="$2" { for ((i=0; i<=100; i+=10)); do sleep 1