diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index a535a82..eae9ebf 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -10,7 +10,8 @@ function parseHash() { const hash = window.location.hash.slice(1) || "/"; - const parts = hash.split("/").filter(Boolean); + const [pathPart] = hash.split("?"); // strip query params + const parts = pathPart.split("/").filter(Boolean); if (parts.length === 0 || (parts.length === 1 && parts[0] === "")) { route = "/"; gameId = null; diff --git a/frontend/src/lib/api.js b/frontend/src/lib/api.js index 559f640..f12cde1 100644 --- a/frontend/src/lib/api.js +++ b/frontend/src/lib/api.js @@ -102,7 +102,7 @@ export function artworkUrl(path) { return `/artwork/${path}`; } -/** Get game bundle URL */ +/** Get game bundle URL for normal play */ export function bundleUrl(game) { if (!game) return null; if (game.bundle_type === "sockdrive") { @@ -110,3 +110,12 @@ export function bundleUrl(game) { } return `/games/${game.id}.jsdos`; } + +/** Get game bundle URL for setup mode (runs SETUP.EXE instead) */ +export function setupBundleUrl(game) { + if (!game) return null; + if (game.bundle_type === "sockdrive") { + return `/api/sockdrive/${game.id}/file?path=.jsdos-setup/dosbox.conf`; + } + return `/games/${game.id}.setup.jsdos`; +} diff --git a/frontend/src/pages/GameDetail.svelte b/frontend/src/pages/GameDetail.svelte index e82b8af..d4c9c99 100644 --- a/frontend/src/pages/GameDetail.svelte +++ b/frontend/src/pages/GameDetail.svelte @@ -1,5 +1,5 @@