Add secondary mail action bar

This commit is contained in:
DonVoo 2026-07-13 11:55:52 +02:00
parent cc3f796ca3
commit 9a4aade072
3 changed files with 120 additions and 16 deletions

View file

@ -1,3 +1,36 @@
(function () {
function ensureActionBar() {
const ribbon = document.querySelector(".ribbon");
if (!ribbon || document.querySelector(".mail-actionbar")) return;
const bar = document.createElement("div");
bar.className = "mail-actionbar";
bar.innerHTML = `
<label class="action-search" aria-label="Suchen">
<span aria-hidden="true">&#x2315;</span>
<input type="search" placeholder="Suchen">
</label>
<button class="action-btn primary" type="button"><span aria-hidden="true">&#x2709;</span> Neu</button>
<button class="action-btn" type="button" data-action-refresh><span aria-hidden="true">&#x21BB;</span> Aktualisieren</button>
<span class="action-separator"></span>
<button class="action-btn" type="button"><span aria-hidden="true">&#x21A9;</span> Antworten</button>
<button class="action-btn" type="button"><span aria-hidden="true">&#x21AA;</span> Weiterleiten</button>
<span class="action-separator"></span>
<button class="action-btn muted" type="button"><span aria-hidden="true">&#x2691;</span> Markieren</button>
<button class="action-btn muted" type="button"><span aria-hidden="true">&#x25A3;</span> Archivieren</button>
<button class="action-btn muted" type="button"><span aria-hidden="true">&#x23F2;</span> Zurueckstellen</button>
<button class="action-btn muted" type="button"><span aria-hidden="true">&#x26A1;</span> Schnelle Aktionen</button>
<button class="action-btn muted" type="button"><span aria-hidden="true">&#x232B;</span> Loeschen</button>
`;
ribbon.insertAdjacentElement("afterend", bar);
}
document.addEventListener("DOMContentLoaded", ensureActionBar);
document.addEventListener("click", (event) => {
if (event.target.closest("[data-action-refresh]")) window.location.reload();
});
})();
(function () {
const handleWidth = 6;