@blueharford/scrypted-spatial-awareness 0.1.1 → 0.1.3
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 -12
package/dist/plugin.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/main.ts
CHANGED
|
@@ -335,13 +335,21 @@ export class SpatialAwarenessPlugin extends ScryptedDeviceBase
|
|
|
335
335
|
async getSettings(): Promise<Setting[]> {
|
|
336
336
|
const settings = await this.storageSettings.getSettings();
|
|
337
337
|
|
|
338
|
-
//
|
|
338
|
+
// Topology editor launcher - opens in popup window
|
|
339
339
|
settings.push({
|
|
340
|
-
key: '
|
|
341
|
-
title: '
|
|
342
|
-
type: '
|
|
343
|
-
|
|
344
|
-
|
|
340
|
+
key: 'topologyEditor',
|
|
341
|
+
title: 'Topology Editor',
|
|
342
|
+
type: 'html' as any,
|
|
343
|
+
value: `
|
|
344
|
+
<div style="padding: 15px; background: #1a1a2e; border-radius: 8px; text-align: center;">
|
|
345
|
+
<p style="color: #888; margin-bottom: 15px;">Configure camera positions, connections, and transit times</p>
|
|
346
|
+
<button onclick="window.open('ui/editor', 'TopologyEditor', 'width=1400,height=900,menubar=no,toolbar=no,location=no,status=no')"
|
|
347
|
+
style="background: #e94560; color: white; border: none; padding: 12px 24px; border-radius: 6px; font-size: 14px; cursor: pointer; font-weight: 500;">
|
|
348
|
+
Open Topology Editor
|
|
349
|
+
</button>
|
|
350
|
+
</div>
|
|
351
|
+
`,
|
|
352
|
+
group: 'Topology',
|
|
345
353
|
});
|
|
346
354
|
|
|
347
355
|
// Add status display
|
|
@@ -374,12 +382,6 @@ export class SpatialAwarenessPlugin extends ScryptedDeviceBase
|
|
|
374
382
|
}
|
|
375
383
|
|
|
376
384
|
async putSetting(key: string, value: SettingValue): Promise<void> {
|
|
377
|
-
if (key === 'openTopologyEditor') {
|
|
378
|
-
// The UI will handle opening the editor via HTTP
|
|
379
|
-
this.console.log('Topology editor requested - access via plugin HTTP endpoint');
|
|
380
|
-
return;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
385
|
await this.storageSettings.putSetting(key, value);
|
|
384
386
|
|
|
385
387
|
// Handle setting changes that require engine restart
|