fixing folders and image rendering in client

This commit is contained in:
2026-08-15 18:38:11 +01:00
parent 6f0c305367
commit 15678c1b6e
16 changed files with 929 additions and 26 deletions
@@ -78,6 +78,52 @@
</div>
</div>
<div class="card mt-4">
<div class="card-header"><h5 class="mb-0"><i class="bi bi-image me-2"></i>Remote Images</h5></div>
<div class="card-body">
<div class="form-text mb-2">HTML emails can embed images loaded from the sender's own server — a classic tracking pixel. Choose how those are handled.</div>
<form method="POST" action="/webmail/account/remote-images-mode">
<div class="form-check">
<input class="form-check-input" type="radio" name="remote_images_mode" value="ask" id="rim-ask" {{if eq .mailbox.RemoteImagesMode "ask"}}checked{{end}}>
<label class="form-check-label" for="rim-ask">Ask to show remote images <span class="text-muted">(default)</span></label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="remote_images_mode" value="trusted" id="rim-trusted" {{if eq .mailbox.RemoteImagesMode "trusted"}}checked{{end}}>
<label class="form-check-label" for="rim-trusted">Show automatically for senders on my trusted list below</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input" type="radio" name="remote_images_mode" value="always" id="rim-always" {{if eq .mailbox.RemoteImagesMode "always"}}checked{{end}}>
<label class="form-check-label" for="rim-always">Always show remote images <span class="text-danger">(not recommended)</span></label>
</div>
<button type="submit" class="btn btn-primary btn-sm"><i class="bi bi-check-lg me-1"></i>Save</button>
</form>
<hr>
<h6>Trusted senders</h6>
<form method="POST" action="/webmail/account/trusted-senders/add" class="row g-2 align-items-end mb-3">
<div class="col-auto">
<input type="email" class="form-control form-control-sm" name="email" placeholder="sender@example.com" required>
</div>
<div class="col-auto">
<button type="submit" class="btn btn-outline-primary btn-sm"><i class="bi bi-plus-lg me-1"></i>Add</button>
</div>
</form>
{{if .trusted_senders}}
<ul class="list-group list-group-flush">
{{range .trusted_senders}}
<li class="list-group-item list-group-item-dark d-flex justify-content-between align-items-center">
{{.Email}}
<form method="post" action="/webmail/account/trusted-senders/{{.ID}}/remove" class="d-inline">
<button type="submit" class="btn btn-outline-danger btn-sm"><i class="bi bi-trash"></i></button>
</form>
</li>
{{end}}
</ul>
{{else}}
<p class="text-muted mb-0">No trusted senders yet.</p>
{{end}}
</div>
</div>
<div class="card mt-4">
<div class="card-header"><h5 class="mb-0"><i class="bi bi-key-fill me-2"></i>Change Password</h5></div>
<div class="card-body">