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 { 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 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 $"PeerTube" --menu $"Choose an operation, or ESC to exit:" 24 60 24 "${W[@]}" 3>&2 2>&1 1>&3)
--title $"PeerTube" \
--radiolist $"Choose an operation:" 12 70 6 \ if [ ! "$selection" ]; then
1 $"Set administrator email address" off \ break
2 $"Disable or enable signups" off \ fi
3 $"Import videos from YouTube/Vimeo/Dailymotion" off \
4 $"Import video from file" off \ case $selection in
5 $"Exit" on 2> "$data"
sel=$?
case $sel in
1) break;;
255) break;;
esac
case $(cat "$data") in
1) peertube_set_admin_email;; 1) peertube_set_admin_email;;
2) peertube_disable_signups;; 2) peertube_disable_signups;;
3) peertube_import_videos;; 3) peertube_import_videos;;
4) peertube_import_from_file;; 4) peertube_import_from_file;;
5) rm -f "$data"
break;;
esac esac
rm -f "$data"
done done
} }