@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/main.nodejs.js +1 -1
- package/dist/main.nodejs.js.map +1 -1
- package/dist/plugin.zip +0 -0
- package/package.json +1 -1
- package/src/main.ts +14 -11
package/dist/plugin.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
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
|
-
|
|
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
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
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 = '×';
|
|
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
|
};
|