Enhance CSS test preview with live capture, brightness display, and UX fixes
- Stream live JPEG frames from picture sources into the test preview rectangle - Add composite layer brightness display via value source streaming - Fix missing id on css-test-rect-screen element that prevented frame display - Preload images before swapping to eliminate flicker on frame updates - Increase preview resolution to 480x360 and add subtle outline - Prevent auto-focus on name field in modals on touch devices (desktopFocus) - Fix performance chart padding, color picker clipping, and subtitle offset - Add calibration-style ticks and source name/LED count to rectangle preview Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
import { API_BASE, fetchWithAuth, isSerialDevice, isMockDevice, isMqttDevice, isWsDevice, isOpenrgbDevice, escapeHtml } from '../core/api.js';
|
||||
import { devicesCache } from '../core/state.js';
|
||||
import { t } from '../core/i18n.js';
|
||||
import { showToast } from '../core/ui.js';
|
||||
import { showToast, desktopFocus } from '../core/ui.js';
|
||||
import { Modal } from '../core/modal.js';
|
||||
import { _computeMaxFps, _renderFpsHint } from './devices.js';
|
||||
import { getDeviceTypeIcon } from '../core/icons.js';
|
||||
@@ -302,7 +302,7 @@ export function showAddDevice() {
|
||||
addDeviceModal.open();
|
||||
onDeviceTypeChanged();
|
||||
setTimeout(() => {
|
||||
document.getElementById('device-name').focus();
|
||||
desktopFocus(document.getElementById('device-name'));
|
||||
addDeviceModal.snapshot();
|
||||
}, 100);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user