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:
parent
418f858807
commit
932e63e299
7 changed files with 38 additions and 3 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue