| 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); |
| 728 | | 728 | |
| | 729 | if (added) { |
| 729 | toastr.success(`Imported tags:<br />${tagsToImport.map(x => x.name).join(', ')}`, 'Importing Tags', { escapeHtml: false }); | 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 | } |
| 730 | | 734 | |
| 731 | return added; | 735 | return added; |
| 732 | } | 736 | } |