From 7f23b21f5dc20bb89c50b7c51b533f00fa6b28c5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 7 Apr 2018 13:18:00 +0100 Subject: [PATCH] Tidying --- src/freedombone-controlpanel-user | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/src/freedombone-controlpanel-user b/src/freedombone-controlpanel-user index d8045536..4585320e 100755 --- a/src/freedombone-controlpanel-user +++ b/src/freedombone-controlpanel-user @@ -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=