diff --git a/package.json b/package.json index 6ce5d41d..56341b62 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "altus", "productName": "Altus", - "version": "5.0.2", + "version": "5.1.0", "description": "Desktop client for WhatsApp Web with themes & multiple account support.", "main": ".vite/build/main.js", "build": { diff --git a/public/assets/icons/icon-notif.png b/public/assets/icons/icon-notification.png similarity index 100% rename from public/assets/icons/icon-notif.png rename to public/assets/icons/icon-notification.png diff --git a/src/components/TabsList.tsx b/src/components/TabsList.tsx index 267e25b1..e4e20fd7 100644 --- a/src/components/TabsList.tsx +++ b/src/components/TabsList.tsx @@ -23,6 +23,14 @@ interface TabComponentProps { } const TabComponent: Component = (props) => { + const [messageCount, setMessageCount] = createSignal(0); + + window.electronIPCHandlers.onMessageCount(({ messageCount, tabId }) => { + if (tabId === props.tab.id) { + setMessageCount(messageCount); + } + }); + return (
= (props) => { onClick={() => setTabActive(props.tab.id)} data-selected={props.tab.id === tabStore.selectedTabId ? "" : undefined} > + {!!messageCount() && ( +
+ {messageCount() > 99 ? "99+" : messageCount()} +
+ )} {props.tab.name}