fix(admin): show mail flow settings on email configuration page

This commit is contained in:
hellcat 2026-10-10 19:28:39 +08:00
parent ad42a0e1e7
commit d51fb5e398
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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) {