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 { function configure_interactive_tahoelafs {
data=$(mktemp 2>/dev/null) W=(1 $"Add a storage node"
dialog --backtitle $"Freedombone Configuration" \ 2 $"Manually edit storage nodes"
--title $"Tahoe-LAFS" \ 3 $"Shares settings")
--radiolist $"The least authority is always the best" 11 50 5 \
1 "Add a storage node" off \ while true
2 "Manually edit storage nodes" off \ do
3 "Shares settings" off \ # shellcheck disable=SC2068
4 "Back to main menu" on 2> "$data" 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)
sel=$?
case $sel in if [ ! "$selection" ]; then
1) rm -f "$data" break
exit 1;; fi
255) rm -f "$data"
exit 1;; case $selection in
esac 1) add_tahoelafs_storage_node_interactive;;
case $(cat "$data") in 2) edit_tahoelafs_nodes;;
1) add_tahoelafs_storage_node_interactive;; 3) edit_tahoelafs_shares;;
2) edit_tahoelafs_nodes;; esac
3) edit_tahoelafs_shares;; done
esac
rm -f "$data"
} }
function tahoelafs_setup_client_config { function tahoelafs_setup_client_config {