feat(ui): Edit mode Menu on desktop, device groups and Identify
Sequences, Settings and Audio only show in Edit mode. On wide screens the Edit mode actions and Run mode move into the Menu. Edit device gets a Groups checklist. The Devices list and Edit device group show names without addresses, and every device in Edit device group, in the group or in the list to add from, gets an Identify button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
24d3c1149d
commit
a560a1a72b
8 files changed
+181
-91
No files matched your search
@@ -63,11 +63,6 @@ function renderGroupDevicesEditor(containerEl, macRows, devicesMap) {
|
||||
const strong = document.createElement('strong');
|
||||
strong.textContent = row.label || row.mac || '—';
|
||||
label.appendChild(strong);
|
||||
label.appendChild(document.createTextNode(' '));
|
||||
const sub = document.createElement('span');
|
||||
sub.className = 'muted-text';
|
||||
sub.textContent = row.mac || '';
|
||||
label.appendChild(sub);
|
||||
|
||||
const rm = document.createElement('button');
|
||||
rm.type = 'button';
|
||||
@@ -78,6 +73,7 @@ function renderGroupDevicesEditor(containerEl, macRows, devicesMap) {
|
||||
renderGroupDevicesEditor(containerEl, macRows, devicesMap);
|
||||
});
|
||||
div.appendChild(label);
|
||||
if (row.mac) div.appendChild(createDeviceIdentifyButton(row.mac));
|
||||
div.appendChild(rm);
|
||||
listEl.appendChild(div);
|
||||
});
|
||||
@@ -92,7 +88,7 @@ function renderGroupDevicesEditor(containerEl, macRows, devicesMap) {
|
||||
excludeIds: macsInRows,
|
||||
labelFor: (mac, d) => {
|
||||
const labelName = d && d.name ? String(d.name).trim() : '';
|
||||
return labelName ? `${labelName} — ${mac}` : mac;
|
||||
return labelName || mac;
|
||||
},
|
||||
searchTextFor: (mac, d) => {
|
||||
const labelName = d && d.name ? String(d.name).trim() : '';
|
||||
@@ -104,6 +100,7 @@ function renderGroupDevicesEditor(containerEl, macRows, devicesMap) {
|
||||
macRows.push({ mac, label: n });
|
||||
renderGroupDevicesEditor(containerEl, macRows, devicesMap);
|
||||
},
|
||||
actionFor: (mac) => createDeviceIdentifyButton(mac),
|
||||
placeholder: 'Search devices to add…',
|
||||
emptyMessage: 'No devices match your search.',
|
||||
noItemsMessage: 'All devices are already in this group.',
|
||||
|
||||
Reference in new issue
Block a user