Email filtering menu style
This commit is contained in:
parent
8508da2f53
commit
498561ac49
|
@ -2298,7 +2298,7 @@ function menu_top_level {
|
|||
21 $"Restart the system")
|
||||
|
||||
# shellcheck disable=SC2068
|
||||
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)
|
||||
selection=$(dialog --backtitle $"Freedombone Administrator 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
|
||||
break
|
||||
fi
|
||||
|
|
|
@ -775,35 +775,28 @@ function menu_encryption_keys {
|
|||
function menu_email {
|
||||
while true
|
||||
do
|
||||
data=$(mktemp 2>/dev/null)
|
||||
dialog --backtitle $"Freedombone User Control Panel" \
|
||||
--title $"Change Email Filtering Rules" \
|
||||
--radiolist $"Choose an operation:" 14 70 7 \
|
||||
1 $"Add yourself to a mailing list" off \
|
||||
2 $"Remove yourself from a mailing list" off \
|
||||
3 $"Add an email rule for an address" off \
|
||||
4 $"Add an email rule for a subject" off \
|
||||
5 $"Block or unblock an email address" off \
|
||||
6 $"Block or unblock email with subject text" off \
|
||||
7 $"Back to main menu" on 2> "$data"
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) rm -f "$data"
|
||||
break;;
|
||||
255) rm -f "$data"
|
||||
break;;
|
||||
esac
|
||||
case $(cat "$data") in
|
||||
W=(1 $"Add yourself to a mailing list"
|
||||
2 $"Remove yourself from a mailing list"
|
||||
3 $"Add an email rule for an address"
|
||||
4 $"Add an email rule for a subject"
|
||||
5 $"Block or unblock an email address"
|
||||
6 $"Block or unblock email with subject text")
|
||||
|
||||
# shellcheck disable=SC2068
|
||||
selection=$(dialog --backtitle $"Freedombone User Control Panel" --title $"Change Email Filtering Rules" --menu $"Choose an operation, or ESC for main menu:" 14 70 7 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||
|
||||
if [ ! "$selection" ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
case $selection in
|
||||
1) add_to_mailing_list;;
|
||||
2) remove_user_from_mailing_list;;
|
||||
3) email_rule_address;;
|
||||
4) email_rule_subject;;
|
||||
5) block_unblock_email;;
|
||||
6) block_unblock_subject;;
|
||||
7) rm -f "$data"
|
||||
break;;
|
||||
esac
|
||||
rm -f "$data"
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -910,7 +903,7 @@ function menu_top_level {
|
|||
9 $"Exit to the command line")
|
||||
|
||||
# shellcheck disable=SC2068
|
||||
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)
|
||||
selection=$(dialog --backtitle $"Freedombone User 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)
|
||||
if [ ! "$selection" ]; then
|
||||
kill -HUP "$(pgrep -s 0 -o)"
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue