|
@@ -674,33 +674,26 @@ function configure_interactive_pleroma {
|
674
|
674
|
read_config_param PLEROMA_EXPIRE_MONTHS
|
675
|
675
|
while true
|
676
|
676
|
do
|
677
|
|
- data=$(mktemp 2>/dev/null)
|
678
|
|
- dialog --backtitle $"Freedombone Control Panel" \
|
679
|
|
- --title $"Pleroma" \
|
680
|
|
- --radiolist $"Choose an operation:" 15 70 6 \
|
681
|
|
- 1 $"Set a background image" off \
|
682
|
|
- 2 $"Set the title" off \
|
683
|
|
- 3 $"Disable new account registrations" off \
|
684
|
|
- 4 $"Add a custom emoji" off \
|
685
|
|
- 5 $"Set post expiry period (currently $PLEROMA_EXPIRE_MONTHS months)" off \
|
686
|
|
- 6 $"Exit" on 2> "$data"
|
687
|
|
- sel=$?
|
688
|
|
- case $sel in
|
689
|
|
- 1) rm -f "$data"
|
690
|
|
- return;;
|
691
|
|
- 255) rm -f "$data"
|
692
|
|
- return;;
|
693
|
|
- esac
|
694
|
|
- case $(cat "$data") in
|
|
677
|
+ W=(1 $"Set a background image"
|
|
678
|
+ 2 $"Set the title"
|
|
679
|
+ 3 $"Disable new account registrations"
|
|
680
|
+ 4 $"Add a custom emoji"
|
|
681
|
+ 5 $"Set post expiry period (currently $PLEROMA_EXPIRE_MONTHS months)")
|
|
682
|
+
|
|
683
|
+ # shellcheck disable=SC2068
|
|
684
|
+ 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)
|
|
685
|
+
|
|
686
|
+ if [ ! "$selection" ]; then
|
|
687
|
+ break
|
|
688
|
+ fi
|
|
689
|
+
|
|
690
|
+ case $selection in
|
695
|
691
|
1) pleroma_set_background_image;;
|
696
|
692
|
2) pleroma_set_title;;
|
697
|
693
|
3) pleroma_disable_registrations;;
|
698
|
694
|
4) pleroma_add_emoji;;
|
699
|
695
|
5) pleroma_set_expire_months;;
|
700
|
|
- 6) rm -f "$data"
|
701
|
|
- break;;
|
702
|
696
|
esac
|
703
|
|
- rm -f "$data"
|
704
|
697
|
done
|
705
|
698
|
}
|
706
|
699
|
|