docs: session close 2026-10-22 — Docker, metrics, auth-log, Task 6 (VTODO-create). feat: webui/radicale.py create/toggle_task, CalDAV REPORT, api endpoints. fix: login cookie (HTMX, method=post, stale cleanup). fix: SQLite WAL read-only mount.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
{% if current %}
|
||||
<div style="display:flex;flex-direction:column;height:100%">
|
||||
<div class="ph">
|
||||
<div style="flex:1;min-width:0">
|
||||
<div class="ps">{{ current.meta.get('subject') or '(без темы)' }}</div>
|
||||
<div class="pm">
|
||||
<span><span class="pl">От:</span> {{ current.meta.get('from') or '?' }}</span>
|
||||
{% for r in current.meta.get('to', '').split(';') %}
|
||||
<span><span class="pl">Кому:</span> {{ r.strip() }}</span>
|
||||
{% endfor %}
|
||||
<span><span class="pl">Дата:</span> {{ current.meta.get('date') or '?' }}</span>
|
||||
</div>
|
||||
{% if current.attachments %}
|
||||
<div class="patts">
|
||||
{% for a in current.attachments %}
|
||||
<a class="pa" href="/attachments/{{ current.dir|replace('/opt/hermes/email/', '') }}/attachments/{{ a.name|urlencode }}">📄 {{ a.name }} ({{ a.size_hr }})</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div style="display:flex;gap:6px;align-items:center">
|
||||
<button class="pb-btn" title="Создать задачу в Radicale"
|
||||
onclick="var b=this;fetch('/api/tasks/create',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({subject:{{ current.meta.get('subject','(без темы)')|tojson|safe }},from:{{ current.meta.get('from','')|tojson|safe }},body:{{ current.body[:300]|tojson|safe }},path:{{ current.path|tojson|safe }}})}).then(r=>r.json()).then(d=>{if(d.ok){b.textContent='✅';b.disabled=true;b.title='Задача создана'}else{alert('Ошибка: '+d.error)}}).catch(e=>alert('Ошибка: '+e));return false">📋</button>
|
||||
<button class="pchev" onclick="this.classList.toggle('open');document.getElementById('phdrs').classList.toggle('open')">⌄</button>
|
||||
</div>
|
||||
<div class="phdrs" id="phdrs" style="flex-basis:100%">
|
||||
{% for k in current.meta %}
|
||||
<div><b>{{ k }}:</b> {{ current.meta[k] }}</div>
|
||||
{% endfor %}
|
||||
<div><b>Файл:</b> /opt/hermes/email/{{ current.path }}</div>
|
||||
{% if current.attachments %}<div><b>Вложений:</b> {{ current.attachments|length }}</div>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="pb" style="white-space:pre-wrap;font-family:inherit">
|
||||
{{ current.body }}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="empty">Выберите письмо</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user