Add display wiki option in troubleshooting menu

This commit is contained in:
the Sane 2022-01-06 21:08:01 -05:00 committed by GitHub
parent 8e28327e0f
commit a328b465ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1437,6 +1437,17 @@ install_game() {
fi fi
} }
# Display the LUG Wiki
display_wiki() {
if [ -x "$(command -v xdg-open)" ]; then
# Open the link in the default browser if xdg-open is available
xdg-open "$lug_wiki" >/dev/null 2>&1
fi
# Display a message containing the URL
message info "See the Wiki for our Quick-Start Guide, Manual Installation instructions,\nPerformance Tuning, and Common Issues and Solutions:\n\n$lug_wiki"
}
# Delete the shaders directory # Delete the shaders directory
rm_shaders() { rm_shaders() {
# Get/Set directory paths # Get/Set directory paths
@ -1500,13 +1511,14 @@ maintenance_menu() {
shaders_msg="Delete my shaders folder only (Do this after each game update)" shaders_msg="Delete my shaders folder only (Do this after each game update)"
vidcache_msg="Delete my DXVK cache" vidcache_msg="Delete my DXVK cache"
dirs_msg="Display Helper and Star Citizen directories" dirs_msg="Display Helper and Star Citizen directories"
wiki_msg="Show the LUG Wiki"
reset_msg="Reset Helper configs" reset_msg="Reset Helper configs"
quit_msg="Return to the main menu" quit_msg="Return to the main menu"
# Set the options to be displayed in the menu # Set the options to be displayed in the menu
menu_options=("$version_msg" "$sanitize_msg" "$shaders_msg" "$vidcache_msg" "$dirs_msg" "$reset_msg" "$quit_msg") menu_options=("$version_msg" "$sanitize_msg" "$shaders_msg" "$vidcache_msg" "$dirs_msg" "$wiki_msg" "$reset_msg" "$quit_msg")
# Set the corresponding functions to be called for each of the options # Set the corresponding functions to be called for each of the options
menu_actions=("set_version" "sanitize" "rm_shaders" "rm_dxvkcache" "display_dirs" "reset_helper" "menu_loop_done") menu_actions=("set_version" "sanitize" "rm_shaders" "rm_dxvkcache" "display_dirs" "display_wiki" "reset_helper" "menu_loop_done")
# Calculate the total height the menu should be # Calculate the total height the menu should be
menu_height="$(($menu_option_height * ${#menu_options[@]} + $menu_text_height))" menu_height="$(($menu_option_height * ${#menu_options[@]} + $menu_text_height))"