Edith configuration menu style
This commit is contained in:
parent
cfa652cbff
commit
2cbcf7b143
|
@ -131,29 +131,22 @@ function edith_browse {
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_interactive_edith {
|
function configure_interactive_edith {
|
||||||
|
W=(1 $"Enable login"
|
||||||
|
2 $"Browse notes")
|
||||||
|
|
||||||
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 $"Edith" --menu $"Choose an operation, or ESC to exit:" 10 60 2 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
--title $"Edith" \
|
|
||||||
--radiolist $"Choose an operation:" 10 50 3 \
|
if [ ! "$selection" ]; then
|
||||||
1 $"Enable login" off \
|
break
|
||||||
2 $"Browse notes" off \
|
fi
|
||||||
3 $"Exit" on 2> "$data"
|
|
||||||
sel=$?
|
case $selection in
|
||||||
case $sel in
|
|
||||||
1) rm -f "$data"
|
|
||||||
break;;
|
|
||||||
255) rm -f "$data"
|
|
||||||
break;;
|
|
||||||
esac
|
|
||||||
case $(cat "$data") in
|
|
||||||
1) edith_enable_login;;
|
1) edith_enable_login;;
|
||||||
2) edith_browse;;
|
2) edith_browse;;
|
||||||
3) rm -f "$data"
|
|
||||||
break;;
|
|
||||||
esac
|
esac
|
||||||
rm -f "$data"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue