feat: add mainsail theme installer

This commit is contained in:
th33xitus
2021-03-22 10:55:24 +01:00
parent 749293dde0
commit 7c7dd4ec3c
3 changed files with 121 additions and 8 deletions

33
scripts/ui/ms_theme_menu.sh Executable file
View File

@@ -0,0 +1,33 @@
ms_theme_ui(){
top_border
echo -e "| ${red}~~~~~~~~ [ Mainsail Theme Installer ] ~~~~~~~${default} | "
hr
echo -e "| Please note: | "
echo -e "| Installing a theme from this menu will overwrite an | "
echo -e "| already installed theme or modified custom.css file! | "
hr
echo -e "| Theme: | "
echo -e "| 1) [Dracula] | "
echo -e "| | "
echo -e "| R) [Remove Theme] | "
echo -e "| | "
quit_footer
}
ms_theme_menu(){
do_action "" "ms_theme_ui"
while true; do
read -p "${cyan}Perform action:${default} " action; echo
case "$action" in
1)
do_action "ms_theme_dracula" "ms_theme_ui";;
R|r)
do_action "ms_theme_delete" "ms_theme_ui";;
Q|q)
clear; advanced_menu; break;;
*)
deny_action "ms_theme_ui";;
esac
done
ms_theme_menu
}