@homebridge-plugins/homebridge-govee 11.32.0-beta.2 → 11.32.0-beta.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/CHANGELOG.md CHANGED
@@ -10,6 +10,8 @@ All notable changes to `@homebridge-plugins/homebridge-govee` will be documented
10
10
  - feat(ui): add and remove devices from the config via the my devices tab (#1323)
11
11
  - feat(ui): hide or show a device in homekit from the my devices tab
12
12
  - style(ui): present the device config actions as a settings-style list
13
+ - style(ui): polish the action list - consistent spacing, arrow buttons, bold emphasis
14
+ - style(ui): give each action row a title with a grey description underneath
13
15
 
14
16
  ## v11.31.0 (2026-07-24)
15
17
 
@@ -23,10 +23,17 @@
23
23
  border-color: #444444;
24
24
  color: #eeeeee;
25
25
  }
26
+
27
+ .text-muted {
28
+ color: #aaaaaa !important;
29
+ }
26
30
  }
27
31
  .min-w-50 {
28
32
  min-width: 50px;
29
33
  }
34
+ .action-desc {
35
+ font-size: 0.85rem;
36
+ }
30
37
  select {
31
38
  background-image:
32
39
  linear-gradient(45deg, transparent 50%, gray 50%),
@@ -82,31 +89,46 @@
82
89
  </div>
83
90
  <div id="deviceInfo">
84
91
  <form>
85
- <div class="form-group">
92
+ <div class="form-group mb-0">
86
93
  <select class="form-control" id="deviceSelect"></select>
87
94
  </div>
88
95
  </form>
89
- <ul class="list-group mt-2 mb-3 mx-0" id="configActionList" style="display: none;">
96
+ <ul class="list-group mt-4 mb-4 mx-0" id="configActionList" style="display: none;">
90
97
  <li class="list-group-item">
91
98
  <div class="d-flex justify-content-between align-items-center">
92
- <span class="pr-2">Adds all devices to the config.</span>
93
- <button type="button" class="btn btn-primary m-0 ml-3 py-1 min-w-50" id="addAllBtn">Add All</button>
99
+ <div class="pr-2">
100
+ <div>Add All Devices</div>
101
+ <div class="text-muted action-desc">Add all devices to the config that are not already in the config.</div>
102
+ </div>
103
+ <button type="button" class="btn btn-primary m-0 ml-3 py-1 min-w-50" id="addAllBtn" aria-label="Add all devices to the config">
104
+ <i aria-hidden="true" class="fas fa-arrow-right"></i>
105
+ </button>
94
106
  </div>
95
107
  </li>
96
108
  <li class="list-group-item">
97
109
  <div class="d-flex justify-content-between align-items-center">
98
- <span class="pr-2" id="deviceConfigText">Adds this device to the config.</span>
99
- <button type="button" class="btn btn-primary m-0 ml-3 py-1 min-w-50" id="deviceConfigBtn">Add</button>
110
+ <div class="pr-2">
111
+ <div id="deviceConfigTitle">Add This Device</div>
112
+ <div class="text-muted action-desc" id="deviceConfigText">Add this device to the plugin config.</div>
113
+ </div>
114
+ <button type="button" class="btn btn-primary m-0 ml-3 py-1 min-w-50" id="deviceConfigBtn" aria-label="Add this device to the config">
115
+ <i aria-hidden="true" class="fas fa-arrow-right"></i>
116
+ </button>
100
117
  </div>
101
118
  </li>
102
119
  <li class="list-group-item">
103
120
  <div class="d-flex justify-content-between align-items-center">
104
- <span class="pr-2" id="hideDeviceText">Hide this device from HomeKit.</span>
105
- <button type="button" class="btn btn-primary m-0 ml-3 py-1 min-w-50" id="hideDeviceBtn">Hide</button>
121
+ <div class="pr-2">
122
+ <div id="hideDeviceTitle">Hide This Device</div>
123
+ <div class="text-muted action-desc" id="hideDeviceText">Hide this device from HomeKit. This adds the device to the config if needed.</div>
124
+ </div>
125
+ <button type="button" class="btn btn-primary m-0 ml-3 py-1 min-w-50" id="hideDeviceBtn" aria-label="Hide this device from HomeKit">
126
+ <i aria-hidden="true" class="fas fa-arrow-right"></i>
127
+ </button>
106
128
  </div>
107
129
  </li>
108
130
  </ul>
109
- <table class="table w-100 mt-3" id="deviceTable" style="display: none;">
131
+ <table class="table w-100 mt-0" id="deviceTable" style="display: none;">
110
132
  <thead>
111
133
  <tr class="table-active">
112
134
  <th scope="col" style="width: 40%;">Device Name</th>
@@ -381,13 +403,19 @@
381
403
  return null
382
404
  }
