Filter default tags (probably), update name

This commit is contained in:
BlipRanger
2023-06-28 00:43:45 -04:00
parent 2b5a028af4
commit 762684ffea
2 changed files with 5 additions and 4 deletions

View File

@@ -2269,8 +2269,8 @@
<label for="show_card_avatar_urls"><input id="show_card_avatar_urls" type="checkbox" /> <label for="show_card_avatar_urls"><input id="show_card_avatar_urls" type="checkbox" />
<span data-i18n="Show avatar filenames">Show avatar filenames</span> <span data-i18n="Show avatar filenames">Show avatar filenames</span>
</label> </label>
<label for="show_card_tags"><input id="show_card_tags" type="checkbox" /> <label for="import_card_tags"><input id="import_card_tags" type="checkbox" />
<span data-i18n="Show Card Tags">Show Card Tags</span> <span data-i18n="Import Card Tags">Import Card Tags</span>
</label> </label>
<div class="inline-drawer wide100p flexFlowColumn"> <div class="inline-drawer wide100p flexFlowColumn">

View File

@@ -203,8 +203,9 @@ function selectTag(event, ui, listSelector) {
} }
function importTags(imported_char) { function importTags(imported_char) {
//Ignore the tags ROOT and TAVERN
for (let tagName of imported_char.data.tags) { let imported_tags = imported_char.tags.filter(t => t !== "ROOT" && t !== "TAVERN");
for (let tagName of imported_tags) {
let tag = tags.find(t => t.name === tagName); let tag = tags.find(t => t.name === tagName);
// create new tag if it doesn't exist // create new tag if it doesn't exist