|
@@ -303,37 +303,31 @@ function gnusocial_set_expire_months {
|
303
|
303
|
}
|
304
|
304
|
|
305
|
305
|
function configure_interactive_gnusocial {
|
|
306
|
+ W=(1 $"Set a background image"
|
|
307
|
+ 2 $"Set the title"
|
|
308
|
+ 3 $"Set post expiry period (currently $GNUSOCIAL_EXPIRE_MONTHS months)"
|
|
309
|
+ 4 $"Select Qvitter user interface"
|
|
310
|
+ 5 $"Select Pleroma user interface"
|
|
311
|
+ 6 $"Select Classic user interface")
|
|
312
|
+
|
306
|
313
|
read_config_param GNUSOCIAL_EXPIRE_MONTHS
|
307
|
314
|
while true
|
308
|
315
|
do
|
309
|
|
- data=$(mktemp 2>/dev/null)
|
310
|
|
- dialog --backtitle $"Freedombone Control Panel" \
|
311
|
|
- --title $"GNU Social" \
|
312
|
|
- --radiolist $"Choose an operation:" 16 70 7 \
|
313
|
|
- 1 $"Set a background image" off \
|
314
|
|
- 2 $"Set the title" off \
|
315
|
|
- 3 $"Set post expiry period (currently $GNUSOCIAL_EXPIRE_MONTHS months)" off \
|
316
|
|
- 4 $"Select Qvitter user interface" off \
|
317
|
|
- 5 $"Select Pleroma user interface" off \
|
318
|
|
- 6 $"Select Classic user interface" off \
|
319
|
|
- 7 $"Exit" on 2> "$data"
|
320
|
|
- sel=$?
|
321
|
|
- case $sel in
|
322
|
|
- 1) rm -f "$data"
|
323
|
|
- return;;
|
324
|
|
- 255) rm -f "$data"
|
325
|
|
- return;;
|
326
|
|
- esac
|
327
|
|
- case $(cat "$data") in
|
|
316
|
+ # shellcheck disable=SC2068
|
|
317
|
+ 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)
|
|
318
|
+
|
|
319
|
+ if [ ! "$selection" ]; then
|
|
320
|
+ break
|
|
321
|
+ fi
|
|
322
|
+
|
|
323
|
+ case $selection in
|
328
|
324
|
1) gnusocial_set_background_image;;
|
329
|
325
|
2) gnusocial_set_title;;
|
330
|
326
|
3) gnusocial_set_expire_months;;
|
331
|
327
|
4) gnusocial_use_qvitter gnusocial;;
|
332
|
328
|
5) gnusocial_use_pleroma gnusocial;;
|
333
|
329
|
6) gnusocial_use_classic gnusocial;;
|
334
|
|
- 7) break;;
|
335
|
330
|
esac
|
336
|
|
- rm -f "$data"
|
337
|
331
|
done
|
338
|
332
|
}
|
339
|
333
|
|