tahoelafs configuration menu style

This commit is contained in:
Bob Mottram 2018-04-04 13:16:41 +01:00
parent aebb250cb7
commit 054f5a1d16
1 changed files with 19 additions and 21 deletions

View File

@ -188,27 +188,25 @@ function edit_tahoelafs_shares {
}
function configure_interactive_tahoelafs {
data=$(mktemp 2>/dev/null)
dialog --backtitle $"Freedombone Configuration" \
--title $"Tahoe-LAFS" \
--radiolist $"The least authority is always the best" 11 50 5 \
1 "Add a storage node" off \
2 "Manually edit storage nodes" off \
3 "Shares settings" off \
4 "Back to main menu" on 2> "$data"
sel=$?
case $sel in
1) rm -f "$data"
exit 1;;
255) rm -f "$data"
exit 1;;
esac
case $(cat "$data") in
1) add_tahoelafs_storage_node_interactive;;
2) edit_tahoelafs_nodes;;
3) edit_tahoelafs_shares;;
esac
rm -f "$data"
W=(1 $"Add a storage node"
2 $"Manually edit storage nodes"
3 $"Shares settings")
while true
do
# shellcheck disable=SC2068
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Tahoe-LAFS" --menu $"Choose an operation, or ESC to exit:" 12 60 3 "${W[@]}" 3>&2 2>&1 1>&3)
if [ ! "$selection" ]; then
break
fi
case $selection in
1) add_tahoelafs_storage_node_interactive;;
2) edit_tahoelafs_nodes;;
3) edit_tahoelafs_shares;;
esac
done
}
function tahoelafs_setup_client_config {