@signalk/freeboard-sk 2.2.3 → 2.2.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # CHANGELOG: Freeboard
2
2
 
3
+ ### v2.2.5
4
+
5
+ - **Added**: Ability to toggle AIS label color between dark and light to improve visibility on satellite imagery.
6
+ - **Fixed**: Authentication error on plugin startup on systems with security enabled.
7
+
8
+ ### v2.2.4
9
+
10
+ - **Fixed**: GPX Load errors caused by routes with no name and / or description causing validation errors.
11
+
3
12
  ### v2.2.3
4
13
 
5
14
  - **Fixed**: Do not make "Fixed Location" mode the default.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalk/freeboard-sk",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "Openlayers chart plotter implementation for Signal K",
5
5
  "keywords": [
6
6
  "signalk-webapp",
@@ -16,22 +16,34 @@ const initAnchorApi = async (app) => {
16
16
  server = app;
17
17
  server.debug(`** initAnchorApi() **`);
18
18
  // detect signalk-anchor-alarm plugin
19
- let port = 3000;
20
- if (typeof server.config?.getExternalPort === 'function') {
21
- server.debug('*** getExternalPort()', server.config.getExternalPort());
22
- port = server.config.getExternalPort();
23
- }
24
- hostPath = `${server.config.ssl ? 'https' : 'http'}://localhost:${port}`;
25
- const url = `${hostPath}/plugins`;
26
- const r = await (0, fetch_1.fetch)(url);
27
- r.forEach((plugin) => {
28
- if (plugin.id === 'anchoralarm') {
29
- pluginPath = `/plugins/${plugin.id}`;
30
- anchorPlugin.has = true;
31
- anchorPlugin.version = plugin.version;
32
- anchorPlugin.enabled = plugin.data.enabled;
19
+ anchorPlugin.has = true;
20
+ try {
21
+ let port = 3000;
22
+ if (typeof server.config?.getExternalPort === 'function') {
23
+ server.debug('*** getExternalPort()', server.config.getExternalPort());
24
+ port = server.config.getExternalPort();
33
25
  }
34
- });
26
+ hostPath = `${server.config.ssl ? 'https' : 'http'}://localhost:${port}`;
27
+ // temp patch for detection issue
28
+ pluginPath = `/plugins/anchoralarm`;
29
+ anchorPlugin.enabled = true;
30
+ /*
31
+ const url = `${hostPath}/plugins`;
32
+ const r: Array<{ id: string }> = await fetch(url);
33
+ r.forEach(
34
+ (plugin: { id: string; version: string; data: { enabled: boolean } }) => {
35
+ if (plugin.id === 'anchoralarm') {
36
+ pluginPath = `/plugins/${plugin.id}`;
37
+ anchorPlugin.has = true;
38
+ anchorPlugin.version = plugin.version;
39
+ anchorPlugin.enabled = plugin.data.enabled;
40
+ }
41
+ }
42
+ );*/
43
+ }
44
+ catch (e) {
45
+ anchorPlugin.has = false;
46
+ }
35
47
  server.debug('*** Anchor Alarm Plugin detected:', anchorPlugin.has);
36
48
  server.debug('*** Anchor Alarm Plugin enabled:', anchorPlugin.enabled);
37
49
  server.debug('*** Anchor Alarm Plugin API Path', `${hostPath}${pluginPath}`);
@@ -57,6 +69,10 @@ const initApiEndpoints = () => {
57
69
  res.status(r.statusCode).json(r);
58
70
  }
59
71
  catch (e) {
72
+ // fix plugin returned 401 error code when no position is available
73
+ if (e.statusCode === 401 && e.message.indexOf('no position') !== -1) {
74
+ e.statusCode = 400;
75
+ }
60
76
  res.status(e.statusCode).json(e);
61
77
  }
62
78
  });
@@ -200,12 +200,6 @@
200
200
  <b>@signalk/course-provider</b>
201
201
  </td>
202
202
  </tr>
203
- <tr>
204
- <td>Standard Alarms</td>
205
- <td>
206
- <b>freeboard-sk-helper</b>
207
- </td>
208
- </tr>
209
203
  <tr>
210
204
  <td>Anchor Watch</td>
211
205
  <td>
@@ -405,6 +399,13 @@
405
399
  selected charts.
406
400
  </li>
407
401
 
402
+ <li class="nobullet">
403
+ <i class="material-icons">invert_colors</i>
404
+ <b>Invert Map feature text label color:</b>
405
+ Toggle the text label color of features to improve visibility on
406
+ dark map backgrounds.
407
+ </li>
408
+
408
409
  <li class="nobullet">
409
410
  <i class="material-icons">add_location</i>
410
411
  <b>Drop Waypoint:</b>
package/public/index.html CHANGED
@@ -74,5 +74,5 @@
74
74
  </div>
75
75
  </div>
76
76
  </app-root>
77
- <script src="runtime.d3c37bb0c0c8df86.js" type="module"></script><script src="polyfills.61cfd308b28d8fe0.js" type="module"></script><script src="main.e36b2067fed07709.js" type="module"></script></body>
77
+ <script src="runtime.d3c37bb0c0c8df86.js" type="module"></script><script src="polyfills.61cfd308b28d8fe0.js" type="module"></script><script src="main.12e443ca0c9c719e.js" type="module"></script></body>
78
78
  </html>