Make the linking step more user-friendly
This commit is contained in:
@@ -203,8 +203,8 @@ function moonraker_obico_setup_dialog() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
### Step 7: Link to the Obico server if necessary
|
### Step 7: Link to the Obico server if necessary
|
||||||
if [[ -n ${moonraker_obico_services} ]]; then
|
local not_linked_instances=()
|
||||||
for service in ${moonraker_obico_services}; do
|
for service in $(moonraker_obico_systemd); do
|
||||||
local instance_name="$(get_instance_name ${service})"
|
local instance_name="$(get_instance_name ${service})"
|
||||||
if ! is_moonraker_obico_linked "${instance_name}"; then
|
if ! is_moonraker_obico_linked "${instance_name}"; then
|
||||||
not_linked_instances+=( "${instance_name}" )
|
not_linked_instances+=( "${instance_name}" )
|
||||||
@@ -217,19 +217,21 @@ function moonraker_obico_setup_dialog() {
|
|||||||
printf "|${cyan}%-57s${white}|\n" " ●moonrakerobico-${name}"
|
printf "|${cyan}%-57s${white}|\n" " ●moonrakerobico-${name}"
|
||||||
done
|
done
|
||||||
blank_line
|
blank_line
|
||||||
|
echo -e "| To link to your Obico Server account, you need to |"
|
||||||
|
echo -e "| obtain the 6-digit verification code in the Obico |"
|
||||||
|
echo -e "| mobile or web app. For more information, visit: |"
|
||||||
|
echo -e "| https://www.obico.io/docs/user-guides/klipper-setup/ |"
|
||||||
|
blank_line
|
||||||
echo -e "| If you don't want to link the printer now, you can |"
|
echo -e "| If you don't want to link the printer now, you can |"
|
||||||
echo -e "| restart the linking process later by: |"
|
echo -e "| restart the linking process later by: |"
|
||||||
echo -e "| 1. \`cd ~/kiauh && ./kiauh.sh\` to launch KIAUH. |"
|
echo -e "| 1. \`cd ~/kiauh && ./kiauh.sh\` to launch KIAUH. |"
|
||||||
echo -e "| 2. Select ${green}[Install]${white} |"
|
echo -e "| 2. Select ${green}[Install]${white} |"
|
||||||
echo -e "| 3. Select ${green}[Link to Obico Server]${white} |"
|
echo -e "| 3. Select ${green}[Link to Obico Server]${white} |"
|
||||||
blank_line
|
|
||||||
echo -e "| For more information, visit: |"
|
|
||||||
echo -e "| https://www.obico.io/docs/user-guides/klipper-setup/ |"
|
|
||||||
bottom_border
|
bottom_border
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -p "${cyan}###### Link to the Obico Server now? (Y/n):${white} " yn
|
read -p "${cyan}###### Link to your Obico Server account now? (Y/n):${white} " yn
|
||||||
case "${yn}" in
|
case "${yn}" in
|
||||||
Y|y|Yes|yes|"")
|
Y|y|Yes|yes|"")
|
||||||
select_msg "Yes"
|
select_msg "Yes"
|
||||||
@@ -246,9 +248,8 @@ function moonraker_obico_setup_dialog() {
|
|||||||
for name in "${not_linked_instances[@]}"; do
|
for name in "${not_linked_instances[@]}"; do
|
||||||
status_msg "Link moonraker-obico-${name} to the Obico Server..."
|
status_msg "Link moonraker-obico-${name} to the Obico Server..."
|
||||||
moonraker_obico_cfg="$(cfg_dir ${name})/moonraker-obico.cfg"
|
moonraker_obico_cfg="$(cfg_dir ${name})/moonraker-obico.cfg"
|
||||||
"${MOONRAKER_OBICO_DIR}/scripts/link.sh" -n "${name}" -c "${moonraker_obico_cfg}"
|
"${MOONRAKER_OBICO_DIR}/scripts/link.sh" -q -n "${name}" -c "${moonraker_obico_cfg}"
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user