scuttlebot configuration menu style
This commit is contained in:
parent
d48edfc5f5
commit
85b7fbdecd
|
@ -67,27 +67,20 @@ function scuttlebot_create_invite {
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_interactive_scuttlebot {
|
function configure_interactive_scuttlebot {
|
||||||
|
W=(1 $"Create an invite")
|
||||||
|
|
||||||
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 $"Scuttlebot" --menu $"Choose an operation, or ESC to exit:" 10 60 2 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
--title $"Scuttlebot" \
|
|
||||||
--radiolist $"Choose an operation:" 10 50 2 \
|
if [ ! "$selection" ]; then
|
||||||
1 $"Create an invite" off \
|
break
|
||||||
2 $"Exit" on 2> "$data"
|
fi
|
||||||
sel=$?
|
|
||||||
case $sel in
|
case $selection in
|
||||||
1) rm -f "$data"
|
|
||||||
return;;
|
|
||||||
255) rm -f "$data"
|
|
||||||
return;;
|
|
||||||
esac
|
|
||||||
case $(cat "$data") in
|
|
||||||
1) scuttlebot_create_invite;;
|
1) scuttlebot_create_invite;;
|
||||||
2) rm -f "$data"
|
|
||||||
break;;
|
|
||||||
esac
|
esac
|
||||||
rm -f "$data"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue