Log if tags couldn't be imported

df3926bf1aa24a8d674f36116d8aba627155d76c

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +4 -0Showing whitespace changes
public/scripts/tags.js+4 -0
@@ -726,7 +726,11 @@ async function importTags(character, { importSetting = null } = {}) {
726726 const tagsToImport = tagNamesToImport.map(tag => getTag(tag, { createNew: true }));
727727 const added = addTagsToEntity(tagsToImport, character.avatar);
728728
729+ if (added) {
729730 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
731735 return added;
732736}