feat: search bar in topbar with Gmail-style query syntax

- Search form in topbar routes to /app/search?q=...
- SearchResults page with infinite scroll, same row style as FolderView
- Supports Gmail-like operators: from:, is:unread, has:attachment, after:, before:
- SearchApi.query() calls GET /search which runs through the existing GmailQueryParser
- Input sanitised via encodeURIComponent on submit; external links use noopener/noreferrer

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
cesnimda
2026-06-30 20:15:45 +02:00
parent 4d15a3a8fb
commit 498536451e
5 changed files with 164 additions and 1 deletions
+14
View File
@@ -17,6 +17,20 @@ body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-
.topbar nav a { color: var(--muted); text-decoration: none; margin-right: 14px; }
.topbar nav a.active, .topbar nav a:hover { color: var(--text); }
.spacer { flex: 1; }
/* ── Search bar ── */
.search-form { display: flex; align-items: center; gap: 0; flex: 1; max-width: 420px; }
.search-input {
flex: 1; background: var(--panel-2); border: 1px solid #2c3550; border-right: none;
color: var(--text); border-radius: 6px 0 0 6px; padding: 7px 10px; font-size: 13px;
min-width: 0;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.search-btn {
background: var(--panel-2); border: 1px solid #2c3550; border-left: none;
color: var(--muted); border-radius: 0 6px 6px 0; padding: 7px 10px; cursor: pointer; font-size: 13px;
}
.search-btn:hover { color: var(--text); border-color: var(--accent); }
.user { color: var(--muted); font-size: 13px; }
/* ── App body (sidebar + main) ── */