fix(ui): replace top_border and bottom_border functions with inline echo statements for dialogs

This commit is contained in:
dw-0
2025-10-15 17:05:18 +02:00
parent 62b0f4f0f5
commit b6521fd721

View File

@@ -54,15 +54,15 @@ function kiauh_update_avail() {
function kiauh_update_dialog() { function kiauh_update_dialog() {
[[ ! $(kiauh_update_avail) == "true" ]] && return [[ ! $(kiauh_update_avail) == "true" ]] && return
top_border echo -e "/-------------------------------------------------------\\"
echo -e "|${green} New KIAUH update available! ${white}|" echo -e "|${green} New KIAUH update available! ${white}|"
hr echo -e "|-------------------------------------------------------|"
echo -e "|${green} View Changelog: https://git.io/JnmlX ${white}|" echo -e "|${green} View Changelog: https://git.io/JnmlX ${white}|"
blank_line echo -e "| |"
echo -e "|${yellow} It is recommended to keep KIAUH up to date. Updates ${white}|" echo -e "|${yellow} It is recommended to keep KIAUH up to date. Updates ${white}|"
echo -e "|${yellow} usually contain bugfixes, important changes or new ${white}|" echo -e "|${yellow} usually contain bugfixes, important changes or new ${white}|"
echo -e "|${yellow} features. Please consider updating! ${white}|" echo -e "|${yellow} features. Please consider updating! ${white}|"
bottom_border echo -e "\-------------------------------------------------------/"
local yn local yn
read -p "${cyan}###### Do you want to update now? (Y/n):${white} " yn read -p "${cyan}###### Do you want to update now? (Y/n):${white} " yn
@@ -82,11 +82,11 @@ function kiauh_update_dialog() {
function check_euid() { function check_euid() {
if [[ ${EUID} -eq 0 ]]; then if [[ ${EUID} -eq 0 ]]; then
echo -e "${red}" echo -e "${red}"
top_border echo -e "/-------------------------------------------------------\\"
echo -e "| !!! THIS SCRIPT MUST NOT RUN AS ROOT !!! |" echo -e "| !!! THIS SCRIPT MUST NOT RUN AS ROOT !!! |"
echo -e "| |" echo -e "| |"
echo -e "| It will ask for credentials as needed. |" echo -e "| It will ask for credentials as needed. |"
bottom_border echo -e "\-------------------------------------------------------/"
echo -e "${white}" echo -e "${white}"
exit 1 exit 1
fi fi
@@ -95,13 +95,13 @@ function check_euid() {
function check_if_ratos() { function check_if_ratos() {
if [[ -n $(which ratos) ]]; then if [[ -n $(which ratos) ]]; then
echo -e "${red}" echo -e "${red}"
top_border echo -e "/-------------------------------------------------------\\"
echo -e "| !!! RatOS 2.1 or greater detected !!! |" echo -e "| !!! RatOS 2.1 or greater detected !!! |"
echo -e "| |" echo -e "| |"
echo -e "| KIAUH does currently not support RatOS. |" echo -e "| KIAUH does currently not support RatOS. |"
echo -e "| If you have any questions, please ask for help on the |" echo -e "| If you have any questions, please ask for help on the |"
echo -e "| RatRig Community Discord: https://discord.gg/ratrig |" echo -e "| RatRig Community Discord: https://discord.gg/ratrig |"
bottom_border echo -e "\-------------------------------------------------------/"
echo -e "${white}" echo -e "${white}"
exit 1 exit 1
fi fi