2026-01-12 14:05:06 -03:00
|
|
|
<link rel="stylesheet" href="mail/mail.css" />
|
|
|
|
|
|
2025-12-03 18:42:22 -03:00
|
|
|
<div class="mail-layout">
|
|
|
|
|
<!-- Sidebar -->
|
|
|
|
|
<div class="panel mail-sidebar">
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="compose-section">
|
|
|
|
|
<button class="compose-btn" onclick="openCompose()">
|
2026-01-06 22:57:00 -03:00
|
|
|
<svg
|
|
|
|
|
width="18"
|
|
|
|
|
height="18"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<path d="M12 5v14M5 12h14" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
2026-01-06 22:57:00 -03:00
|
|
|
<span data-i18n="email-compose">Compose</span>
|
2025-12-03 18:42:22 -03:00
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Folder List -->
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="folders-section">
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="nav-item active"
|
|
|
|
|
data-folder="inbox"
|
|
|
|
|
hx-get="/api/ui/email/list?folder=inbox"
|
|
|
|
|
hx-target="#mail-list"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<polyline points="22 12 16 12 14 15 10 15 8 12 2 12" />
|
|
|
|
|
<path
|
|
|
|
|
d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
2026-01-06 22:57:00 -03:00
|
|
|
<span data-i18n="email-inbox">Inbox</span>
|
2025-12-06 11:09:12 -03:00
|
|
|
<span class="folder-badge unread" id="inbox-count">0</span>
|
2025-12-03 18:42:22 -03:00
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="nav-item"
|
|
|
|
|
data-folder="starred"
|
|
|
|
|
hx-get="/api/ui/email/list?folder=starred"
|
|
|
|
|
hx-target="#mail-list"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<polygon
|
|
|
|
|
points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
2026-01-06 22:57:00 -03:00
|
|
|
<span data-i18n="email-starred">Starred</span>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="nav-item"
|
|
|
|
|
data-folder="sent"
|
|
|
|
|
hx-get="/api/ui/email/list?folder=sent"
|
|
|
|
|
hx-target="#mail-list"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="22" y1="2" x2="11" y2="13" />
|
|
|
|
|
<polygon points="22 2 15 22 11 13 2 9 22 2" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
2026-01-06 22:57:00 -03:00
|
|
|
<span data-i18n="email-sent">Sent</span>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="nav-item"
|
|
|
|
|
data-folder="scheduled"
|
|
|
|
|
hx-get="/api/ui/email/list?folder=scheduled"
|
|
|
|
|
hx-target="#mail-list"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<circle cx="12" cy="12" r="10" />
|
|
|
|
|
<polyline points="12 6 12 12 16 14" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
2026-01-06 22:57:00 -03:00
|
|
|
<span data-i18n="email-scheduled">Scheduled</span>
|
2025-12-06 11:09:12 -03:00
|
|
|
<span class="folder-badge" id="scheduled-count">0</span>
|
|
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="nav-item"
|
|
|
|
|
data-folder="drafts"
|
|
|
|
|
hx-get="/api/ui/email/list?folder=drafts"
|
|
|
|
|
hx-target="#mail-list"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"
|
|
|
|
|
/>
|
|
|
|
|
<polyline points="14 2 14 8 20 8" />
|
|
|
|
|
<line x1="16" y1="13" x2="8" y2="13" />
|
|
|
|
|
<line x1="16" y1="17" x2="8" y2="17" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
2026-01-06 22:57:00 -03:00
|
|
|
<span data-i18n="email-drafts">Drafts</span>
|
2025-12-06 11:09:12 -03:00
|
|
|
<span class="folder-badge" id="drafts-count">0</span>
|
|
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="nav-item"
|
|
|
|
|
data-folder="tracking"
|
|
|
|
|
hx-get="/api/email/tracking/list"
|
|
|
|
|
hx-target="#mail-list"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" />
|
|
|
|
|
<circle cx="12" cy="12" r="3" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
2026-01-06 22:57:00 -03:00
|
|
|
<span data-i18n="email-tracking">Tracking</span>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="nav-item"
|
|
|
|
|
data-folder="spam"
|
|
|
|
|
hx-get="/api/ui/email/list?folder=spam"
|
|
|
|
|
hx-target="#mail-list"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
|
|
|
|
|
/>
|
|
|
|
|
<line x1="12" y1="9" x2="12" y2="13" />
|
|
|
|
|
<line x1="12" y1="17" x2="12.01" y2="17" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
2026-01-06 22:57:00 -03:00
|
|
|
<span data-i18n="email-spam">Spam</span>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="nav-item"
|
|
|
|
|
data-folder="trash"
|
|
|
|
|
hx-get="/api/ui/email/list?folder=trash"
|
|
|
|
|
hx-target="#mail-list"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<polyline points="3 6 5 6 21 6" />
|
|
|
|
|
<path
|
|
|
|
|
d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
2026-01-06 22:57:00 -03:00
|
|
|
<span data-i18n="email-trash">Trash</span>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Accounts Section -->
|
|
|
|
|
<div class="labels-section">
|
|
|
|
|
<div class="section-header">
|
|
|
|
|
<span>Accounts</span>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
class="icon-btn"
|
|
|
|
|
onclick="document.getElementById('add-account-modal').showModal()"
|
|
|
|
|
title="Add account"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="12" y1="5" x2="12" y2="19" />
|
|
|
|
|
<line x1="5" y1="12" x2="19" y2="12" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
id="accounts-list"
|
|
|
|
|
hx-get="/api/ui/email/accounts"
|
|
|
|
|
hx-trigger="load"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
2025-12-06 11:09:12 -03:00
|
|
|
<!-- Accounts loaded here -->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Labels Section -->
|
|
|
|
|
<div class="labels-section">
|
|
|
|
|
<div class="section-header">
|
|
|
|
|
<span>Labels</span>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
class="icon-btn"
|
|
|
|
|
onclick="openLabelManager()"
|
|
|
|
|
title="Manage labels"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="12" y1="5" x2="12" y2="19" />
|
|
|
|
|
<line x1="5" y1="12" x2="19" y2="12" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
id="labels-list"
|
|
|
|
|
hx-get="/api/ui/email/labels"
|
|
|
|
|
hx-trigger="load"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
|
|
|
|
<div class="label-item" style="--label-color: #ef4444">
|
2025-12-06 11:09:12 -03:00
|
|
|
<span class="label-dot"></span>
|
|
|
|
|
<span>Important</span>
|
|
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div class="label-item" style="--label-color: #f59e0b">
|
2025-12-06 11:09:12 -03:00
|
|
|
<span class="label-dot"></span>
|
|
|
|
|
<span>Work</span>
|
|
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div class="label-item" style="--label-color: #22c55e">
|
2025-12-06 11:09:12 -03:00
|
|
|
<span class="label-dot"></span>
|
|
|
|
|
<span>Personal</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Quick Actions -->
|
|
|
|
|
<div class="quick-actions">
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
class="quick-action-btn"
|
|
|
|
|
onclick="openTemplates()"
|
|
|
|
|
title="Email Templates"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
|
|
|
|
|
<line x1="3" y1="9" x2="21" y2="9" />
|
|
|
|
|
<line x1="9" y1="21" x2="9" y2="9" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
<span>Templates</span>
|
|
|
|
|
</button>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
class="quick-action-btn"
|
|
|
|
|
onclick="openSignatures()"
|
|
|
|
|
title="Signatures"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
<span>Signatures</span>
|
|
|
|
|
</button>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
class="quick-action-btn"
|
|
|
|
|
onclick="openRules()"
|
|
|
|
|
title="Email Rules"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<polygon
|
|
|
|
|
points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
<span>Rules</span>
|
|
|
|
|
</button>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
class="quick-action-btn"
|
|
|
|
|
onclick="openAutoResponder()"
|
|
|
|
|
title="Out of Office"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<circle cx="12" cy="12" r="10" />
|
|
|
|
|
<path d="M8 14s1.5 2 4 2 4-2 4-2" />
|
|
|
|
|
<line x1="9" y1="9" x2="9.01" y2="9" />
|
|
|
|
|
<line x1="15" y1="9" x2="15.01" y2="9" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
<span>Auto-reply</span>
|
|
|
|
|
</button>
|
2025-12-03 18:42:22 -03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Mail List -->
|
|
|
|
|
<div class="panel mail-list">
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="list-header">
|
|
|
|
|
<div class="list-header-left">
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
class="select-all"
|
|
|
|
|
onchange="toggleSelectAll(this)"
|
|
|
|
|
title="Select all"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
<h3 id="folder-title">Inbox</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="list-header-right">
|
|
|
|
|
<div class="search-box">
|
2026-01-06 22:57:00 -03:00
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<circle cx="11" cy="11" r="8" />
|
|
|
|
|
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
placeholder="Search emails..."
|
|
|
|
|
id="email-search"
|
|
|
|
|
hx-get="/api/ui/email/search"
|
|
|
|
|
hx-trigger="keyup changed delay:300ms"
|
|
|
|
|
hx-target="#mail-list"
|
|
|
|
|
hx-include="this"
|
|
|
|
|
name="q"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
class="icon-btn"
|
|
|
|
|
onclick="refreshMailList()"
|
|
|
|
|
title="Refresh"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<polyline points="23 4 23 10 17 10" />
|
|
|
|
|
<polyline points="1 20 1 14 7 14" />
|
|
|
|
|
<path
|
|
|
|
|
d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Bulk Actions Bar (hidden by default) -->
|
2026-01-06 22:57:00 -03:00
|
|
|
<div class="bulk-actions" id="bulk-actions" style="display: none">
|
2025-12-06 11:09:12 -03:00
|
|
|
<span class="selected-count">0 selected</span>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
class="bulk-btn"
|
|
|
|
|
onclick="archiveSelected()"
|
|
|
|
|
title="Archive"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<polyline points="21 8 21 21 3 21 3 8" />
|
|
|
|
|
<rect x="1" y="3" width="22" height="5" />
|
|
|
|
|
<line x1="10" y1="12" x2="14" y2="12" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
class="bulk-btn"
|
|
|
|
|
onclick="markAsRead()"
|
|
|
|
|
title="Mark as read"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" />
|
|
|
|
|
<polyline points="22 4 12 14.01 9 11.01" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
class="bulk-btn"
|
|
|
|
|
onclick="addLabelToSelected()"
|
|
|
|
|
title="Add label"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"
|
|
|
|
|
/>
|
|
|
|
|
<line x1="7" y1="7" x2="7.01" y2="7" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
class="bulk-btn danger"
|
|
|
|
|
onclick="deleteSelected()"
|
|
|
|
|
title="Delete"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<polyline points="3 6 5 6 21 6" />
|
|
|
|
|
<path
|
|
|
|
|
d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
2025-12-03 18:42:22 -03:00
|
|
|
</div>
|
2025-12-06 11:09:12 -03:00
|
|
|
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
id="mail-list"
|
|
|
|
|
hx-get="/api/ui/email/list?folder=inbox"
|
|
|
|
|
hx-trigger="load"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="loading-state">
|
|
|
|
|
<div class="spinner"></div>
|
|
|
|
|
<p>Loading emails...</p>
|
2025-12-03 18:42:22 -03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Mail Content -->
|
|
|
|
|
<div class="panel mail-content">
|
|
|
|
|
<div id="mail-content">
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="empty-state">
|
2026-01-06 22:57:00 -03:00
|
|
|
<svg
|
|
|
|
|
width="64"
|
|
|
|
|
height="64"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="1.5"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"
|
|
|
|
|
/>
|
|
|
|
|
<polyline points="22,6 12,13 2,6" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
<h3>Select an email to read</h3>
|
|
|
|
|
<p>Choose an email from the list to view its contents</p>
|
2025-12-03 18:42:22 -03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-12-04 18:15:31 -03:00
|
|
|
</div>
|
2025-12-03 18:42:22 -03:00
|
|
|
</div>
|
|
|
|
|
|
2025-12-06 11:09:12 -03:00
|
|
|
<!-- Compose Modal -->
|
|
|
|
|
<dialog id="compose-modal" class="modal">
|
|
|
|
|
<div class="modal-content modal-large">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h2>New Message</h2>
|
|
|
|
|
<div class="compose-actions-top">
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
class="icon-btn"
|
|
|
|
|
onclick="minimizeCompose()"
|
|
|
|
|
title="Minimize"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="5" y1="12" x2="19" y2="12" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
<button class="icon-btn" onclick="closeCompose()" title="Close">
|
2026-01-06 22:57:00 -03:00
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="18" y1="6" x2="6" y2="18" />
|
|
|
|
|
<line x1="6" y1="6" x2="18" y2="18" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<form
|
|
|
|
|
id="compose-form"
|
|
|
|
|
hx-post="/api/email/send"
|
|
|
|
|
hx-target="#mail-content"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="compose-fields">
|
|
|
|
|
<div class="field-row">
|
|
|
|
|
<label>To:</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
name="to"
|
|
|
|
|
id="compose-to"
|
|
|
|
|
placeholder="Recipients"
|
|
|
|
|
required
|
|
|
|
|
autocomplete="email"
|
|
|
|
|
/>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="field-toggle"
|
|
|
|
|
onclick="toggleCcBcc()"
|
|
|
|
|
>
|
|
|
|
|
Cc/Bcc
|
|
|
|
|
</button>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div class="field-row cc-bcc" style="display: none">
|
2025-12-06 11:09:12 -03:00
|
|
|
<label>Cc:</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
name="cc"
|
|
|
|
|
id="compose-cc"
|
|
|
|
|
placeholder="Carbon copy"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div class="field-row cc-bcc" style="display: none">
|
2025-12-06 11:09:12 -03:00
|
|
|
<label>Bcc:</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
name="bcc"
|
|
|
|
|
id="compose-bcc"
|
|
|
|
|
placeholder="Blind carbon copy"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="field-row">
|
|
|
|
|
<label>Subject:</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
name="subject"
|
|
|
|
|
id="compose-subject"
|
|
|
|
|
placeholder="Subject"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="compose-toolbar">
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="toolbar-btn"
|
|
|
|
|
title="Bold"
|
|
|
|
|
onclick="formatText('bold')"
|
|
|
|
|
>
|
|
|
|
|
<b>B</b>
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="toolbar-btn"
|
|
|
|
|
title="Italic"
|
|
|
|
|
onclick="formatText('italic')"
|
|
|
|
|
>
|
|
|
|
|
<i>I</i>
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="toolbar-btn"
|
|
|
|
|
title="Underline"
|
|
|
|
|
onclick="formatText('underline')"
|
|
|
|
|
>
|
|
|
|
|
<u>U</u>
|
|
|
|
|
</button>
|
2025-12-06 11:09:12 -03:00
|
|
|
<span class="toolbar-divider"></span>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="toolbar-btn"
|
|
|
|
|
title="Bullet list"
|
|
|
|
|
onclick="formatText('insertUnorderedList')"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="8" y1="6" x2="21" y2="6" />
|
|
|
|
|
<line x1="8" y1="12" x2="21" y2="12" />
|
|
|
|
|
<line x1="8" y1="18" x2="21" y2="18" />
|
|
|
|
|
<line x1="3" y1="6" x2="3.01" y2="6" />
|
|
|
|
|
<line x1="3" y1="12" x2="3.01" y2="12" />
|
|
|
|
|
<line x1="3" y1="18" x2="3.01" y2="18" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="toolbar-btn"
|
|
|
|
|
title="Numbered list"
|
|
|
|
|
onclick="formatText('insertOrderedList')"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="10" y1="6" x2="21" y2="6" />
|
|
|
|
|
<line x1="10" y1="12" x2="21" y2="12" />
|
|
|
|
|
<line x1="10" y1="18" x2="21" y2="18" />
|
|
|
|
|
<path d="M4 6h1v4" />
|
|
|
|
|
<path d="M4 10h2" />
|
|
|
|
|
<path d="M6 18H4c0-1 2-2 2-3s-1-1.5-2-1" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
<span class="toolbar-divider"></span>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="toolbar-btn"
|
|
|
|
|
title="Attach file"
|
|
|
|
|
onclick="attachFile()"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="toolbar-btn"
|
|
|
|
|
title="Insert link"
|
|
|
|
|
onclick="insertLink()"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"
|
|
|
|
|
/>
|
|
|
|
|
<path
|
|
|
|
|
d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="toolbar-btn"
|
|
|
|
|
title="Insert image"
|
|
|
|
|
onclick="insertImage()"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<rect
|
|
|
|
|
x="3"
|
|
|
|
|
y="3"
|
|
|
|
|
width="18"
|
|
|
|
|
height="18"
|
|
|
|
|
rx="2"
|
|
|
|
|
ry="2"
|
|
|
|
|
/>
|
|
|
|
|
<circle cx="8.5" cy="8.5" r="1.5" />
|
|
|
|
|
<polyline points="21 15 16 10 5 21" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
<span class="toolbar-divider"></span>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="toolbar-btn"
|
|
|
|
|
title="Insert template"
|
|
|
|
|
onclick="showTemplateSelector()"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<rect
|
|
|
|
|
x="3"
|
|
|
|
|
y="3"
|
|
|
|
|
width="18"
|
|
|
|
|
height="18"
|
|
|
|
|
rx="2"
|
|
|
|
|
ry="2"
|
|
|
|
|
/>
|
|
|
|
|
<line x1="3" y1="9" x2="21" y2="9" />
|
|
|
|
|
<line x1="9" y1="21" x2="9" y2="9" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="toolbar-btn"
|
|
|
|
|
title="Insert signature"
|
|
|
|
|
onclick="insertSignature()"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="compose-body"
|
|
|
|
|
contenteditable="true"
|
|
|
|
|
id="compose-body"
|
|
|
|
|
placeholder="Write your message..."
|
|
|
|
|
></div>
|
|
|
|
|
<input type="hidden" name="body" id="compose-body-hidden" />
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="compose-attachments" id="compose-attachments"></div>
|
|
|
|
|
<div class="compose-footer">
|
|
|
|
|
<div class="compose-options">
|
|
|
|
|
<label class="option-checkbox">
|
2026-01-06 22:57:00 -03:00
|
|
|
<input type="checkbox" name="track_opens" checked />
|
2025-12-06 11:09:12 -03:00
|
|
|
<span>Track opens</span>
|
|
|
|
|
</label>
|
|
|
|
|
<label class="option-checkbox">
|
2026-01-06 22:57:00 -03:00
|
|
|
<input type="checkbox" name="request_receipt" />
|
2025-12-06 11:09:12 -03:00
|
|
|
<span>Request read receipt</span>
|
|
|
|
|
</label>
|
|
|
|
|
<select name="priority" class="priority-select">
|
|
|
|
|
<option value="normal">Normal priority</option>
|
|
|
|
|
<option value="high">High priority</option>
|
|
|
|
|
<option value="low">Low priority</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="compose-actions">
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="btn-secondary"
|
|
|
|
|
hx-post="/api/email/draft"
|
|
|
|
|
hx-include="#compose-form"
|
|
|
|
|
hx-swap="none"
|
|
|
|
|
onclick="prepareSubmit()"
|
|
|
|
|
>
|
|
|
|
|
Save Draft
|
|
|
|
|
</button>
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="send-group">
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
type="submit"
|
|
|
|
|
class="btn-primary"
|
|
|
|
|
onclick="prepareSubmit()"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="22" y1="2" x2="11" y2="13" />
|
|
|
|
|
<polygon points="22 2 15 22 11 13 2 9 22 2" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
Send
|
|
|
|
|
</button>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="btn-primary dropdown-toggle"
|
|
|
|
|
onclick="toggleScheduleMenu()"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="12"
|
|
|
|
|
height="12"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<polyline points="6 9 12 15 18 9" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
<div class="schedule-menu" id="schedule-menu">
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="schedule-option"
|
|
|
|
|
onclick="scheduleSend('tomorrow-morning')"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<circle cx="12" cy="12" r="5" />
|
|
|
|
|
<line x1="12" y1="1" x2="12" y2="3" />
|
|
|
|
|
<line x1="12" y1="21" x2="12" y2="23" />
|
|
|
|
|
<line
|
|
|
|
|
x1="4.22"
|
|
|
|
|
y1="4.22"
|
|
|
|
|
x2="5.64"
|
|
|
|
|
y2="5.64"
|
|
|
|
|
/>
|
|
|
|
|
<line
|
|
|
|
|
x1="18.36"
|
|
|
|
|
y1="18.36"
|
|
|
|
|
x2="19.78"
|
|
|
|
|
y2="19.78"
|
|
|
|
|
/>
|
|
|
|
|
<line x1="1" y1="12" x2="3" y2="12" />
|
|
|
|
|
<line x1="21" y1="12" x2="23" y2="12" />
|
|
|
|
|
<line
|
|
|
|
|
x1="4.22"
|
|
|
|
|
y1="19.78"
|
|
|
|
|
x2="5.64"
|
|
|
|
|
y2="18.36"
|
|
|
|
|
/>
|
|
|
|
|
<line
|
|
|
|
|
x1="18.36"
|
|
|
|
|
y1="5.64"
|
|
|
|
|
x2="19.78"
|
|
|
|
|
y2="4.22"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
<span>Tomorrow morning (8:00 AM)</span>
|
|
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="schedule-option"
|
|
|
|
|
onclick="scheduleSend('tomorrow-afternoon')"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<circle cx="12" cy="12" r="10" />
|
|
|
|
|
<polyline points="12 6 12 12 16 14" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
<span>Tomorrow afternoon (1:00 PM)</span>
|
|
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="schedule-option"
|
|
|
|
|
onclick="scheduleSend('monday')"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<rect
|
|
|
|
|
x="3"
|
|
|
|
|
y="4"
|
|
|
|
|
width="18"
|
|
|
|
|
height="18"
|
|
|
|
|
rx="2"
|
|
|
|
|
ry="2"
|
|
|
|
|
/>
|
|
|
|
|
<line x1="16" y1="2" x2="16" y2="6" />
|
|
|
|
|
<line x1="8" y1="2" x2="8" y2="6" />
|
|
|
|
|
<line x1="3" y1="10" x2="21" y2="10" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
<span>Monday morning (8:00 AM)</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="schedule-divider"></div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="schedule-option"
|
|
|
|
|
onclick="openCustomSchedule()"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<circle cx="12" cy="12" r="3" />
|
|
|
|
|
<path
|
|
|
|
|
d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
<span>Pick date & time...</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</dialog>
|
|
|
|
|
|
|
|
|
|
<!-- Templates Modal -->
|
|
|
|
|
<dialog id="templates-modal" class="modal">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h2>Email Templates</h2>
|
|
|
|
|
<button class="icon-btn" onclick="closeTemplates()">
|
2026-01-06 22:57:00 -03:00
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="18" y1="6" x2="6" y2="18" />
|
|
|
|
|
<line x1="6" y1="6" x2="18" y2="18" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
2025-12-04 18:15:31 -03:00
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="templates-list"
|
|
|
|
|
id="templates-list"
|
|
|
|
|
hx-get="/api/ui/email/templates"
|
|
|
|
|
hx-trigger="load"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="loading-state"><div class="spinner"></div></div>
|
2025-12-04 18:15:31 -03:00
|
|
|
</div>
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="modal-footer">
|
2026-01-06 22:57:00 -03:00
|
|
|
<button class="btn-secondary" onclick="closeTemplates()">
|
|
|
|
|
Cancel
|
|
|
|
|
</button>
|
|
|
|
|
<button class="btn-primary" onclick="createNewTemplate()">
|
|
|
|
|
+ New Template
|
|
|
|
|
</button>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</dialog>
|
|
|
|
|
|
|
|
|
|
<!-- Signatures Modal -->
|
|
|
|
|
<dialog id="signatures-modal" class="modal">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h2>Email Signatures</h2>
|
|
|
|
|
<button class="icon-btn" onclick="closeSignatures()">
|
2026-01-06 22:57:00 -03:00
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="18" y1="6" x2="6" y2="18" />
|
|
|
|
|
<line x1="6" y1="6" x2="18" y2="18" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="signatures-list"
|
|
|
|
|
id="signatures-list"
|
|
|
|
|
hx-get="/api/ui/email/signatures"
|
|
|
|
|
hx-trigger="load"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="loading-state"><div class="spinner"></div></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
2026-01-06 22:57:00 -03:00
|
|
|
<button class="btn-secondary" onclick="closeSignatures()">
|
|
|
|
|
Cancel
|
|
|
|
|
</button>
|
|
|
|
|
<button class="btn-primary" onclick="createNewSignature()">
|
|
|
|
|
+ New Signature
|
|
|
|
|
</button>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</dialog>
|
|
|
|
|
|
|
|
|
|
<!-- Rules Modal -->
|
|
|
|
|
<dialog id="rules-modal" class="modal">
|
|
|
|
|
<div class="modal-content modal-large">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h2>Email Rules</h2>
|
|
|
|
|
<button class="icon-btn" onclick="closeRules()">
|
2026-01-06 22:57:00 -03:00
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="18" y1="6" x2="6" y2="18" />
|
|
|
|
|
<line x1="6" y1="6" x2="18" y2="18" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<div
|
|
|
|
|
class="rules-list"
|
|
|
|
|
id="rules-list"
|
|
|
|
|
hx-get="/api/ui/email/rules"
|
|
|
|
|
hx-trigger="load"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
>
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="loading-state"><div class="spinner"></div></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button class="btn-secondary" onclick="closeRules()">Cancel</button>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button class="btn-primary" onclick="createNewRule()">
|
|
|
|
|
+ New Rule
|
|
|
|
|
</button>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</dialog>
|
|
|
|
|
|
|
|
|
|
<!-- Auto-Responder Modal -->
|
|
|
|
|
<dialog id="autoresponder-modal" class="modal">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h2>Automatic Replies</h2>
|
|
|
|
|
<button class="icon-btn" onclick="closeAutoResponder()">
|
2026-01-06 22:57:00 -03:00
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="18" y1="6" x2="6" y2="18" />
|
|
|
|
|
<line x1="6" y1="6" x2="18" y2="18" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<form
|
|
|
|
|
id="autoresponder-form"
|
|
|
|
|
hx-post="/api/ui/email/auto-responder"
|
|
|
|
|
hx-swap="none"
|
|
|
|
|
>
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="toggle-label">
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
name="enabled"
|
|
|
|
|
id="autoresponder-enabled"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
<span class="toggle-switch"></span>
|
|
|
|
|
<span>Send automatic replies</span>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>Start date</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="datetime-local"
|
|
|
|
|
name="start_date"
|
|
|
|
|
id="autoresponder-start"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>End date</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="datetime-local"
|
|
|
|
|
name="end_date"
|
|
|
|
|
id="autoresponder-end"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>Subject</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
name="subject"
|
|
|
|
|
value="Out of Office"
|
|
|
|
|
placeholder="Reply subject"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>Message</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<textarea
|
|
|
|
|
name="body"
|
|
|
|
|
rows="6"
|
|
|
|
|
placeholder="Your automatic reply message..."
|
|
|
|
|
></textarea>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="checkbox-label">
|
2026-01-06 22:57:00 -03:00
|
|
|
<input type="checkbox" name="internal_only" />
|
2025-12-06 11:09:12 -03:00
|
|
|
<span>Send only to people in my organization</span>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
<div class="modal-footer">
|
2026-01-06 22:57:00 -03:00
|
|
|
<button class="btn-secondary" onclick="closeAutoResponder()">
|
|
|
|
|
Cancel
|
|
|
|
|
</button>
|
|
|
|
|
<button class="btn-primary" onclick="saveAutoResponder()">
|
|
|
|
|
Save
|
|
|
|
|
</button>
|
2025-12-04 18:15:31 -03:00
|
|
|
</div>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
</dialog>
|
|
|
|
|
|
|
|
|
|
<!-- Schedule Picker Modal -->
|
|
|
|
|
<!-- Add Account Modal -->
|
|
|
|
|
<dialog id="add-account-modal" class="modal">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h2>Add Email Account</h2>
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
class="icon-btn"
|
|
|
|
|
onclick="document.getElementById('add-account-modal').close()"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="18" y1="6" x2="6" y2="18" />
|
|
|
|
|
<line x1="6" y1="6" x2="18" y2="18" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
2025-12-04 18:15:31 -03:00
|
|
|
</div>
|
2026-01-06 22:57:00 -03:00
|
|
|
<form
|
|
|
|
|
hx-post="/api/email/accounts/add"
|
|
|
|
|
hx-target="#accounts-list"
|
|
|
|
|
hx-swap="innerHTML"
|
|
|
|
|
hx-on::after-request="if(event.detail.successful) document.getElementById('add-account-modal').close()"
|
|
|
|
|
>
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="form-group">
|
|
|
|
|
<label>Account Name</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
name="name"
|
|
|
|
|
placeholder="Work, Personal, etc."
|
|
|
|
|
required
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>Email Address</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="email"
|
|
|
|
|
name="email"
|
|
|
|
|
placeholder="you@example.com"
|
|
|
|
|
required
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>IMAP Server</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
name="imap_server"
|
|
|
|
|
placeholder="imap.example.com"
|
|
|
|
|
required
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>IMAP Port</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input type="number" name="imap_port" value="993" required />
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>SMTP Server</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
name="smtp_server"
|
|
|
|
|
placeholder="smtp.example.com"
|
|
|
|
|
required
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>SMTP Port</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input type="number" name="smtp_port" value="587" required />
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>Username</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
name="username"
|
|
|
|
|
placeholder="username or email"
|
|
|
|
|
required
|
2026-01-11 23:59:24 -03:00
|
|
|
autocomplete="username"
|
2026-01-06 22:57:00 -03:00
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>Password</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input
|
|
|
|
|
type="password"
|
|
|
|
|
name="password"
|
|
|
|
|
placeholder="••••••••"
|
|
|
|
|
required
|
|
|
|
|
autocomplete="current-password"
|
|
|
|
|
/>
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="checkbox-label">
|
2026-01-06 22:57:00 -03:00
|
|
|
<input type="checkbox" name="use_ssl" checked />
|
2025-12-06 11:09:12 -03:00
|
|
|
<span>Use SSL/TLS</span>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
2026-01-06 22:57:00 -03:00
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="btn-secondary"
|
|
|
|
|
onclick="document.getElementById('add-account-modal').close()"
|
|
|
|
|
>
|
|
|
|
|
Cancel
|
|
|
|
|
</button>
|
2025-12-06 11:09:12 -03:00
|
|
|
<button type="submit" class="btn-primary">Add Account</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
2025-12-04 18:15:31 -03:00
|
|
|
</div>
|
2025-12-06 11:09:12 -03:00
|
|
|
</dialog>
|
|
|
|
|
|
|
|
|
|
<dialog id="schedule-modal" class="modal">
|
|
|
|
|
<div class="modal-content modal-small">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h2>Schedule Send</h2>
|
|
|
|
|
<button class="icon-btn" onclick="closeScheduleModal()">
|
2026-01-06 22:57:00 -03:00
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="18" y1="6" x2="6" y2="18" />
|
|
|
|
|
<line x1="6" y1="6" x2="18" y2="18" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="schedule-form">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>Date</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input type="date" id="schedule-date" min="" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>Time</label>
|
2026-01-06 22:57:00 -03:00
|
|
|
<input type="time" id="schedule-time" value="09:00" />
|
2025-12-06 11:09:12 -03:00
|
|
|
</div>
|
2025-12-04 18:15:31 -03:00
|
|
|
</div>
|
2025-12-06 11:09:12 -03:00
|
|
|
<div class="modal-footer">
|
2026-01-06 22:57:00 -03:00
|
|
|
<button class="btn-secondary" onclick="closeScheduleModal()">
|
|
|
|
|
Cancel
|
|
|
|
|
</button>
|
|
|
|
|
<button class="btn-primary" onclick="confirmSchedule()">
|
|
|
|
|
Schedule
|
|
|
|
|
</button>
|
2025-12-04 18:15:31 -03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-12-06 11:09:12 -03:00
|
|
|
</dialog>
|
2025-12-04 18:15:31 -03:00
|
|
|
|
2026-01-11 23:59:24 -03:00
|
|
|
<link rel="stylesheet" href="mail/mail.css" />
|
|
|
|
|
<script src="mail/mail.js"></script>
|