feat: pre-populate upload title with filename when no IGDB matches
Build & Deploy / build-and-deploy (push) Successful in 2m17s
Build & Deploy / build-and-deploy (push) Successful in 2m17s
When a game ZIP is selected and IGDB returns no matches, the search box is now pre-filled with the filename (minus .zip extension) so the user can edit it rather than typing from scratch.
This commit is contained in:
@@ -130,7 +130,7 @@
|
||||
const name = file.name.replace(/\.zip$/i, "");
|
||||
pendingFile = file;
|
||||
pendingFileName = name;
|
||||
pendingTitle = "";
|
||||
pendingTitle = name;
|
||||
igdbResults = null;
|
||||
searching = true;
|
||||
searchError = "";
|
||||
@@ -369,12 +369,12 @@
|
||||
{/if}
|
||||
</div>
|
||||
{:else}
|
||||
<p class="match-label">No matches found. Enter a title to search IGDB:</p>
|
||||
<p class="match-label">No matches found. Edit the title below and search IGDB:</p>
|
||||
{/if}
|
||||
<div class="upload-custom-row">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Search IGDB..."
|
||||
placeholder="Edit title..."
|
||||
bind:value={pendingTitle}
|
||||
disabled={uploading || searching}
|
||||
onkeydown={(e) => e.key === "Enter" && handleManualSearch()}
|
||||
|
||||
Reference in New Issue
Block a user