Limit user role to archive viewer

This commit is contained in:
DonVoo 2026-07-13 13:19:12 +02:00
parent 53a87e57dd
commit 3426cea58c
2 changed files with 100 additions and 45 deletions

View file

@ -4,6 +4,7 @@
if (!ribbon || document.querySelector(".mail-actionbar")) return;
const bar = document.createElement("div");
const managerTools = !!document.querySelector("[data-ribbon-menu-toggle]");
bar.className = "mail-actionbar";
bar.innerHTML = `
<button class="action-btn primary" type="button" data-action-new><span aria-hidden="true">&#x2709;</span> Neu</button>
@ -16,6 +17,7 @@
<button class="action-btn" type="button" data-action-reply><span aria-hidden="true">&#x21A9;</span> Antworten</button>
<button class="action-btn" type="button" data-action-forward><span aria-hidden="true">&#x21AA;</span> Weiterleiten</button>
<button class="action-btn muted" type="button" disabled><span aria-hidden="true">&#x232B;</span> Loeschen</button>
${managerTools ? `
<span class="action-separator"></span>
<div class="action-menu">
<button class="action-btn action-menu-button" type="button" aria-expanded="false" data-action-menu-toggle><span aria-hidden="true">&#x21C4;</span> Ordner Sync</button>
@ -33,6 +35,7 @@
<button type="button" class="action-dropdown-item" data-sync-kind="email" data-sync-direction="pull">Email &lt;-- Email</button>
</div>
</div>
` : ""}
`;
ribbon.insertAdjacentElement("afterend", bar);
}