User control panel menu style
This commit is contained in:
parent
6619ff74ff
commit
8508da2f53
|
@ -2298,7 +2298,7 @@ function menu_top_level {
|
||||||
21 $"Restart the system")
|
21 $"Restart the system")
|
||||||
|
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
selection=$(dialog --backtitle $"Freedombone Control Panel" --title $"Control Panel" --menu $"Choose an operation, or ESC to exit:" 28 60 28 "${W[@]}" 3>&2 2>&1 1>&3)
|
selection=$(dialog --backtitle $"Freedombone Control Panel" --title $"Administrator Control Panel" --menu $"Choose an operation, or ESC to exit:" 28 60 28 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
if [ ! "$selection" ]; then
|
if [ ! "$selection" ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -899,28 +899,24 @@ function show_your_email_address {
|
||||||
function menu_top_level {
|
function menu_top_level {
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
data=$(mktemp 2>/dev/null)
|
W=(1 $"Use Email"
|
||||||
dialog --backtitle $"Freedombone User Control Panel" \
|
2 $"Show your Email Address"
|
||||||
--title $"User Control Panel" \
|
3 $"Change Email Filtering/Blocking Rules"
|
||||||
--radiolist $"Choose an operation:" 20 60 13 \
|
4 $"Run an App"
|
||||||
1 $"Use Email" off \
|
5 $"Browse the Web"
|
||||||
2 $"Show your Email Address" off \
|
6 $"My Encryption Keys"
|
||||||
3 $"Change Email Filtering/Blocking Rules" off \
|
7 $"Set an outgoing email proxy"
|
||||||
4 $"Run an App" off \
|
8 $"Administrator controls"
|
||||||
5 $"Browse the Web" off \
|
9 $"Exit to the command line")
|
||||||
6 $"My Encryption Keys" off \
|
|
||||||
7 $"Set an outgoing email proxy" off \
|
# shellcheck disable=SC2068
|
||||||
8 $"Administrator controls" off \
|
selection=$(dialog --backtitle $"Freedombone Control Panel" --title $"User Control Panel" --menu $"Choose an operation, or ESC to log out:" 20 60 13 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
9 $"Exit to the command line" off \
|
if [ ! "$selection" ]; then
|
||||||
10 $"Log out" on 2> "$data"
|
kill -HUP "$(pgrep -s 0 -o)"
|
||||||
sel=$?
|
break
|
||||||
case $sel in
|
fi
|
||||||
1) rm -f "$data"
|
|
||||||
exit 1;;
|
case $selection in
|
||||||
255) rm -f "$data"
|
|
||||||
exit 1;;
|
|
||||||
esac
|
|
||||||
case $(cat "$data") in
|
|
||||||
1) mutt;;
|
1) mutt;;
|
||||||
2) show_your_email_address;;
|
2) show_your_email_address;;
|
||||||
3) menu_email;;
|
3) menu_email;;
|
||||||
|
@ -929,11 +925,8 @@ function menu_top_level {
|
||||||
6) menu_encryption_keys;;
|
6) menu_encryption_keys;;
|
||||||
7) smtp_proxy;;
|
7) smtp_proxy;;
|
||||||
8) menu_admin;;
|
8) menu_admin;;
|
||||||
9) rm -f "$data"
|
9) break;;
|
||||||
break;;
|
|
||||||
10) kill -HUP "$(pgrep -s 0 -o)";;
|
|
||||||
esac
|
esac
|
||||||
rm -f "$data"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue