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:
@@ -65,6 +65,8 @@ export const LayoutApi = {
|
||||
export const SearchApi = {
|
||||
folder: (slug, page = 1, pageSize = 50) =>
|
||||
api.post('/search', folderToRequest(slug, page, pageSize)).then((r) => r.data),
|
||||
query: (q, page = 1, pageSize = 50) =>
|
||||
api.get('/search', { params: { q, page, pageSize } }).then((r) => r.data),
|
||||
};
|
||||
|
||||
function folderToRequest(slug, page, pageSize) {
|
||||
|
||||
Reference in New Issue
Block a user