diff --git a/server/ui-src/components/AboutMailpit.vue b/server/ui-src/components/AboutMailpit.vue index eae4d2f..353d825 100644 --- a/server/ui-src/components/AboutMailpit.vue +++ b/server/ui-src/components/AboutMailpit.vue @@ -26,15 +26,14 @@ export default { }, methods: { - loadInfo: function () { - let self = this - self.get(self.resolve('/api/v1/info'), false, function (response) { + loadInfo() { + this.get(this.resolve('/api/v1/info'), false, (response) => { mailbox.appInfo = response.data - self.modal('AppInfoModal').show() + this.modal('AppInfoModal').show() }) }, - requestNotifications: function () { + requestNotifications() { // check if the browser supports notifications if (!("Notification" in window)) { alert("This browser does not support desktop notifications") @@ -42,7 +41,6 @@ export default { // we need to ask the user for permission else if (Notification.permission !== "denied") { - let self = this Notification.requestPermission().then(function (permission) { if (permission === "granted") { mailbox.notificationsEnabled = true @@ -180,7 +178,9 @@ export default {
{{ warning.Title }}
propertyies in the CSS styles, but unable to test if used or not.
+ v-else>ies in the CSS
+ styles, but unable to test if used or not.
@@ -487,9 +477,9 @@ export default {
<script>
) correspond to a test on
- caniemail.com, and the
- final score is calculated using the available compatibility data.
+ caniemail.com, and
+ the final score is calculated using the available compatibility data.
- CSS support is very difficult to programmatically test, especially if a message
- contains CSS style blocks or is linked to remote stylesheets. Remote stylesheets
- are, unless blocked via --block-remote-css-and-fonts
, downloaded
- and injected into the message as style blocks. The email is then
- inlined
+ CSS support is very difficult to programmatically test, especially if a
+ message contains CSS style blocks or is linked to remote stylesheets. Remote
+ stylesheets are, unless blocked via
+ --block-remote-css-and-fonts
,
+ downloaded and injected into the message as style blocks. The email is then
+ inlined
to matching HTML elements. This gives Mailpit fairly accurate results.
CSS properties such as @font-face
, :visited
,
:hover
etc cannot be inlined however, so these are searched for
- within CSS blocks. This method is not accurate as Mailpit does not know how many
- nodes it actually applies to, if any, so they are weighted lightly (5%) as not
- to affect the score. An example of this would be any email linking to the full
- bootstrap CSS which contains dozens of unused attributes.
+ within CSS blocks. This method is not accurate as Mailpit does not know how
+ many nodes it actually applies to, if any, so they are weighted lightly (5%)
+ as not to affect the score. An example of this would be any email linking to
+ the full bootstrap CSS which contains dozens of unused attributes.
- All warnings are displayed with their respective support, including any specific - notes, and it is up to you to decide what you do with that information and how - badly it may impact your message. + All warnings are displayed with their respective support, including any + specific notes, and it is up to you to decide what you do with that + information and how badly it may impact your message.
For each test, Mailpit calculates both the unsupported & partially-supported percentages in relation to the number of matches against the total number of - nodes (elements) in the HTML. The maximum unsupported and partially-supported - weighted scores are then used for the final score (ie: worst case scenario). + nodes (elements) in the HTML. The maximum unsupported and + partially-supported weighted scores are then used for the final score (ie: + worst case scenario).
To try explain this logic in very simple terms: Assuming a
- <script>
node (element) has 100% failure (not supported in
- any email client), and a <p>
node has 100% pass (supported).
+ <script>
node (element) has 100% failure (not supported
+ in any email client), and a <p>
node has 100% pass
+ (supported).
- Mailpit will sort the warnings according to their weighted unsupported scores. + Mailpit will sort the warnings according to their weighted unsupported + scores.