Feature: Outreach-Log — Mail-Inhalt per Klick anzeigen, SW by-v585
This commit is contained in:
parent
8bdd67573e
commit
775cda9a67
4 changed files with 30 additions and 6 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '584'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '585'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VERSION = '1.2.1'; // ← semantische Version, wird bei make release gesetzt
|
||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||
|
||||
|
|
|
|||
|
|
@ -2134,8 +2134,10 @@ window.Page_admin = (() => {
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
${log.map(l => `
|
||||
<tr style="border-bottom:1px solid var(--c-border)">
|
||||
${log.map((l, i) => `
|
||||
<tr data-log-idx="${i}" style="border-bottom:1px solid var(--c-border);cursor:pointer"
|
||||
onmouseover="this.style.background='var(--c-surface-2)'"
|
||||
onmouseout="this.style.background=''">
|
||||
<td style="padding:var(--space-2)">${accountBadge(l.from_account)}</td>
|
||||
<td style="padding:var(--space-2)">${_esc(l.recipient)}</td>
|
||||
<td style="padding:var(--space-2);color:var(--c-text-secondary)">${_esc(l.subject)}</td>
|
||||
|
|
@ -2149,6 +2151,28 @@ window.Page_admin = (() => {
|
|||
</div>
|
||||
`;
|
||||
|
||||
// Log-Zeile: Mail-Inhalt anzeigen
|
||||
el.querySelectorAll('tr[data-log-idx]').forEach(row => {
|
||||
row.addEventListener('click', () => {
|
||||
const l = log[Number(row.dataset.logIdx)];
|
||||
if (!l) return;
|
||||
UI.modal({
|
||||
title: _esc(l.subject),
|
||||
body: `
|
||||
<div style="margin-bottom:var(--space-3);font-size:var(--text-sm);color:var(--c-text-muted)">
|
||||
<strong>An:</strong> ${_esc(l.recipient)} ·
|
||||
<strong>Von:</strong> ${_esc(l.from_account)}@banyaro.app ·
|
||||
${(l.sent_at||'').slice(0,16).replace('T',' ')}
|
||||
</div>
|
||||
<pre style="white-space:pre-wrap;font-family:inherit;font-size:var(--text-sm);
|
||||
background:var(--c-surface-2);border-radius:var(--radius-md);
|
||||
padding:var(--space-3);max-height:60vh;overflow-y:auto;
|
||||
color:var(--c-text)">${_esc(l.body || '(kein Text gespeichert)')}</pre>`,
|
||||
footer: `<button class="btn btn-secondary" onclick="UI.closeModal()">Schließen</button>`,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Vorlage in Compose laden
|
||||
function _loadTplIntoCompose(id) {
|
||||
const tpl = templates.find(t => t.id === id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue