nothumanallowed 13.5.166 → 13.5.167

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nothumanallowed",
3
- "version": "13.5.166",
3
+ "version": "13.5.167",
4
4
  "description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, Alexandria E2E messaging, GitHub, Notion, Slack, voice chat, free AI (Liara), 28 languages. Zero-dependency CLI.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/constants.mjs CHANGED
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'url';
5
5
  const __filename = fileURLToPath(import.meta.url);
6
6
  const __dirname = path.dirname(__filename);
7
7
 
8
- export const VERSION = '13.5.166';
8
+ export const VERSION = '13.5.167';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -1135,6 +1135,7 @@ var emailState = {
1135
1135
  composing: false,
1136
1136
  composeData: null, // {to, subject, inReplyTo, references, replyType}
1137
1137
  quillEditor: null,
1138
+ googleUnreadCount: 0,
1138
1139
  };
1139
1140
 
1140
1141
  function renderEmails(el) {
@@ -1217,7 +1218,10 @@ function emailRenderSidebar() {
1217
1218
  for (var gi = 0; gi < googleFolders.length; gi++) {
1218
1219
  var gf = googleFolders[gi];
1219
1220
  var sel = emailState.labelId === gf.id;
1220
- h += '<div onclick="emailSelectGoogleFolder(\\x27' + gf.id + '\\x27,\\x27' + gf.name + '\\x27)" style="padding:7px 14px;cursor:pointer;font-size:12px;' + (sel ? 'background:var(--green3);color:var(--bg);font-weight:700' : 'color:var(--fg)') + '">' + gf.icon + ' ' + esc(gf.name) + '</div>';
1221
+ var gUnread = (gf.id === 'INBOX' && emailState.googleUnreadCount > 0)
1222
+ ? '<span style="margin-left:auto;background:var(--green3);color:var(--bg);border-radius:10px;padding:0 5px;font-size:9px;font-weight:700">' + emailState.googleUnreadCount + '</span>'
1223
+ : '';
1224
+ h += '<div onclick="emailSelectGoogleFolder(\\x27' + gf.id + '\\x27,\\x27' + gf.name + '\\x27)" style="padding:7px 14px;cursor:pointer;font-size:12px;display:flex;align-items:center;gap:6px;' + (sel ? 'background:var(--green3);color:var(--bg);font-weight:700' : 'color:var(--fg)') + '">' + gf.icon + ' ' + esc(gf.name) + gUnread + '</div>';
1221
1225
  }
1222
1226
  } else {
1223
1227
  // IMAP labels
@@ -1266,6 +1270,7 @@ function emailSelectAccount(accountId, type) {
1266
1270
  emailState.offset = 0;
1267
1271
  emailState.messages = [];
1268
1272
  emailState.activeMessageId = null;
1273
+ if (type !== 'google') emailState.googleUnreadCount = 0;
1269
1274
  if (type === 'imap') {
1270
1275
  apiGet('/api/imap/labels?accountId=' + accountId).then(function(r) {
1271
1276
  emailState.labels = r.labels || [];
@@ -1340,6 +1345,10 @@ function emailLoadGoogleMessages() {
1340
1345
  return { id: m.id, subject: m.subject, from_name: m.from, from_address: m.from, internal_date: m.date, body_preview: m.snippet, is_read: !m.isUnread, is_starred: false, has_attachments: false, _google: true };
1341
1346
  });
1342
1347
  emailState.total = emailState.messages.length;
1348
+ if (emailState.labelId === 'INBOX' || !emailState.labelId) {
1349
+ emailState.googleUnreadCount = emailState.messages.filter(function(m) { return !m.is_read; }).length;
1350
+ emailRenderSidebar();
1351
+ }
1343
1352
  emailRenderMessageList();
1344
1353
  }).catch(function() {
1345
1354
  // Fallback to cached dash emails
@@ -1347,6 +1356,8 @@ function emailLoadGoogleMessages() {
1347
1356
  return { id: m.id, subject: m.subject, from_name: m.from, from_address: m.from, internal_date: m.date, body_preview: m.snippet, is_read: !m.isUnread, is_starred: false, has_attachments: false, _google: true };
1348
1357
  });
1349
1358
  emailState.total = emailState.messages.length;
1359
+ emailState.googleUnreadCount = emailState.messages.filter(function(m) { return !m.is_read; }).length;
1360
+ emailRenderSidebar();
1350
1361
  emailRenderMessageList();
1351
1362
  });
1352
1363
  }