nothumanallowed 13.2.59 → 13.2.60

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.2.59",
3
+ "version": "13.2.60",
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.2.59';
8
+ export const VERSION = '13.2.60';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -1180,15 +1180,19 @@ function loadMonthEvents(){
1180
1180
  function calPrev(){calMonth--;if(calMonth<0){calMonth=11;calYear--}renderCalendar(document.getElementById('content'))}
1181
1181
  function calNext(){calMonth++;if(calMonth>11){calMonth=0;calYear++}renderCalendar(document.getElementById('content'))}
1182
1182
 
1183
+ var _calDayEvts=[];
1184
+ var _calDayStr='';
1183
1185
  function openDayDetail(dateStr){
1184
1186
  var evts=calEventsCache[dateStr]||[];
1187
+ _calDayEvts=evts;
1188
+ _calDayStr=dateStr;
1185
1189
  var dayLabel=new Date(dateStr+'T12:00:00').toLocaleDateString('en',{weekday:'long',month:'long',day:'numeric',year:'numeric'});
1186
1190
 
1187
1191
  function buildDayHtml(){
1188
1192
  var h='<h2 style="color:var(--green);margin-bottom:4px">'+esc(dayLabel)+'</h2>';
1189
1193
  h+='<div style="display:flex;align-items:center;gap:8px;margin-bottom:12px">';
1190
1194
  h+='<span style="color:var(--dim);font-size:11px">'+dateStr+'</span>';
1191
- h+='<button onclick="openEventForm(null,'+JSON.stringify(dateStr)+')" style="margin-left:auto;background:var(--green3);color:var(--bg);padding:5px 12px;border-radius:var(--r);font-size:12px;font-weight:700">+ Add Event</button>';
1195
+ h+='<button onclick="openEventForm(null,_calDayStr)" style="margin-left:auto;background:var(--green3);color:var(--bg);padding:5px 12px;border-radius:var(--r);font-size:12px;font-weight:700">+ Add Event</button>';
1192
1196
  h+='</div>';
1193
1197
  if(evts.length===0){
1194
1198
  h+='<div style="color:var(--dim);padding:20px;text-align:center">No events on this day</div>';
@@ -1202,8 +1206,8 @@ function openDayDetail(dateStr){
1202
1206
  h+='<div style="color:var(--bright);font-size:15px;font-weight:700;margin-bottom:6px">'+esc(x.summary)+'</div></div>';
1203
1207
  if(x.id){
1204
1208
  h+='<div style="display:flex;gap:4px;flex-shrink:0">';
1205
- h+='<button onclick="openEventForm('+JSON.stringify({id:x.id,calId:calId,summary:x.summary,description:x.description||'',location:x.location||'',start:x.start,end:x.end,isAllDay:x.isAllDay})+','+JSON.stringify(dateStr)+')" style="background:var(--bg2);border:1px solid var(--border);color:var(--text);padding:3px 8px;border-radius:4px;font-size:11px">Edit</button>';
1206
- h+='<button onclick="deleteCalEvent('+JSON.stringify(calId)+','+JSON.stringify(x.id)+','+JSON.stringify(dateStr)+')" style="background:var(--bg2);border:1px solid var(--red);color:var(--red);padding:3px 8px;border-radius:4px;font-size:11px">Delete</button>';
1209
+ h+='<button onclick="openEventFormByIdx('+idx+')" style="background:var(--bg2);border:1px solid var(--border);color:var(--text);padding:3px 8px;border-radius:4px;font-size:11px">Edit</button>';
1210
+ h+='<button onclick="deleteCalEventByIdx('+idx+')" style="background:var(--bg2);border:1px solid var(--red);color:var(--red);padding:3px 8px;border-radius:4px;font-size:11px">Delete</button>';
1207
1211
  h+='</div>';
1208
1212
  }
1209
1213
  h+='</div>';
@@ -1253,10 +1257,20 @@ function refreshDayDetail(dateStr){
1253
1257
 
1254
1258
  function deleteCalEvent(calId,eventId,dateStr){
1255
1259
  if(!confirm('Delete this event?'))return;
1256
- apiPost('/api/calendar/'+encodeURIComponent(calId)+'/'+encodeURIComponent(eventId),null,'DELETE').then(function(){
1260
+ apiPost('/api/calendar/'+encodeURIComponent(calId)+'/'+encodeURIComponent(eventId),{},'DELETE').then(function(){
1257
1261
  refreshDayDetail(dateStr);
1258
1262
  }).catch(function(e){alert('Error: '+e.message);});
1259
1263
  }
1264
+ function deleteCalEventByIdx(idx){
1265
+ var x=_calDayEvts[idx];if(!x)return;
1266
+ var calId=x.calendarId||'primary';
1267
+ deleteCalEvent(calId,x.id,_calDayStr);
1268
+ }
1269
+ function openEventFormByIdx(idx){
1270
+ var x=_calDayEvts[idx];if(!x)return;
1271
+ var calId=x.calendarId||'primary';
1272
+ openEventForm({id:x.id,calId:calId,summary:x.summary,description:x.description||'',location:x.location||'',start:x.start,end:x.end,isAllDay:x.isAllDay},_calDayStr);
1273
+ }
1260
1274
 
1261
1275
  function openEventForm(evt,dateStr){
1262
1276
  var isEdit=evt&&evt.id;