fix(admin): show mail flow settings on email configuration page
This commit is contained in:
1 parent
ad42a0e1e7
commit
d51fb5e398
2 files changed
+2
-2
No files matched your search
Vendored
+1
-1
@@ -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) {
|
||||
|
||||
Vendored
+1
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user