Skip to content

Commit

Permalink
fix location, fix user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
vittoriaThinkst committed Jul 25, 2024
1 parent 7879ac7 commit 9edb004
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 10 deletions.
88 changes: 81 additions & 7 deletions templates/emails/notification.html
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
<!-- Source IP -->
<!-- Source IP -->{% if BasicDetails['src_ip'] %}
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
Expand Down Expand Up @@ -384,15 +384,14 @@
src="https://{{ BasicDetails['public_domain'] }}/resources/notification-email/continent-icons/{{ BasicDetails.get('geo_info', {'continent': 'NO_CONTINTENT'})['continent'].lower() }}.png"
width="40px">
</td>
<td> {% if
BasicDetails['src_ip']
%} <p
<td>
<p
style="font-weight:600;display:block;line-height:1;margin:0;">
Source IP</p>
<p
style="font-weight:400;color:#060606;margin:0 0 16px 0;">
{{BasicDetails['src_ip']}}
</p> {% endif %} {% if
</p> {% if
BasicDetails['location']
%} <p
style="font-weight:600;display:block;line-height:1;margin:0;">
Expand Down Expand Up @@ -426,7 +425,7 @@
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
<!--[if mso | IE]></td></tr></table><![endif]--> {% endif %}
<!-- Day & Time -->
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
Expand Down Expand Up @@ -558,7 +557,7 @@
<td>
<p
style="font-weight:600;display:block;line-height:1;margin:0;">
Browser Identity</p>
User agent</p>
<p
style="font-weight:400;color:#060606;margin:0;">
<a href
Expand Down Expand Up @@ -590,6 +589,81 @@
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]--> {% endif %}
<!-- Location -->{% if BasicDetails['location'] %}
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:0px 30px 30px;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:540px;" width="540" bgcolor="#f6f8fb" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div
style="background:#f6f8fb;background-color:#f6f8fb;margin:0px auto;border-radius:16px 16px;max-width:540px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
style="background:#f6f8fb;background-color:#f6f8fb;width:100%;border-radius:16px 16px;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:540px;" ><![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix"
style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0"
role="presentation" width="100%">
<tbody>
<tr>
<td style="vertical-align:top;padding:0px;">
<table border="0" cellpadding="0" cellspacing="0"
role="presentation" style width="100%">
<tbody>
<tr>
<td align="left"
style="font-size:0px;padding:10px 25px;word-break:break-word;">
<table cellpadding="0"
cellspacing="0" width="100%"
border="0"
style="color:#000000;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;table-layout:auto;width:100%;border:none;">
<tr
style="color:#818a8e;font-size:16px;text-align:left;font-weight:600">
<td style="padding: 0px 10px; width:40px; font-weight:400; vertical-align: middle;"
rowspan="2">
<img align="center"
src="https://{{ BasicDetails['public_domain'] }}/resources/notification-email/default.png"
width="40px">
</td>
<td>
<p
style="font-weight:600;display:block;line-height:1;margin:0;">
Location</p>
<p
style="font-weight:400;color:#060606;margin:0;">
{{BasicDetails.get('location',
None)}}</p>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]--> {% endif %}
<!-- Log4Shell hostname -->{% if BasicDetails['log4_shell_computer_name'] %}
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
Expand Down
32 changes: 29 additions & 3 deletions templates/emails/notification.mjml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
</mj-wrapper>

<!--Source IP -->
<mj-raw>{% if BasicDetails['src_ip'] %}</mj-raw>
<mj-wrapper padding="0px 30px 30px" background-color="#FFF">
<mj-section background-color="#f6f8fb" border-radius="16px 16px">
<mj-column width="100%" padding="0px">
Expand All @@ -106,10 +107,8 @@
<img align="center" src="https://{{ BasicDetails['public_domain'] }}/resources/notification-email/continent-icons/{{ BasicDetails.get('geo_info', {'continent': 'NO_CONTINTENT'})['continent'].lower() }}.png" width="40px" />
</td>
<td>
{% if BasicDetails['src_ip'] %}
<p style="font-weight:600;display:block;line-height:1;margin:0;">Source IP</p>
<p style="font-weight:400;color:#060606;margin:0 0 16px 0;">{{BasicDetails['src_ip']}}</p>
{% endif %}
{% if BasicDetails['location'] %}
<p style="font-weight:600;display:block;line-height:1;margin:0;">Location</p>
<p style="font-weight:400;color:#060606;margin:0;">{{BasicDetails.get('location', None)}}</p>
Expand All @@ -122,6 +121,8 @@
</mj-section>

</mj-wrapper>
<mj-raw>{% endif %}</mj-raw>


<!-- Day & Time -->
<mj-wrapper padding="0px 30px 30px" background-color="#FFF">
Expand Down Expand Up @@ -162,7 +163,7 @@
<img align="center" src="https://{{ BasicDetails['public_domain'] }}/resources/notification-email/browserid.png" width="40px" />
</td>
<td>
<p style="font-weight:600;display:block;line-height:1;margin:0;">Browser Identity</p>
<p style="font-weight:600;display:block;line-height:1;margin:0;">User agent</p>
<p style="font-weight:400;color:#060606;margin:0;">
<a href="" style="text-decoration:none !important; color:#060606">{{BasicDetails['useragent']| e}}</a>
</p>
Expand All @@ -176,6 +177,31 @@
</mj-wrapper>
<mj-raw>{% endif %}</mj-raw>

<!--Location -->
<mj-raw>{% if BasicDetails['location'] %}</mj-raw>
<mj-wrapper padding="0px 30px 30px" background-color="#FFF">
<mj-section background-color="#f6f8fb" border-radius="16px 16px">
<mj-column width="100%" padding="0px">
<mj-table>

<tr style="color:#818a8e;font-size:16px;text-align:left;font-weight:600">
<td style="padding: 0px 10px; width:40px; font-weight:400; vertical-align: middle;" rowspan="2">
<img align="center" src="https://{{ BasicDetails['public_domain'] }}/resources/notification-email/default.png" width="40px" />
</td>
<td>
<p style="font-weight:600;display:block;line-height:1;margin:0;">Location</p>
<p style="font-weight:400;color:#060606;margin:0;">{{BasicDetails.get('location', None)}}</p>
</td>
</tr>

</mj-table>
</mj-column>
</mj-section>

</mj-wrapper>
<mj-raw>{% endif %}</mj-raw>


<!-- Log4Shell hostname -->
<mj-raw>{% if BasicDetails['log4_shell_computer_name'] %}</mj-raw>
<mj-wrapper padding="0px 30px 30px" background-color="#FFF">
Expand Down

0 comments on commit 9edb004

Please sign in to comment.