feat: pre-populate upload title with filename when no IGDB matches
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:
Hermes Agent
2026-06-01 12:41:24 +02:00
parent 677740aece
commit 4044ef3786
+3 -3
View File
@@ -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()}