peertube configuration menu style

This commit is contained in:
Bob Mottram 2018-04-04 12:28:09 +01:00
parent 5cfbb1dc10
commit 56825ad323
1 changed files with 13 additions and 18 deletions

View File

@ -382,31 +382,26 @@ function peertube_import_videos {
}
function configure_interactive_peertube {
W=(1 $"Set administrator email address"
2 $"Disable or enable signups"
3 $"Import videos from YouTube/Vimeo/Dailymotion"
4 $"Import video from file")
while true
do
data=$(mktemp 2>/dev/null)
dialog --backtitle $"Freedombone Control Panel" \
--title $"PeerTube" \
--radiolist $"Choose an operation:" 12 70 6 \
1 $"Set administrator email address" off \
2 $"Disable or enable signups" off \
3 $"Import videos from YouTube/Vimeo/Dailymotion" off \
4 $"Import video from file" off \
5 $"Exit" on 2> "$data"
sel=$?
case $sel in
1) break;;
255) break;;
esac
case $(cat "$data") in
# shellcheck disable=SC2068
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"PeerTube" --menu $"Choose an operation, or ESC to exit:" 24 60 24 "${W[@]}" 3>&2 2>&1 1>&3)
if [ ! "$selection" ]; then
break
fi
case $selection in
1) peertube_set_admin_email;;
2) peertube_disable_signups;;
3) peertube_import_videos;;
4) peertube_import_from_file;;
5) rm -f "$data"
break;;
esac
rm -f "$data"
done
}