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;

View file

@ -167,6 +167,77 @@ body.ol2013 {
border-left-color: var(--ol-blue);
font-weight: 600;
}
.mail-actionbar {
height: 38px;
flex: 0 0 auto;
background: #2f343a;
color: #f3f5f7;
display: flex;
align-items: center;
gap: 8px;
padding: 0 10px;
border-bottom: 1px solid #20242a;
box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .04);
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
}
.action-search {
width: min(340px, 26vw);
min-width: 210px;
height: 30px;
display: inline-flex;
align-items: center;
gap: 8px;
padding: 0 10px;
color: #b8c0ca;
background: #3b4148;
border: 1px solid #5b626b;
}
.action-search input {
min-width: 0;
width: 100%;
border: 0;
outline: 0;
color: #fff;
background: transparent;
font: inherit;
}
.action-search input::placeholder { color: #c2c8d0; }
.action-btn {
height: 30px;
display: inline-flex;
align-items: center;
gap: 8px;
padding: 0 10px;
border: 1px solid transparent;
color: #f6f8fb;
background: transparent;
font: inherit;
cursor: pointer;
}
.action-btn:hover {
background: #454b53;
border-color: #5b626b;
}
.action-btn.primary {
background: #f28c22;
border-color: #f28c22;
color: #fff;
font-weight: 600;
}
.action-btn.primary:hover {
background: #ff9d34;
border-color: #ff9d34;
}
.action-btn.muted { color: #aeb6c0; }
.action-separator {
width: 1px;
height: 26px;
background: #555c65;
margin: 0 4px;
flex: 0 0 auto;
}
.mail-logo {
position: relative;
width: 17px;