feature: remove voron branding from mainsail ui

This commit is contained in:
th33xitus
2020-08-12 17:34:53 +02:00
parent a782fecd25
commit 66e9069687
5 changed files with 76 additions and 2 deletions

View File

@@ -351,4 +351,40 @@ set_hostname(){
warn_msg "'$NEW_HOSTNAME' is not a valid hostname!"
fi
done
}
remove_branding(){
echo
top_border
echo -e "| This action will remove the Voron brandings from |"
echo -e "| your Mainsail installation. You have to perform |"
echo -e "| this action again, everytime you updated Mainsail. |"
bottom_border
while true; do
echo -e "${cyan}"
read -p "###### Do you want to continue? (Y/n): " yn
echo -e "${default}"
case "$yn" in
Y|y|Yes|yes|"")
cd $MAINSAIL_DIR/css
FILE=$(find -name "app.*.css" | cut -d"/" -f2)
status_msg "Patching file '$FILE' ..."
cp -n $KLIPPER_DIR/docs/img/klipper-logo-small.png $MAINSAIL_DIR/img/
#write extra lines to app.css
echo >> $FILE
cat < ${HOME}/kiauh/resources/app.css >> $FILE
ok_msg "File '$FILE' patched!"
status_msg "Setting new Favicon ..."
#backup old favicon
cp -n $MAINSAIL_DIR/favicon.ico $MAINSAIL_DIR/voron_favicon.ico
cp ${HOME}/kiauh/resources/favicon.ico $MAINSAIL_DIR/favicon.ico
ok_msg "Icon set!"
echo
ok_msg "Brandings removed!"
ok_msg "Clear browser cache and reload Mainsail (F5)!"
echo
break;;
N|n|No|no) break;;
esac
done
}

View File

@@ -116,8 +116,8 @@ advanced_ui(){
echo -e "| Klipper: | System: | "
echo -e "| 1) [Switch Version] | 8) [Change hostname] | "
echo -e "| 2) [Rollback] | | "
echo -e "| | | "
echo -e "| Firmware: | | "
echo -e "| | Mainsail: | "
echo -e "| Firmware: | 9) [Remove branding] | "
echo -e "| 3) [Build Firmware] | | "
echo -e "| 4) [Flash MCU] | | "
echo -e "| 5) [Get Printer-ID] | | "