Unify value source icons across dropdowns and card badges
Extract getValueSourceIcon() into value-sources.js and use it for brightness source dropdowns and card badges in both LED and KC targets. Icons now match value source cards: 📊 static, 🔄 animated, 🎵 audio, 🕐 adaptive_time, 🌤️ adaptive_scene. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -255,9 +255,15 @@ export async function deleteValueSource(sourceId) {
|
||||
|
||||
// ── Card rendering (used by streams.js) ───────────────────────
|
||||
|
||||
const _vsTypeIcons = { static: '📊', animated: '🔄', audio: '🎵', adaptive_time: '🕐', adaptive_scene: '🌤️' };
|
||||
|
||||
/** Return the emoji icon for a given value source type. */
|
||||
export function getValueSourceIcon(sourceType) {
|
||||
return _vsTypeIcons[sourceType] || '🎚️';
|
||||
}
|
||||
|
||||
export function createValueSourceCard(src) {
|
||||
const typeIcons = { static: '📊', animated: '🔄', audio: '🎵', adaptive_time: '🕐', adaptive_scene: '🌤️' };
|
||||
const icon = typeIcons[src.source_type] || '🎚️';
|
||||
const icon = getValueSourceIcon(src.source_type);
|
||||
|
||||
let propsHtml = '';
|
||||
if (src.source_type === 'static') {
|
||||
|
||||
Reference in New Issue
Block a user