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 {
|
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"
|
read_config_param "POSTACTIV_EXPIRE_MONTHS"
|
||||||
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 $"PostActiv" --menu $"Choose an operation, or ESC to exit:" 15 60 6 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
--title $"PostActiv" \
|
|
||||||
--radiolist $"Choose an operation:" 16 70 7 \
|
if [ ! "$selection" ]; then
|
||||||
1 $"Set a background image" off \
|
break
|
||||||
2 $"Set the title" off \
|
fi
|
||||||
3 $"Set post expiry period (currently $POSTACTIV_EXPIRE_MONTHS months)" off \
|
|
||||||
4 $"Select Qvitter user interface" off \
|
case $selection in
|
||||||
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
|
|
||||||
1) postactiv_set_background_image;;
|
1) postactiv_set_background_image;;
|
||||||
2) postactiv_set_title;;
|
2) postactiv_set_title;;
|
||||||
3) postactiv_set_expire_months;;
|
3) postactiv_set_expire_months;;
|
||||||
4) gnusocial_use_qvitter postactiv;;
|
4) gnusocial_use_qvitter postactiv;;
|
||||||
5) gnusocial_use_pleroma postactiv;;
|
5) gnusocial_use_pleroma postactiv;;
|
||||||
6) gnusocial_use_classic postactiv;;
|
6) gnusocial_use_classic postactiv;;
|
||||||
7) rm -f "$data"
|
|
||||||
break;;
|
|
||||||
esac
|
esac
|
||||||
rm -f "$data"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue