Implement synchronized LED strip highlighting with theme colors and clean up debug logs

- Add three-way synchronized highlighting between LED strip components
- Implement hover and selection state synchronization across display borders, sorter, and control panels
- Replace hardcoded colors with DaisyUI theme colors (primary, warning, base-content)
- Use background highlighting for sorter to prevent interface jittering
- Reduce LED strip width from 24px to 20px for better visual appearance
- Clean up console.log statements and debug output for production readiness
- Maintain layout stability by avoiding size changes in highlighting effects
This commit is contained in:
2025-07-05 14:32:31 +08:00
parent 99cbaf3b9f
commit 90cace679b
8 changed files with 77 additions and 89 deletions

View File

@ -38,7 +38,7 @@ export const WhiteBalance = () => {
setIsFullscreen(true);
}
} catch (error) {
console.error('Failed to auto enter fullscreen:', error);
// Silently handle fullscreen error
}
};
@ -101,7 +101,6 @@ export const WhiteBalance = () => {
const unlisten = listen('config_changed', (event) => {
const { strips, mappers, color_calibration } =
event.payload as LedStripConfigContainer;
console.log(event.payload);
setLedStripStore({
strips,
mappers,
@ -121,9 +120,9 @@ export const WhiteBalance = () => {
const calibration = { ...ledStripStore.colorCalibration };
calibration[key] = value;
setLedStripStore('colorCalibration', calibration);
invoke('set_color_calibration', { calibration }).catch((error) =>
console.log(error),
);
invoke('set_color_calibration', { calibration }).catch(() => {
// Silently handle error
});
};
const toggleFullscreen = async () => {
@ -138,7 +137,7 @@ export const WhiteBalance = () => {
setPanelPosition({ x: 0, y: 0 });
}
} catch (error) {
console.error('Failed to toggle fullscreen:', error);
// Silently handle fullscreen error
}
};
@ -156,7 +155,9 @@ export const WhiteBalance = () => {
const reset = () => {
invoke('set_color_calibration', {
calibration: new ColorCalibration(),
}).catch((error) => console.log(error));
}).catch(() => {
// Silently handle error
});
};
return (