This commit is contained in:
Bob Mottram 2018-04-07 13:18:00 +01:00
parent 60b4b077d8
commit 7f23b21f5d
1 changed files with 10 additions and 18 deletions

View File

@ -857,29 +857,21 @@ function show_your_email_address {
onion_domain=$(cat "$HOME/.email_onion_domain")
fi
dialog_height=14
onionemailstr=
if [[ "$HOSTNAME" != *'.onion' && "$onion_domain" ]]; then
if [ ! -f ~/.mutt/bdsmail ]; then
msgstr=$"\\nYou can press SHIFT and then drag the mouse and right click to copy.\\n\\nEmail Address: $MY_EMAIL_ADDRESS\\n\\nOnion Email: ${USER}@${onion_domain}\\n\\nKey ID: $GPG_ID\\n\\nFingerprint: $GPG_FINGERPRINT\\n\\nCreated: $GPG_DATE"
dialog_height=17
else
bdsmail_address=$(grep 'set from=' ~/.mutt/bdsmail | awk -F '=' '{print $2}')
msgstr=$"\\nYou can press SHIFT and then drag the mouse and right click to copy.\\n\\nEmail Address: $MY_EMAIL_ADDRESS\\n\\nOnion Email: ${USER}@${onion_domain}\\n\\nKey ID: $GPG_ID\\n\\nFingerprint: $GPG_FINGERPRINT\\n\\nCreated: $GPG_DATE\\n\\nI2P Address: ${bdsmail_address}"
dialog_height=20
fi
else
if [ ! -f ~/.mutt/bdsmail ]; then
msgstr=$"\\nYou can press SHIFT and then drag the mouse and right click to copy.\\n\\nEmail Address: $MY_EMAIL_ADDRESS\\n\\nKey ID: $GPG_ID\\n\\nFingerprint: $GPG_FINGERPRINT\\n\\nCreated: $GPG_DATE"
dialog_height=14
else
bdsmail_address=$(grep 'set from=' ~/.mutt/bdsmail | awk -F '=' '{print $2}')
msgstr=$"\\nYou can press SHIFT and then drag the mouse and right click to copy.\\n\\nEmail Address: $MY_EMAIL_ADDRESS\\n\\nKey ID: $GPG_ID\\n\\nFingerprint: $GPG_FINGERPRINT\\n\\nCreated: $GPG_DATE\\n\\nI2P Address: ${bdsmail_address}"
dialog_height=17
fi
onionemailstr="\\n\\nOnion Email: ${USER}@${onion_domain}"
dialog_height=$((dialog_height+2))
fi
msgstrbase=$"\\nYou can press SHIFT and then drag the mouse and right click to copy.\\n\\nEmail Address: ${MY_EMAIL_ADDRESS}${onionemailstr}\\n\\nKey ID: ${GPG_ID}\\n\\nFingerprint: ${GPG_FINGERPRINT}\\n\\nCreated: ${GPG_DATE}"
bdsmail_address=
if [ ! -f ~/.mutt/bdsmail ]; then
bdsmail_address="\\n\\nI2P Address: "$(grep 'set from=' ~/.mutt/bdsmail | awk -F '=' '{print $2}')
dialog_height=$((dialog_height+2))
fi
dialog --title $"Show your Email Address" \
--backtitle $"Freedombone User Control Panel" \
--msgbox "$msgstr" $dialog_height 100
--msgbox "$msgstrbase${bdsmail_address}" $dialog_height 100
clear
qr_code_shown=