auto-download images after entity creation

This commit is contained in:
Justin Edmund 2025-12-14 20:00:23 -08:00
parent 9fb66e731e
commit d6160d0bae
3 changed files with 6 additions and 0 deletions

View file

@ -217,6 +217,8 @@
}
const newCharacter = await entityAdapter.createCharacter(payload)
// Trigger image download in background (don't await - it queues a job)
entityAdapter.downloadCharacterImages(newCharacter.id).catch(console.error)
await goto(`/database/characters/${newCharacter.id}`)
} catch (error) {
saveError = 'Failed to create character. Please try again.'

View file

@ -197,6 +197,8 @@
}
const newSummon = await entityAdapter.createSummon(payload)
// Trigger image download in background (don't await - it queues a job)
entityAdapter.downloadSummonImages(newSummon.id).catch(console.error)
await goto(`/database/summons/${newSummon.id}`)
} catch (error) {
saveError = 'Failed to create summon. Please try again.'

View file

@ -204,6 +204,8 @@
}
const newWeapon = await entityAdapter.createWeapon(payload)
// Trigger image download in background (don't await - it queues a job)
entityAdapter.downloadWeaponImages(newWeapon.id).catch(console.error)
await goto(`/database/weapons/${newWeapon.id}`)
} catch (error) {
saveError = 'Failed to create weapon. Please try again.'