Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distro verification: Display warning for 10 seconds and auto continue #371

Merged
merged 3 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions tools/modules/functions/check_distro_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down
24 changes: 24 additions & 0 deletions tools/modules/functions/config_interface.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"]=""
Expand Down
Loading