383
405
 
406
+ // The action buttons always show the settings-page arrow; the row text
407
+ // (and the button's aria-label) says what the arrow will do
408
+ const actionArrow = '<i aria-hidden="true" class="fas fa-arrow-right"></i>'
409
+
384
410
  const setHideControl = hidden => {
385
411
  const btn = document.getElementById('hideDeviceBtn')
386
412
  btn.dataset.hidden = hidden ? 'yes' : 'no'
387
- btn.innerHTML = hidden ? 'Show' : 'Hide'
413
+ btn.innerHTML = actionArrow
414
+ btn.setAttribute('aria-label', hidden ? 'Show this device in HomeKit' : 'Hide this device from HomeKit')
415
+ document.getElementById('hideDeviceTitle').innerHTML = hidden ? 'Show This Device' : 'Hide This Device'
388
416
  document.getElementById('hideDeviceText').innerHTML = hidden
389
- ? 'Show this device in HomeKit.'
390
- : 'Hide this device from HomeKit.'
417
+ ? 'Show this device in HomeKit again. The config entry is kept.'
418
+ : 'Hide this device from HomeKit. This adds the device to the config if needed.'
391
419
  }
392
420
 
393
421
  const setConfigButton = inConfig => {
@@ -397,10 +425,12 @@
397
425
  btn.dataset.state = inConfig ? 'remove' : 'add'
398
426
  btn.classList.remove('btn-danger')
399
427
  btn.classList.add('btn-primary')
400
- btn.innerHTML = inConfig ? 'Remove' : 'Add'
428
+ btn.innerHTML = actionArrow
429
+ btn.setAttribute('aria-label', inConfig ? 'Remove this device from the config' : 'Add this device to the config')
430
+ document.getElementById('deviceConfigTitle').innerHTML = inConfig ? 'Remove This Device' : 'Add This Device'
401
431
  document.getElementById('deviceConfigText').innerHTML = inConfig
402
- ? 'Removes this device from the config.'
403
- : 'Adds this device to the config.'
432
+ ? 'Remove this device from the plugin config.'
433
+ : 'Add this device to the plugin config.'
404
434
  }
405
435
 
406
436
  const addDeviceToConfig = (config, acc) => {
@@ -453,8 +483,9 @@
453
483
  btn.dataset.confirm = 'yes'
454
484
  btn.classList.remove('btn-primary')
455
485
  btn.classList.add('btn-danger')
456
- btn.innerHTML = 'Confirm'
457
- document.getElementById('deviceConfigText').innerHTML = 'This entry has extra settings which will be lost - click again to remove it.'
486
+ btn.innerHTML = actionArrow
487
+ btn.setAttribute('aria-label', 'Confirm removing this device from the config')
488
+ document.getElementById('deviceConfigText').innerHTML = 'This entry has extra settings which will be lost. Click again to remove it.'
458
489
  removeConfirmTimer = setTimeout(() => setConfigButton(true), 5000)
459
490
  return
460
491
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@homebridge-plugins/homebridge-govee",
3
3
  "alias": "Govee",
4
4
  "type": "module",
5
- "version": "11.32.0-beta.2",
5
+ "version": "11.32.0-beta.4",
6
6
  "description": "Homebridge plugin to integrate Govee devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",