From 54a72e8e1eeb311250e864370633802abce85856 Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Thu, 5 Sep 2024 17:46:02 +1200 Subject: [PATCH 1/7] Chore: Improve link detection in the HTML preview --- server/ui-src/components/message/Message.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/ui-src/components/message/Message.vue b/server/ui-src/components/message/Message.vue index ce22076afa..159a043c36 100644 --- a/server/ui-src/components/message/Message.vue +++ b/server/ui-src/components/message/Message.vue @@ -182,7 +182,7 @@ export default { const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]'); [...tooltipTriggerList].map(tooltipTriggerEl => new Tooltip(tooltipTriggerEl)) - // delay 0.2s until vue has rendered the iframe content + // delay 0.5s until vue has rendered the iframe content window.setTimeout(() => { let p = document.getElementById('preview-html') if (p && typeof p.contentWindow.document.body == 'object') { @@ -193,14 +193,14 @@ export default { let anchorEl = anchorEls[i] let href = anchorEl.getAttribute('href') - if (href && href.match(/^http/)) { + if (href && href.match(/^https?:\/\//i)) { anchorEl.setAttribute('target', '_blank') } } } catch (error) { } this.resizeIFrames() } - }, 200) + }, 500) // html highlighting window.Prism = window.Prism || {} From bd5c45029499e06f40b99dea90b96631bbb5a379 Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Fri, 6 Sep 2024 15:57:41 +1200 Subject: [PATCH 2/7] Chore: Improve tag detection in UI --- server/ui-src/components/NavTags.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ui-src/components/NavTags.vue b/server/ui-src/components/NavTags.vue index 7c55a04f77..95a8fd8766 100644 --- a/server/ui-src/components/NavTags.vue +++ b/server/ui-src/components/NavTags.vue @@ -22,7 +22,7 @@ export default { return false } - let re = new RegExp(`\\btag:("${tag}"|${tag}\\b)`, 'i') + let re = new RegExp(`(^|\\s)tag:("${tag}"|${tag}\\b)`, 'i') return query.match(re) }, From 56f1138f8e46b1ac1b3eb07939861032c0279ba0 Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Sat, 7 Sep 2024 17:34:42 +1200 Subject: [PATCH 3/7] Chore: Use consistent margins for Mailpit label if set --- server/ui-src/components/NavMailbox.vue | 7 ++++--- server/ui-src/components/NavSearch.vue | 7 ++++--- server/ui-src/views/MessageView.vue | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/server/ui-src/components/NavMailbox.vue b/server/ui-src/components/NavMailbox.vue index 2b6fc39db1..a9a692cc29 100644 --- a/server/ui-src/components/NavMailbox.vue +++ b/server/ui-src/components/NavMailbox.vue @@ -65,9 +65,10 @@ export default {