Loop on the about screen

This commit is contained in:
Bob Mottram 2018-05-08 14:02:43 +01:00
parent 73fe5d686b
commit 863eca60fb
1 changed files with 125 additions and 122 deletions

View File

@ -224,6 +224,8 @@ function show_tor_bridges {
function show_domains {
read_config_param "DEFAULT_DOMAIN_NAME"
while true
do
W=()
W+=("IPv4" "$(get_ipv4_address) / $(get_external_ipv4_address)")
@ -333,7 +335,7 @@ function show_domains {
# shellcheck disable=SC2068
selected=$(dialog --backtitle $"Freedombone Control Panel" --title $"Domains" --menu $"Use Shift+cursors to select and copy onion addresses" $((height-4)) $((width-4)) $((height-4)) "${W[@]}" 3>&2 2>&1 1>&3)
if [ ! "$selected" ]; then
return
break
fi
# obtain the addresses from the key by itterating through
# the array. This is quite crude and maybe there's a better way
@ -351,11 +353,11 @@ function show_domains {
done
# Was the key matched?
if [ ! "$selected_addresses" ]; then
return
break
fi
# addresses were found - is this an onion?
if [[ "$selected_addresses" != *".onion"* ]]; then
return
continue
fi
# There are two forms of addresses: "x / y.onion" and "x.onion"
if [[ "$selected_addresses" == *'/'* ]]; then
@ -368,6 +370,7 @@ function show_domains {
echo "$onion_addr"
echo -n "$onion_addr" | qrencode -t UTF8
any_key
done
}
function show_users {