Log if tags couldn't be imported

df3926bf1aa24a8d674f36116d8aba627155d76c

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +5 -1Ignore whitespace
public/scripts/tags.js+5 -1
@@ -726,7 +726,11 @@ async function importTags(character, { importSetting = null } = {}) {
726 const tagsToImport = tagNamesToImport.map(tag => getTag(tag, { createNew: true }));726 const tagsToImport = tagNamesToImport.map(tag => getTag(tag, { createNew: true }));
727 const added = addTagsToEntity(tagsToImport, character.avatar);727 const added = addTagsToEntity(tagsToImport, character.avatar);
728728
729 toastr.success(`Imported tags:<br />${tagsToImport.map(x => x.name).join(', ')}`, 'Importing Tags', { escapeHtml: false });729 if (added) {
730 toastr.success(`Imported tags:<br />${tagsToImport.map(x => x.name).join(', ')}`, 'Importing Tags', { escapeHtml: false });
731 } else {
732 toastr.error(`Couldn't import tags:<br />${tagsToImport.map(x => x.name).join(', ')}`, 'Importing Tags', { escapeHtml: false });
733 }
730734
731 return added;735 return added;
732}736}