From 57314443edec8e888b4a2d2bc3de0c5e5dc86145 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Tue, 16 Apr 2024 02:36:46 +0300 Subject: [PATCH] Add names display to data bank --- public/scripts/chats.js | 6 +++++ .../extensions/attachments/manager.html | 22 +++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/public/scripts/chats.js b/public/scripts/chats.js index 3800f64e5..952d6c286 100644 --- a/public/scripts/chats.js +++ b/public/scripts/chats.js @@ -656,6 +656,12 @@ async function openAttachmentManager() { const isNotInChat = getCurrentChatId() === undefined; template.find('.characterAttachmentsBlock').toggle(!isNotCharacter); 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(); diff --git a/public/scripts/extensions/attachments/manager.html b/public/scripts/extensions/attachments/manager.html index 3d5725743..a7e0870c1 100644 --- a/public/scripts/extensions/attachments/manager.html +++ b/public/scripts/extensions/attachments/manager.html @@ -44,7 +44,9 @@

- Character Attachments + + Character Attachments +

- - 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. + +

@@ -98,9 +103,12 @@ - - These files are available to all characters in the current chat. - +
+ + + These files are available to all characters in the current chat. + +