function: re-enable the branding removal function

This commit is contained in:
th33xitus
2020-09-02 22:22:10 +02:00
parent 03c3c3d50f
commit 8899275022
2 changed files with 47 additions and 43 deletions

View File

@@ -189,39 +189,43 @@ print_error(){
fi fi
} }
#remove_branding(){ remove_branding(){
# echo echo
# top_border top_border
# echo -e "| This action will remove the Voron brandings from |" echo -e "| This action will replace the Mainsail logo and |"
# echo -e "| your Mainsail installation. You have to perform |" echo -e "| Favicon with the Klipper logo. Also the Voron |"
# echo -e "| this action again, everytime you updated Mainsail. |" echo -e "| background image of the sidebar will be replaced by |"
# bottom_border echo -e "| a carbon fibre style CSS pattern. |"
# while true; do hr
# read -p "${cyan}###### Do you want to continue? (Y/n):${default} " yn echo -e "| Note: You have to perform this action again, |"
# case "$yn" in echo -e "| everytime you update Mainsail. |"
# Y|y|Yes|yes|"") bottom_border
# cd $MAINSAIL_DIR/css while true; do
# FILE=$(find -name "app.*.css" | cut -d"/" -f2) read -p "${cyan}###### Do you want to continue? (Y/n):${default} " yn
# status_msg "Patching file '$FILE' ..." case "$yn" in
# cp -n $KLIPPER_DIR/docs/img/klipper-logo-small.png $MAINSAIL_DIR/img/ Y|y|Yes|yes|"")
# #write extra lines to app.css cd $MAINSAIL_DIR/css
# echo >> "$FILE" FILE=$(find -name "app.*.css" | cut -d"/" -f2)
# cat < ${HOME}/kiauh/resources/app.css >> "$FILE" status_msg "Patching file '$FILE' ..."
# ok_msg "File '$FILE' patched!" cp -n $KLIPPER_DIR/docs/img/klipper-logo-small.png $MAINSAIL_DIR/img/
# status_msg "Setting new Favicon ..." #write extra lines to app.css
# #backup old favicon echo >> "$FILE"
# cp -n $MAINSAIL_DIR/favicon.ico $MAINSAIL_DIR/voron_favicon.ico cat < ${HOME}/kiauh/resources/app.css >> "$FILE"
# cp ${HOME}/kiauh/resources/favicon.ico $MAINSAIL_DIR/favicon.ico ok_msg "File '$FILE' patched!"
# ok_msg "Icon set!" status_msg "Setting new Favicon ..."
# echo #backup old favicon
# ok_msg "Brandings removed!" cp -n $MAINSAIL_DIR/favicon.ico $MAINSAIL_DIR/voron_favicon.ico
# ok_msg "Clear browser cache and reload Mainsail (F5)!" cp ${HOME}/kiauh/resources/favicon.ico $MAINSAIL_DIR/favicon.ico
# echo ok_msg "Icon set!"
# break;; echo
# N|n|No|no) break;; ok_msg "Brandings removed!"
# esac ok_msg "Clear browser cache and reload Mainsail (F5)!"
# done echo
#} break;;
N|n|No|no) break;;
esac
done
}
install_extension_shell_command(){ install_extension_shell_command(){
echo echo

View File

@@ -8,11 +8,11 @@ advanced_ui(){
echo -e "| Klipper: | System: | " echo -e "| Klipper: | System: | "
echo -e "| 1) [Switch Version] | 6) [Change hostname] | " echo -e "| 1) [Switch Version] | 6) [Change hostname] | "
echo -e "| 2) [Rollback] | | " echo -e "| 2) [Rollback] | | "
echo -e "| | Extensions: | " echo -e "| | Mainsail: | "
echo -e "| Firmware: | 7) [Shell Command] | " echo -e "| Firmware: | 7) [Remove branding] | "
echo -e "| 3) [Build only] | | " echo -e "| 3) [Build only] | | "
echo -e "| 4) [Build + Flash MCU] | | " echo -e "| 4) [Build + Flash MCU] | Extensions: | "
echo -e "| 5) [Get Printer-USB] | | " echo -e "| 5) [Get Printer-USB] | 8) [Shell Command] | "
echo -e "| | | " echo -e "| | | "
quit_footer quit_footer
} }
@@ -76,13 +76,13 @@ advanced_menu(){
create_custom_hostname create_custom_hostname
print_msg && clear_msg print_msg && clear_msg
advanced_ui;; advanced_ui;;
#7)
# clear
# print_header
# remove_branding
# print_msg && clear_msg
# advanced_ui;;
7) 7)
clear
print_header
remove_branding
print_msg && clear_msg
advanced_ui;;
8)
clear clear
print_header print_header
install_extension_shell_command install_extension_shell_command