Remove unused launch-from-recipe dialog path (Refs #91)
CI / checks (push) Successful in 4m36s

This commit is contained in:
2026-10-09 16:36:03 -04:00
parent 4059fc30d6
commit 8fcb8312a3
@@ -13,12 +13,10 @@
let { let {
open = $bindable(false), open = $bindable(false),
sourceDeploymentId = '',
initialGame = 't5', initialGame = 't5',
initialMapSlug = '' initialMapSlug = ''
}: { }: {
open?: boolean; open?: boolean;
sourceDeploymentId?: string;
initialGame?: ZombieGame; initialGame?: ZombieGame;
initialMapSlug?: string; initialMapSlug?: string;
} = $props(); } = $props();
@@ -144,26 +142,6 @@
const body = await response.json(); const body = await response.json();
if (current !== visit) return; if (current !== visit) return;
catalogs = { t5: body.t5Zombie, t6: body.t6Zombie }; catalogs = { t5: body.t5Zombie, t6: body.t6Zombie };
if (sourceDeploymentId) {
const sourceResponse = await fetch(
`/api/provisioning/${encodeURIComponent(sourceDeploymentId)}`,
{ signal }
);
const source = await sourceResponse.json();
if (current !== visit) return;
if (
!sourceResponse.ok ||
!source.recipe ||
!['t5', 't6'].includes(source.recipe.game) ||
!catalogs[source.recipe.game as ZombieGame].some(
(map) => map.slug === source.recipe.mapSlug
)
) {
throw new Error('The original launch map is unavailable.');
}
game = source.recipe.game;
mapSlug = source.recipe.mapSlug;
}
if (!catalogs[game].some((map) => map.slug === mapSlug)) if (!catalogs[game].some((map) => map.slug === mapSlug))
mapSlug = catalogs[game][0]?.slug ?? ''; mapSlug = catalogs[game][0]?.slug ?? '';
loaded = true; loaded = true;