accordeon_not_ok
This commit is contained in:
parent
ce25ecc237
commit
1cfaf5ab1b
@ -457,7 +457,7 @@ class ChatElement extends HTMLElement {
|
|||||||
messageContent.className = `message ${isCurrentUser ? 'user' : ''}`;
|
messageContent.className = `message ${isCurrentUser ? 'user' : ''}`;
|
||||||
|
|
||||||
const senderEmoji = await addressToEmoji(message.metadata.sender);
|
const senderEmoji = await addressToEmoji(message.metadata.sender);
|
||||||
|
|
||||||
if (message.type === 'file') {
|
if (message.type === 'file') {
|
||||||
let fileContent = '';
|
let fileContent = '';
|
||||||
if (message.content.type.startsWith('image/')) {
|
if (message.content.type.startsWith('image/')) {
|
||||||
@ -721,6 +721,25 @@ class ChatElement extends HTMLElement {
|
|||||||
|
|
||||||
li.appendChild(roleList);
|
li.appendChild(roleList);
|
||||||
groupList.appendChild(li);
|
groupList.appendChild(li);
|
||||||
|
|
||||||
|
container.addEventListener('click', (event) => {
|
||||||
|
event.stopPropagation();
|
||||||
|
container.classList.toggle('expanded');
|
||||||
|
const roleList = container.parentElement?.querySelector('.role-list');
|
||||||
|
const dm = container.parentElement?.querySelector('.dm');
|
||||||
|
|
||||||
|
if (roleList) {
|
||||||
|
// Si le container est expanded, on montre la liste des rôles
|
||||||
|
if (container.classList.contains('expanded')) {
|
||||||
|
(roleList as HTMLElement).style.display = 'block';
|
||||||
|
if (dm) (dm as HTMLElement).style.display = 'block';
|
||||||
|
} else {
|
||||||
|
// Sinon on cache la liste des rôles
|
||||||
|
(roleList as HTMLElement).style.display = 'none';
|
||||||
|
if (dm) (dm as HTMLElement).style.display = 'none';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -925,7 +944,7 @@ class ChatElement extends HTMLElement {
|
|||||||
if (this.processId) {
|
if (this.processId) {
|
||||||
console.log('🔍 Loading chat with process ID:', this.processId);
|
console.log('🔍 Loading chat with process ID:', this.processId);
|
||||||
this.loadGroupListFromAProcess(this.processId);
|
this.loadGroupListFromAProcess(this.processId);
|
||||||
} else {
|
} else if(this.processId == null){
|
||||||
console.error('❌ No process ID found in element attributes');
|
console.error('❌ No process ID found in element attributes');
|
||||||
this.loadAllGroupList();
|
this.loadAllGroupList();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user