domains.ts
typescript
sha256:8e05daa29ba6702b4a2380a16d690ba31cc099d69c5c859bc6e6f16a0e945f99
Merge 'fix/deploy-memory-limits-and-log-group' into 'dev' —…
Human
12 days ago
| 1 | /** |
| 2 | * domains.ts — Domains listing page behaviour. |
| 3 | * |
| 4 | * Wires the global navbar search bar to the hero search input so that |
| 5 | * clicking / focusing the navbar field redirects focus to the hero input, |
| 6 | * exactly as the explore page does with its own hero search. |
| 7 | */ |
| 8 | |
| 9 | export function initDomains(): void { |
| 10 | wireNavbarSearch(); |
| 11 | } |
| 12 | |
| 13 | // ── Wire navbar search → hero search on domains page ───────────────────────── |
| 14 | |
| 15 | function wireNavbarSearch(): void { |
| 16 | const navForm = document.querySelector<HTMLFormElement>('.navbar-search-form'); |
| 17 | const navInput = document.querySelector<HTMLInputElement>('.navbar-search-input'); |
| 18 | const heroInput = document.getElementById('domain-search-input') as HTMLInputElement | null; |
| 19 | |
| 20 | if (!navForm || !navInput || !heroInput) return; |
| 21 | |
| 22 | // Intercept navbar form submit: push value into hero input and trigger HTMX |
| 23 | navForm.addEventListener('submit', (e) => { |
| 24 | e.preventDefault(); |
| 25 | const q = navInput.value.trim(); |
| 26 | if (q) heroInput.value = q; |
| 27 | heroInput.focus(); |
| 28 | heroInput.dispatchEvent(new Event('input', { bubbles: true })); |
| 29 | navInput.value = ''; |
| 30 | }); |
| 31 | |
| 32 | // Redirect focus from navbar input straight to the hero input |
| 33 | navInput.addEventListener('focus', () => { |
| 34 | heroInput.focus(); |
| 35 | navInput.blur(); |
| 36 | }); |
| 37 | } |
File History
3 commits
sha256:8e05daa29ba6702b4a2380a16d690ba31cc099d69c5c859bc6e6f16a0e945f99
Merge 'fix/deploy-memory-limits-and-log-group' into 'dev' —…
Human
12 days ago
sha256:3fadb0439bba9451b89229676971c0d4a40900dec7810e9d5f8791b8d950d505
fix: install.sh version from latest published tarball, not …
Sonnet 4.6
minor
⚠
103 days ago
sha256:763eb2cb8675073b84c19345b27586d2ed939a9aee97c5479b69f502f1a70eff
fix(tests): update test suite to match current implementation
Sonnet 4.6
patch
124 days ago