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

@ -1,4 +1,5 @@
import { config } from "./config.js";
import { showNotification } from "./notification.js";
import { getBase64 } from "./utils.js";
async function request(path, options = {}) {
@ -24,6 +25,8 @@ async function request(path, options = {}) {
} catch (_) {
errorDetail = await response.text().catch(() => '');
}
showNotification("API Error", `WAHA API returned ${response.status}: ${response.statusText}${errorDetail}`, 2000);
throw new Error(`WAHA API returned ${response.status}: ${response.statusText}${errorDetail}`);
}
return response.json();