goblin-desktop 2.0.13 → 2.0.14

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.
@@ -42,6 +42,7 @@ module.exports = (config) => {
42
42
  const wizardSteps = Object.keys(steps);
43
43
  const wizardFlow = ['init'].concat(wizardSteps);
44
44
  const hinterIdsByName = {};
45
+ const hinterWidgetIdsByName = {};
45
46
  // Define logic handlers according rc.json
46
47
  const logicHandlers = {
47
48
  'create': (state, action) => {
@@ -177,7 +178,9 @@ module.exports = (config) => {
177
178
  }
178
179
  if (quest.hasAPI(`${hName}-hinter`)) {
179
180
  const id = `${hName}-hinter@${h}@${quest.goblin.id}`;
181
+ const widgetId = `hinter@${hName}@${quest.goblin.id}`;
180
182
  hinterIdsByName[h] = id;
183
+ hinterWidgetIdsByName[h] = widgetId;
181
184
  quest.create(
182
185
  `${hName}-hinter`,
183
186
  {
@@ -398,8 +401,8 @@ module.exports = (config) => {
398
401
  type,
399
402
  withDetail = true
400
403
  ) {
401
- const hinterId = hinterIdsByName[type];
402
- const hinterAPI = quest.getAPI(hinterId).noThrow();
404
+ const hinterWidgetId = hinterWidgetIdsByName[type];
405
+ const hinterAPI = quest.getAPI(hinterWidgetId).noThrow();
403
406
  yield hinterAPI.show();
404
407
  if (withDetail) {
405
408
  yield hinterAPI.showDetail();
@@ -418,12 +421,12 @@ module.exports = (config) => {
418
421
  type,
419
422
  entityId
420
423
  ) {
421
- const hinterId = hinterIdsByName[type];
424
+ const hinterWidgetId = hinterWidgetIdsByName[type];
422
425
  const deskAPI = quest.getAPI(quest.getDesktop()).noThrow();
423
426
  yield deskAPI.setDetail({
424
- hinterId,
427
+ hinterId: hinterWidgetId,
425
428
  });
426
- const hinterAPI = quest.getAPI(hinterId).noThrow();
429
+ const hinterAPI = quest.getAPI(hinterWidgetId).noThrow();
427
430
  yield hinterAPI.setCurrentDetailEntity({entityId});
428
431
  });
429
432
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goblin-desktop",
3
- "version": "2.0.13",
3
+ "version": "2.0.14",
4
4
  "description": "Goblin Desktop",
5
5
  "main": "./builders/builders.js",
6
6
  "scripts": {
@@ -217,11 +217,9 @@ class DesktopMonitors extends Widget {
217
217
  </RetroPanel>
218
218
  );
219
219
  } else {
220
- let glyph = 'light/square';
221
- let glyphColor = this.context.theme.palette.buttonDisableText;
220
+ let glyphColor = null; // default
222
221
  if (this.props.isActive) {
223
- glyph = 'solid/square';
224
- glyphColor = '#0f0';
222
+ glyphColor = '#0f0'; // green
225
223
  }
226
224
 
227
225
  return (
@@ -230,8 +228,9 @@ class DesktopMonitors extends Widget {
230
228
  kind="button-footer"
231
229
  width="140px"
232
230
  justify="start"
233
- glyph={glyph}
231
+ glyph="light/monitor-heart-rate"
234
232
  glyphColor={glyphColor}
233
+ active={this.showMonitor}
235
234
  text={T('Activité')}
236
235
  onClick={this.onMonitor}
237
236
  />
@@ -218,7 +218,6 @@ class DesktopNotebook extends Widget {
218
218
  );
219
219
  } else {
220
220
  let glyph = 'solid/pen';
221
- let glyphColor = this.context.theme.palette.buttonDisableText;
222
221
 
223
222
  return (
224
223
  <>
@@ -227,8 +226,8 @@ class DesktopNotebook extends Widget {
227
226
  width="140px"
228
227
  justify="start"
229
228
  glyph={glyph}
230
- glyphColor={glyphColor}
231
229
  text={T('Notes')}
230
+ active={this.showMonitor}
232
231
  onClick={this.onMonitor}
233
232
  />
234
233
  </>
@@ -91,7 +91,7 @@ class DesktopStateMonitor extends Widget {
91
91
  kind="button-footer"
92
92
  width="120px"
93
93
  glyph="light/radar"
94
- glyphColor={this.props.showed ? '#0f0' : null}
94
+ active={this.props.showed}
95
95
  text={T('State')}
96
96
  onClick={this.onToggleStateMonitor}
97
97
  />