Add new conversation button

This commit is contained in:
dwrz
2026-10-31 17:20:37 +00:00
parent d9ce81af9c
commit 456d9ee6f3
5 changed files with 98 additions and 22 deletions
+4
View File
@@ -116,6 +116,7 @@ export class UI {
);
this.$conversationsClose = document.getElementById('conversations-close');
this.$conversationsSearch = document.getElementById('conversation-search');
this.$conversationNew = document.getElementById('conversation-new');
this.$conversationsList = document.getElementById('conversation-list');
this.$tplConversationItem = document.getElementById(
'tpl-conversation-item',
@@ -1166,6 +1167,9 @@ export class UI {
this.$conversationsSearch.addEventListener('input', () =>
this.handlers.onConversationSearch(this.$conversationsSearch.value),
);
this.$conversationNew.addEventListener('click', () =>
this.handlers.onNewConversation(),
);
this.$conversationsList.addEventListener('click', (event) => {
const $item = event.target.closest('[data-conversation-id]');
if (!$item) return;