diff --git a/kiauh.sh b/kiauh.sh index cb4b581..c5c4b01 100755 --- a/kiauh.sh +++ b/kiauh.sh @@ -378,6 +378,12 @@ advanced_menu(){ create_custom_hostname print_msg && clear_msg advanced_ui;; + 9) + clear + print_header + remove_branding + print_msg && clear_msg + advanced_ui;; Q|q) clear; main_menu; break;; *) diff --git a/resources/app.css b/resources/app.css new file mode 100644 index 0000000..bded3f2 --- /dev/null +++ b/resources/app.css @@ -0,0 +1,32 @@ +/*KIAUH-REMOVE-VORON-BRANDING*/ +#nav-header img:first-child { + display: block; + -moz-box-sizing: border-box; + box-sizing: border-box; + background: url(/img/klipper-logo-small.png) no-repeat; + width: 49px; + height: 40px; + padding-left: 49px; +} +div.v-image__image.v-image__image--cover { + display: none; +} +div.v-image.v-responsive.theme--dark { + background: linear-gradient(27deg, #252525 5px, transparent 5px) 0 5px, + linear-gradient(207deg, #252525 5px, transparent 5px) 10px 0px, + linear-gradient(27deg, #323232 5px, transparent 5px) 0px 10px, + linear-gradient(207deg, #323232 5px, transparent 5px) 10px 5px, + linear-gradient(90deg, #2b2b2b 10px, transparent 10px), + linear-gradient( + #2d2d2d 25%, + #2a2a2a 25%, + #2a2a2a 50%, + transparent 50%, + transparent 75%, + #343434 75%, + #343434 + ); + background-color: #232323; + background-size: 20px 20px; + background-clip: content-box; +} diff --git a/resources/favicon.ico b/resources/favicon.ico new file mode 100755 index 0000000..892e690 Binary files /dev/null and b/resources/favicon.ico differ diff --git a/scripts/functions.sh b/scripts/functions.sh index 4843d5b..ec1c1c6 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -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 } \ No newline at end of file diff --git a/scripts/ui.sh b/scripts/ui.sh index ef81f57..9c09a77 100644 --- a/scripts/ui.sh +++ b/scripts/ui.sh @@ -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] | | "