Fix upload dialog: search box button always searches
Build & Deploy / build-and-deploy (push) Successful in 44s

Previously when no IGDB matches were found, the button next to the
search box changed from 'Search' to 'Upload' after the first search.
Since the text is editable and users may want to refine their query,
this button should always trigger a search.

Upload is still available via:
- The 'Upload anyway as "..."' button (shown after failed search)
- The 'Use filename: ...' button at the bottom
This commit is contained in:
Hermes Agent committed 2026-05-28 15:03:13 +02:00
1 parent 5b55a53b73
commit 95c7ba7192
1 file changed
+3 -3
+3 -3
View File
@@ -194,10 +194,10 @@
placeholder="Search IGDB..."
bind:value={pendingTitle}
disabled={uploading || searching}
onkeydown={(e) => e.key === "Enter" && (manualSearched ? doUpload(pendingTitle.trim()) : handleManualSearch())}
onkeydown={(e) => e.key === "Enter" && handleManualSearch()}
/>
<button class="btn" onclick={manualSearched ? () => doUpload(pendingTitle.trim()) : handleManualSearch} disabled={uploading || searching || !pendingTitle.trim()}>
{uploading ? "Uploading..." : manualSearched ? "Upload" : "Search"}
<button class="btn" onclick={handleManualSearch} disabled={uploading || searching || !pendingTitle.trim()}>
{uploading ? "Uploading..." : "Search"}
</button>
</div>
<button class="btn btn-secondary" onclick={() => doUpload(pendingFileName)} disabled={uploading}>