diff --git a/public/script.js b/public/script.js index 26185df1f..7f267434d 100644 --- a/public/script.js +++ b/public/script.js @@ -6336,7 +6336,7 @@ function importCharacter(file) { await getCharacters(); select_rm_info(`char_import`, data.file_name, oldSelectedChar); - if(power_user.import_card_tags){ + if (power_user.import_card_tags) { let currentContext = getContext(); let avatarFileName = `${data.file_name}.png`; let importedCharacter = currentContext.characters.find(character => character.avatar === avatarFileName); diff --git a/public/scripts/tags.js b/public/scripts/tags.js index 3888c9f3b..755ef327a 100644 --- a/public/scripts/tags.js +++ b/public/scripts/tags.js @@ -236,10 +236,10 @@ async function importTags(imported_char) { let existingTags = await getExistingTags(imported_tags); let newTags = imported_tags.filter(t => !existingTags.includes(t)); let selected_tags = ""; - if(newTags.length === 0) { - await callPopup(`
${existingTags.length} exisiting tags have been found.
`, 'text'); + if (newTags.length === 0) { + await callPopup(`${existingTags.length} existing tags have been found.
`, 'text'); } else { - selected_tags = await callPopup(`${existingTags.length} exisiting tags have been found.
The following ${newTags.length} new tags will be imported.
`, 'input', newTags.join(', ')); + selected_tags = await callPopup(`${existingTags.length} existing tags have been found.
The following ${newTags.length} new tags will be imported.
`, 'input', newTags.join(', ')); } selected_tags = existingTags.concat(selected_tags.split(', ')); selected_tags = selected_tags.filter(t => t !== ""); @@ -258,8 +258,9 @@ async function importTags(imported_char) { tag_map[imported_char.avatar].push(tag.id); }; saveSettingsDebounced(); - printTags(); - getCharacters(); + await getCharacters(); + printTagFilters(tag_filter_types.character); + printTagFilters(tag_filter_types.group_member); // need to return false to keep the input clear return false;