Add button to mark chat read on chat-bottom-bar; make icon-btn icon color change to ensure visibility with hover effects; make waha show in-app notification for errors.

This commit is contained in:
天クマ 2026-07-19 11:23:08 -03:00
commit 932e63e299
7 changed files with 38 additions and 3 deletions

View file

@ -107,6 +107,19 @@ export async function loadChatsSorted() {
});
}
export async function loadChat(chatId) {
const db = await openDb();
return new Promise((resolve, reject) => {
const tx = db.transaction("chats", "readonly");
const store = tx.objectStore("chats");
const req = store.get(chatId);
tx.oncomplete = () => resolve(req.result)
tx.onerror = () => reject(req.error);
});
}
function mapMessage(m) {
const from = normalizeId(m.from);
const to = normalizeId(m.to);