routes: update layout and teams page

This commit is contained in:
Justin Edmund 2025-11-30 20:06:49 -08:00
parent af659b9760
commit d2cb4c5052
2 changed files with 7 additions and 4 deletions

View file

@ -117,6 +117,10 @@
title={sidebar.title} title={sidebar.title}
onclose={() => sidebar.close()} onclose={() => sidebar.close()}
scrollable={sidebar.scrollable} scrollable={sidebar.scrollable}
onsave={sidebar.onsave}
saveLabel={sidebar.saveLabel}
element={sidebar.element}
onback={sidebar.onback}
> >
{#if sidebar.component} {#if sidebar.component}
<svelte:component this={sidebar.component} {...sidebar.componentProps} /> <svelte:component this={sidebar.component} {...sidebar.componentProps} />

View file

@ -75,9 +75,9 @@
// Set selectedSlot to first valid empty slot for this tab // Set selectedSlot to first valid empty slot for this tab
if (gridType === GridType.Character) { if (gridType === GridType.Character) {
// Find first empty character slot (skip protagonist at position 0) // Find first empty character slot
const emptySlot = [1, 2, 3, 4].find(i => !characters.find(c => c.position === i)) const emptySlot = [0, 1, 2, 3, 4].find(i => !characters.find(c => c.position === i))
selectedSlot = emptySlot ?? 1 selectedSlot = emptySlot ?? 0
} else if (gridType === GridType.Weapon) { } else if (gridType === GridType.Weapon) {
// Find first empty weapon slot (mainhand first, then grid) // Find first empty weapon slot (mainhand first, then grid)
const emptySlot = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8].find(i => const emptySlot = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8].find(i =>
@ -638,7 +638,6 @@
{characters} {characters}
{mainWeaponElement} {mainWeaponElement}
{partyElement} {partyElement}
job={party.job}
/> />
</div> </div>
{/if} {/if}