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:
@@ -13,7 +13,7 @@ import {
|
||||
} from '../core/state.js';
|
||||
import { API_BASE, getHeaders, fetchWithAuth, escapeHtml } from '../core/api.js';
|
||||
import { t } from '../core/i18n.js';
|
||||
import { lockBody, showToast, showConfirm, formatUptime } from '../core/ui.js';
|
||||
import { lockBody, showToast, showConfirm, formatUptime, desktopFocus } from '../core/ui.js';
|
||||
import { Modal } from '../core/modal.js';
|
||||
import {
|
||||
getValueSourceIcon, getPictureSourceIcon,
|
||||
@@ -612,7 +612,7 @@ export async function showKCEditor(targetId = null, cloneData = null) {
|
||||
kcEditorModal.open();
|
||||
|
||||
document.getElementById('kc-editor-error').style.display = 'none';
|
||||
setTimeout(() => document.getElementById('kc-editor-name').focus(), 100);
|
||||
setTimeout(() => desktopFocus(document.getElementById('kc-editor-name')), 100);
|
||||
} catch (error) {
|
||||
console.error('Failed to open KC editor:', error);
|
||||
showToast(t('kc_target.error.editor_open_failed'), 'error');
|
||||
|
||||
Reference in New Issue
Block a user