0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-26 03:33:28 +02:00
silverwind 2ecee0bb0a
Refactor search-box module to await-style chooseFromApi
Move web_src/js/modules/fomantic/search.ts to web_src/js/modules/search.ts
(no Fomantic dependency anymore). Replace the imperative
initSearchBox(el, opts) with chooseFromApi(el, url, parse) that returns
a Promise<SearchResult> resolving with the user's chosen item; callers
loop with `while (box.isConnected) { const pick = await ...; ... }` and
own writing back to whatever input/state they manage.

Cleanup is via a single AbortController whose signal is passed to all
listeners; the in-flight fetch has its own controller so a new keystroke
can cancel just the request without tearing down listeners.

Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
2026-04-26 21:05:36 +02:00
..
2026-04-18 16:01:58 +08:00
2026-04-15 17:26:26 +00:00
2026-04-15 17:26:26 +00:00
2026-03-29 10:24:30 +00:00
2026-04-18 16:01:58 +08:00
2026-04-15 17:26:26 +00:00