postactiv configuration menu style
This commit is contained in:
parent
70ef18780a
commit
e47bf36beb
|
@ -317,38 +317,31 @@ function postactiv_set_expire_months {
|
|||
}
|
||||
|
||||
function configure_interactive_postactiv {
|
||||
W=(1 $"Set a background image"
|
||||
2 $"Set the title"
|
||||
3 $"Set post expiry period (currently $POSTACTIV_EXPIRE_MONTHS months)"
|
||||
4 $"Select Qvitter user interface"
|
||||
5 $"Select Pleroma user interface"
|
||||
6 $"Select Classic user interface")
|
||||
|
||||
read_config_param "POSTACTIV_EXPIRE_MONTHS"
|
||||
while true
|
||||
do
|
||||
data=$(mktemp 2>/dev/null)
|
||||
dialog --backtitle $"Freedombone Control Panel" \
|
||||
--title $"PostActiv" \
|
||||
--radiolist $"Choose an operation:" 16 70 7 \
|
||||
1 $"Set a background image" off \
|
||||
2 $"Set the title" off \
|
||||
3 $"Set post expiry period (currently $POSTACTIV_EXPIRE_MONTHS months)" off \
|
||||
4 $"Select Qvitter user interface" off \
|
||||
5 $"Select Pleroma user interface" off \
|
||||
6 $"Select Classic user interface" off \
|
||||
7 $"Exit" on 2> "$data"
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) rm -f "$data"
|
||||
return;;
|
||||
255) rm -f "$data"
|
||||
return;;
|
||||
esac
|
||||
case $(cat "$data") in
|
||||
# shellcheck disable=SC2068
|
||||
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"PostActiv" --menu $"Choose an operation, or ESC to exit:" 15 60 6 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||
|
||||
if [ ! "$selection" ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
case $selection in
|
||||
1) postactiv_set_background_image;;
|
||||
2) postactiv_set_title;;
|
||||
3) postactiv_set_expire_months;;
|
||||
4) gnusocial_use_qvitter postactiv;;
|
||||
5) gnusocial_use_pleroma postactiv;;
|
||||
6) gnusocial_use_classic postactiv;;
|
||||
7) rm -f "$data"
|
||||
break;;
|
||||
esac
|
||||
rm -f "$data"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue