mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-13 10:34:28 +05:00
feat: add mainsail theme installer
This commit is contained in:
@@ -5,14 +5,14 @@ advanced_ui(){
|
||||
echo -e "| 0) $OPRINT_SERVICE_STATUS| "
|
||||
hr
|
||||
echo -e "| | | "
|
||||
echo -e "| Klipper: | System: | "
|
||||
echo -e "| 1) [Switch Version] | 7) [Change hostname] | "
|
||||
echo -e "| Klipper: | Mainsail: | "
|
||||
echo -e "| 1) [Switch Version] | 7) [Theme installer] | "
|
||||
echo -e "| 2) [Rollback] | | "
|
||||
echo -e "| | Extensions: | "
|
||||
echo -e "| Firmware: | 8) [Shell Command] | "
|
||||
echo -e "| | System: | "
|
||||
echo -e "| Firmware: | 8) [Change hostname] | "
|
||||
echo -e "| 3) [Build only] | | "
|
||||
echo -e "| 4) [Build + Flash] | | "
|
||||
echo -e "| 5) [Build + SD Flash] | | "
|
||||
echo -e "| 4) [Build + Flash] | Extensions: | "
|
||||
echo -e "| 5) [Build + SD Flash] | 9) [Shell Command] | "
|
||||
echo -e "| 6) [Get MCU ID] | | "
|
||||
quit_footer
|
||||
}
|
||||
@@ -31,7 +31,7 @@ advanced_menu(){
|
||||
print_msg && clear_msg
|
||||
advanced_ui;;
|
||||
1)
|
||||
do_action "switch_menu" "advanced_ui";;
|
||||
do_action "switch_menu";;
|
||||
2)
|
||||
do_action "load_klipper_state" "advanced_ui";;
|
||||
3)
|
||||
@@ -57,12 +57,14 @@ advanced_menu(){
|
||||
6)
|
||||
do_action "get_mcu_id" "advanced_ui";;
|
||||
7)
|
||||
do_action "ms_theme_menu";;
|
||||
8)
|
||||
clear
|
||||
print_header
|
||||
create_custom_hostname && set_hostname
|
||||
print_msg && clear_msg
|
||||
advanced_ui;;
|
||||
8)
|
||||
9)
|
||||
do_action "setup_gcode_shell_command" "advanced_ui";;
|
||||
Q|q)
|
||||
clear; main_menu; break;;
|
||||
|
||||
33
scripts/ui/ms_theme_menu.sh
Executable file
33
scripts/ui/ms_theme_menu.sh
Executable 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
|
||||
}
|
||||
Reference in New Issue
Block a user