xmpp configuration menu style

This commit is contained in:
Bob Mottram 2018-04-04 13:20:20 +01:00
parent 6fd1d1a5ed
commit 1e1134ffd3
1 changed files with 11 additions and 18 deletions

View File

@ -181,29 +181,22 @@ function xmpp_remove_onion_address_interactive {
} }
function configure_interactive_xmpp { function configure_interactive_xmpp {
W=(1 $"Add an ICANN to onion domain mapping"
2 $"Remove an ICANN to onion domain mapping")
while true while true
do do
data=$(mktemp 2>/dev/null) # shellcheck disable=SC2068
dialog --backtitle $"Freedombone Control Panel" \ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"XMPP" --menu $"Choose an operation, or ESC to exit:" 10 60 2 "${W[@]}" 3>&2 2>&1 1>&3)
--title $"XMPP" \
--radiolist $"Choose an operation:" 12 70 3 \ if [ ! "$selection" ]; then
1 $"Add an ICANN to onion domain mapping" off \ break
2 $"Remove an ICANN to onion domain mapping" off \ fi
3 $"Return to administrator control panel" on 2> "$data"
sel=$? case $selection in
case $sel in
1) rm -f "$data"
return;;
255) rm -f "$data"
return;;
esac
case $(cat "$data") in
1) xmpp_add_onion_address_interactive;; 1) xmpp_add_onion_address_interactive;;
2) xmpp_remove_onion_address_interactive;; 2) xmpp_remove_onion_address_interactive;;
3) rm -f "$data"
break;;
esac esac
rm -f "$data"
done done
} }