pleroma configuration menu style
This commit is contained in:
parent
e47bf36beb
commit
5deca1d6a1
|
@ -674,33 +674,26 @@ function configure_interactive_pleroma {
|
|||
read_config_param PLEROMA_EXPIRE_MONTHS
|
||||
while true
|
||||
do
|
||||
data=$(mktemp 2>/dev/null)
|
||||
dialog --backtitle $"Freedombone Control Panel" \
|
||||
--title $"Pleroma" \
|
||||
--radiolist $"Choose an operation:" 15 70 6 \
|
||||
1 $"Set a background image" off \
|
||||
2 $"Set the title" off \
|
||||
3 $"Disable new account registrations" off \
|
||||
4 $"Add a custom emoji" off \
|
||||
5 $"Set post expiry period (currently $PLEROMA_EXPIRE_MONTHS months)" off \
|
||||
6 $"Exit" on 2> "$data"
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) rm -f "$data"
|
||||
return;;
|
||||
255) rm -f "$data"
|
||||
return;;
|
||||
esac
|
||||
case $(cat "$data") in
|
||||
W=(1 $"Set a background image"
|
||||
2 $"Set the title"
|
||||
3 $"Disable new account registrations"
|
||||
4 $"Add a custom emoji"
|
||||
5 $"Set post expiry period (currently $PLEROMA_EXPIRE_MONTHS months)")
|
||||
|
||||
# shellcheck disable=SC2068
|
||||
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Pleroma" --menu $"Choose an operation, or ESC to exit:" 14 60 5 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||
|
||||
if [ ! "$selection" ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
case $selection in
|
||||
1) pleroma_set_background_image;;
|
||||
2) pleroma_set_title;;
|
||||
3) pleroma_disable_registrations;;
|
||||
4) pleroma_add_emoji;;
|
||||
5) pleroma_set_expire_months;;
|
||||
6) rm -f "$data"
|
||||
break;;
|
||||
esac
|
||||
rm -f "$data"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue