gnusocial configuration menu style
This commit is contained in:
parent
54ec3b2dda
commit
70ef18780a
|
@ -303,37 +303,31 @@ function gnusocial_set_expire_months {
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_interactive_gnusocial {
|
function configure_interactive_gnusocial {
|
||||||
|
W=(1 $"Set a background image"
|
||||||
|
2 $"Set the title"
|
||||||
|
3 $"Set post expiry period (currently $GNUSOCIAL_EXPIRE_MONTHS months)"
|
||||||
|
4 $"Select Qvitter user interface"
|
||||||
|
5 $"Select Pleroma user interface"
|
||||||
|
6 $"Select Classic user interface")
|
||||||
|
|
||||||
read_config_param GNUSOCIAL_EXPIRE_MONTHS
|
read_config_param GNUSOCIAL_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 $"GNU Social" --menu $"Choose an operation, or ESC to exit:" 15 60 6 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
--title $"GNU Social" \
|
|
||||||
--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 $GNUSOCIAL_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) gnusocial_set_background_image;;
|
1) gnusocial_set_background_image;;
|
||||||
2) gnusocial_set_title;;
|
2) gnusocial_set_title;;
|
||||||
3) gnusocial_set_expire_months;;
|
3) gnusocial_set_expire_months;;
|
||||||
4) gnusocial_use_qvitter gnusocial;;
|
4) gnusocial_use_qvitter gnusocial;;
|
||||||
5) gnusocial_use_pleroma gnusocial;;
|
5) gnusocial_use_pleroma gnusocial;;
|
||||||
6) gnusocial_use_classic gnusocial;;
|
6) gnusocial_use_classic gnusocial;;
|
||||||
7) break;;
|
|
||||||
esac
|
esac
|
||||||
rm -f "$data"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue