@blueharford/scrypted-spatial-awareness 0.1.9 → 0.1.10

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/dist/plugin.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueharford/scrypted-spatial-awareness",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Cross-camera object tracking for Scrypted NVR with spatial awareness",
5
5
  "author": "Joshua Seidel <blueharford>",
6
6
  "license": "Apache-2.0",
package/src/main.ts CHANGED
@@ -380,20 +380,23 @@ export class SpatialAwarenessPlugin extends ScryptedDeviceBase
380
380
  </div>
381
381
  <script>
382
382
  window.openSATopologyEditor = function() {
383
- // Remove existing modal if any
384
- const existing = document.getElementById('sa-topology-modal');
383
+ var existing = document.getElementById('sa-topology-modal');
385
384
  if (existing) existing.remove();
386
-
387
- // Create modal and append to body
388
- const modal = document.createElement('div');
385
+ var modal = document.createElement('div');
389
386
  modal.id = 'sa-topology-modal';
390
387
  modal.style.cssText = 'position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.9);z-index:2147483647;display:flex;align-items:center;justify-content:center;';
391
- modal.innerHTML = \`
392
- <div style="width:95vw;height:92vh;max-width:1800px;background:#1a1a2e;border-radius:12px;overflow:hidden;position:relative;box-shadow:0 25px 50px rgba(0,0,0,0.5);">
393
- <button onclick="document.getElementById('sa-topology-modal').remove()" style="position:absolute;top:15px;right:15px;z-index:2147483647;background:#e94560;color:white;border:none;width:40px;height:40px;border-radius:50%;font-size:24px;cursor:pointer;display:flex;align-items:center;justify-content:center;">&times;</button>
394
- <iframe src="/endpoint/@blueharford/scrypted-spatial-awareness/ui/editor" style="width:100%;height:100%;border:none;"></iframe>
395
- </div>
396
- \`;
388
+ var container = document.createElement('div');
389
+ container.style.cssText = 'width:95vw;height:92vh;max-width:1800px;background:#1a1a2e;border-radius:12px;overflow:hidden;position:relative;box-shadow:0 25px 50px rgba(0,0,0,0.5);';
390
+ var closeBtn = document.createElement('button');
391
+ closeBtn.innerHTML = '&times;';
392
+ closeBtn.style.cssText = 'position:absolute;top:15px;right:15px;z-index:2147483647;background:#e94560;color:white;border:none;width:40px;height:40px;border-radius:50%;font-size:24px;cursor:pointer;';
393
+ closeBtn.onclick = function() { modal.remove(); };
394
+ var iframe = document.createElement('iframe');
395
+ iframe.src = '/endpoint/@blueharford/scrypted-spatial-awareness/ui/editor';
396
+ iframe.style.cssText = 'width:100%;height:100%;border:none;';
397
+ container.appendChild(closeBtn);
398
+ container.appendChild(iframe);
399
+ modal.appendChild(container);
397
400
  modal.onclick = function(e) { if (e.target === modal) modal.remove(); };
398
401
  document.body.appendChild(modal);
399
402
  };