From d51fb5e398e2d720dbde2262656622ef6d3035b5 Mon Sep 17 00:00:00 2001 From: hellcat Date: Sat, 10 Oct 2026 19:28:39 +0800 Subject: [PATCH] fix(admin): show mail flow settings on email configuration page --- public/admin-custom/mail-flow.js | 2 +- resources/js/admin/mail-flow.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/admin-custom/mail-flow.js b/public/admin-custom/mail-flow.js index a1473a0..a356869 100644 --- a/public/admin-custom/mail-flow.js +++ b/public/admin-custom/mail-flow.js @@ -6,7 +6,7 @@ style.textContent = `#mail-flow-tools .entry{position:fixed;right:24px;bottom:72 host.append(style); const entry = document.createElement('button'); entry.className='entry'; entry.textContent='邮件渠道与自动回复'; entry.type='button'; entry.hidden=true; host.append(entry); const dialog=document.createElement('dialog'); dialog.id='mail-flow-dialog'; host.append(dialog); document.body.append(host); -const visibility=()=>{entry.hidden=!location.hash.startsWith('#/config') || !document.querySelector('#root h2'); if(entry.hidden && dialog.open) dialog.close();}; +const visibility=()=>{entry.hidden=location.hash.split('?')[0]!=='#/config/system/email' || !document.querySelector('#root main'); if(entry.hidden && dialog.open) dialog.close();}; window.addEventListener('hashchange',visibility); new MutationObserver(visibility).observe(document.getElementById('root'),{childList:true,subtree:true}); visibility(); async function api(action, payload) { diff --git a/resources/js/admin/mail-flow.js b/resources/js/admin/mail-flow.js index a1473a0..a356869 100644 --- a/resources/js/admin/mail-flow.js +++ b/resources/js/admin/mail-flow.js @@ -6,7 +6,7 @@ style.textContent = `#mail-flow-tools .entry{position:fixed;right:24px;bottom:72 host.append(style); const entry = document.createElement('button'); entry.className='entry'; entry.textContent='邮件渠道与自动回复'; entry.type='button'; entry.hidden=true; host.append(entry); const dialog=document.createElement('dialog'); dialog.id='mail-flow-dialog'; host.append(dialog); document.body.append(host); -const visibility=()=>{entry.hidden=!location.hash.startsWith('#/config') || !document.querySelector('#root h2'); if(entry.hidden && dialog.open) dialog.close();}; +const visibility=()=>{entry.hidden=location.hash.split('?')[0]!=='#/config/system/email' || !document.querySelector('#root main'); if(entry.hidden && dialog.open) dialog.close();}; window.addEventListener('hashchange',visibility); new MutationObserver(visibility).observe(document.getElementById('root'),{childList:true,subtree:true}); visibility(); async function api(action, payload) {