mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix tags import after merge
This commit is contained in:
@ -237,9 +237,9 @@ async function importTags(imported_char) {
|
|||||||
let newTags = imported_tags.filter(t => !existingTags.includes(t));
|
let newTags = imported_tags.filter(t => !existingTags.includes(t));
|
||||||
let selected_tags = "";
|
let selected_tags = "";
|
||||||
if (newTags.length === 0) {
|
if (newTags.length === 0) {
|
||||||
await callPopup(`<h3>Importing Tags</h3><p>${existingTags.length} exisiting tags have been found.</p>`, 'text');
|
await callPopup(`<h3>Importing Tags</h3><p>${existingTags.length} existing tags have been found.</p>`, 'text');
|
||||||
} else {
|
} else {
|
||||||
selected_tags = await callPopup(`<h3>Importing Tags</h3><p>${existingTags.length} exisiting tags have been found.</p><p>The following ${newTags.length} new tags will be imported.</p>`, 'input', newTags.join(', '));
|
selected_tags = await callPopup(`<h3>Importing Tags</h3><p>${existingTags.length} existing tags have been found.</p><p>The following ${newTags.length} new tags will be imported.</p>`, 'input', newTags.join(', '));
|
||||||
}
|
}
|
||||||
selected_tags = existingTags.concat(selected_tags.split(', '));
|
selected_tags = existingTags.concat(selected_tags.split(', '));
|
||||||
selected_tags = selected_tags.filter(t => t !== "");
|
selected_tags = selected_tags.filter(t => t !== "");
|
||||||
@ -258,8 +258,9 @@ async function importTags(imported_char) {
|
|||||||
tag_map[imported_char.avatar].push(tag.id);
|
tag_map[imported_char.avatar].push(tag.id);
|
||||||
};
|
};
|
||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
printTags();
|
await getCharacters();
|
||||||
getCharacters();
|
printTagFilters(tag_filter_types.character);
|
||||||
|
printTagFilters(tag_filter_types.group_member);
|
||||||
|
|
||||||
// need to return false to keep the input clear
|
// need to return false to keep the input clear
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user