Fix upload dialog: search box button always searches
Build & Deploy / build-and-deploy (push) Successful in 44s
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:
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user