scrypted-detection-trainer 0.1.3 → 0.1.4

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/out/plugin.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scrypted-detection-trainer",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Collect and label detections to fine-tune the Scrypted NVR object detection model.",
5
5
  "keywords": [
6
6
  "scrypted-plugin"
package/src/main.ts CHANGED
@@ -112,6 +112,8 @@ class DetectionTrainer extends ScryptedDeviceBase implements Settings, HttpReque
112
112
  d.interfaces?.includes(ScryptedInterface.ObjectDetector)
113
113
  );
114
114
 
115
+ const uiUrl = await sdk.endpointManager.getLocalEndpoint(undefined, { public: true }).catch(() => '/endpoint/scrypted-detection-trainer/public/');
116
+
115
117
  const settings: Setting[] = [
116
118
  {
117
119
  key: 'info',
@@ -121,11 +123,12 @@ class DetectionTrainer extends ScryptedDeviceBase implements Settings, HttpReque
121
123
  value: '',
122
124
  },
123
125
  {
124
- key: 'ui_link',
126
+ key: 'open_ui',
125
127
  title: 'Review UI',
126
128
  description: 'Open the detection review and labeling interface.',
129
+ type: 'html',
127
130
  readonly: true,
128
- value: await sdk.endpointManager.getLocalEndpoint('scrypted-detection-trainer', { public: true }).catch(() => '/endpoint/scrypted-detection-trainer/public/'),
131
+ value: `<a href="${uiUrl}" target="_blank" style="display:inline-block;padding:8px 16px;background:#1a4d8a;color:#fff;border-radius:6px;text-decoration:none;font-size:13px;">Open Review UI ↗</a>`,
129
132
  },
130
133
  ];
131
134