fix(admin): show mail flow settings on email configuration page
This commit is contained in:
parent
ad42a0e1e7
commit
d51fb5e398
2
public/admin-custom/mail-flow.js
vendored
2
public/admin-custom/mail-flow.js
vendored
@ -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) {
|
||||
|
||||
2
resources/js/admin/mail-flow.js
vendored
2
resources/js/admin/mail-flow.js
vendored
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user