fix cursor placement

This commit is contained in:
ash
2026-05-29 11:11:23 +01:00
parent 72cba64e23
commit f5121bc1c5
+16 -7
View File
@@ -88,15 +88,25 @@ add_config() {
[[ -z "$SERVICE" ]] && { gum style --foreground "red" " Aborted no service name given."; press_enter; return; }
# Domain pre-filled with common suffix; type the subdomain then arrow to end
DOMAIN=$(gum input \
--prompt " Domain: " \
# Domain type subdomain only, suffix appended automatically
SUBDOMAIN=$(gum input \
--prompt " Subdomain: " \
--prompt.foreground "$ORANGE" \
--value ".marlow.quest" \
--width 40 \
--placeholder "e.g. homarr (will become homarr.marlow.quest)" \
--width 50 \
--cursor.foreground "$ORANGE")
[[ -z "$DOMAIN" ]] && { gum style --foreground "red" " Aborted no domain given."; press_enter; return; }
[[ -z "$SUBDOMAIN" ]] && { gum style --foreground "red" " Aborted no domain given."; press_enter; return; }
# If they typed a full domain (contains a dot) use as-is, otherwise append suffix
if [[ "$SUBDOMAIN" == *.* ]]; then
DOMAIN="$SUBDOMAIN"
else
DOMAIN="${SUBDOMAIN}.marlow.quest"
fi
gum style --foreground "$GREY_LIGHT" --margin "0 2" "${DOMAIN}"
echo ""
# Upstream IP:port pre-filled with common subnet prefix
UPSTREAM=$(gum input \
@@ -123,7 +133,6 @@ add_config() {
if [[ "$USE_TINYAUTH" == "Yes" ]]; then
CONFIG_BLOCK="${DOMAIN} {
import tinyauth
}
reverse_proxy ${UPSTREAM}
}"