Add names display to data bank

This commit is contained in:
Cohee
2024-04-16 02:36:46 +03:00
parent 242d57c14b
commit 57314443ed
2 changed files with 21 additions and 7 deletions

View File

@ -656,6 +656,12 @@ async function openAttachmentManager() {
const isNotInChat = getCurrentChatId() === undefined; const isNotInChat = getCurrentChatId() === undefined;
template.find('.characterAttachmentsBlock').toggle(!isNotCharacter); template.find('.characterAttachmentsBlock').toggle(!isNotCharacter);
template.find('.chatAttachmentsBlock').toggle(!isNotInChat); template.find('.chatAttachmentsBlock').toggle(!isNotInChat);
const characterName = characters[this_chid]?.name || 'Anonymous';
template.find('.characterAttachmentsName').text(characterName);
const chatName = getCurrentChatId() || 'Unnamed chat';
template.find('.chatAttachmentsName').text(chatName);
} }
const hasFandomPlugin = await isFandomPluginAvailable(); const hasFandomPlugin = await isFandomPluginAvailable();

View File

@ -44,7 +44,9 @@
</div> </div>
<div class="justifyLeft characterAttachmentsBlock marginBot10"> <div class="justifyLeft characterAttachmentsBlock marginBot10">
<h3 class="margin0 title_restorable"> <h3 class="margin0 title_restorable">
<span data-i18n="Character Attachments">Character Attachments</span> <span data-i18n="Character Attachments">
Character Attachments
</span>
<div class="flex-container flexGap10"> <div class="flex-container flexGap10">
<div class="scrapeWebpageButton menu_button_icon menu_button" data-attachment-manager-target="character" title="Download a page from the web."> <div class="scrapeWebpageButton menu_button_icon menu_button" data-attachment-manager-target="character" title="Download a page from the web.">
<i class="fa-fw fa-solid fa-globe"></i> <i class="fa-fw fa-solid fa-globe"></i>
@ -66,9 +68,12 @@
</div> </div>
</div> </div>
</h3> </h3>
<small data-i18n="These files are available the current character in all chats they are in."> <div class="flex-container flexFlowColumn">
These files are available the current character in all chats they are in. <strong><small class="characterAttachmentsName"></small></strong>
</small> <small data-i18n="These files are available the current character in all chats they are in.">
These files are available the current character in all chats they are in.
</small>
</div>
<div class="characterAttachmentsList attachmentsList"></div> <div class="characterAttachmentsList attachmentsList"></div>
<hr> <hr>
</div> </div>
@ -98,9 +103,12 @@
</div> </div>
</div> </div>
</h3> </h3>
<small data-i18n="These files are available to all characters in the current chat."> <div class="flex-container flexFlowColumn">
These files are available to all characters in the current chat. <strong><small class="chatAttachmentsName"></small></strong>
</small> <small data-i18n="These files are available to all characters in the current chat.">
These files are available to all characters in the current chat.
</small>
</div>
<div class="chatAttachmentsList attachmentsList"></div> <div class="chatAttachmentsList attachmentsList"></div>
</div> </div>