Fix issue #35: Dragonroll frontend: item modifications
All checks were successful
Test / test (push) Successful in 2s

This commit is contained in:
Gitea OpenCode Agent
2026-10-14 18:08:19 +00:00
parent 2c78ad039a
commit 22c6403736
15 changed files with 404 additions and 20 deletions

View File

@@ -109,6 +109,9 @@ async function saveFoundryItem(campaign, source, fullSync = false) {
item.foundryItemId = foundryItemId;
if (!fullSync || item.isNew) Object.assign(item, fields);
// Foundry's own icon is kept on every save, not only when the edits above
// land: the item window offers it back after the user picked their own.
if (fields.image) item.foundryImage = fields.image;
if (!item.foundryNames.includes(fields.name)) {
item.foundryNames = [...item.foundryNames, fields.name].slice(-MAX_FOUNDRY_NAMES);
}