fix: add crosslink from weather CSS card to weather source entity
Some checks failed
Lint & Test / test (push) Failing after 29s
Some checks failed
Lint & Test / test (push) Failing after 29s
This commit is contained in:
@@ -1083,9 +1083,13 @@ const CSS_CARD_RENDERERS: Record<string, CardPropsRenderer> = {
|
||||
weather: (source, { clockBadge }) => {
|
||||
const speedVal = (source.speed ?? 1.0).toFixed(1);
|
||||
const tempInfl = (source.temperature_influence ?? 0.5).toFixed(1);
|
||||
const wsName = (_cachedWeatherSources || []).find((w: any) => w.id === source.weather_source_id)?.name || '—';
|
||||
const ws = (_cachedWeatherSources || []).find((w: any) => w.id === source.weather_source_id);
|
||||
const wsName = ws?.name || '—';
|
||||
const wsLink = ws
|
||||
? ` stream-card-link" onclick="event.stopPropagation(); navigateToCard('streams','weather','weather-sources','data-id','${source.weather_source_id}')`
|
||||
: '';
|
||||
return `
|
||||
<span class="stream-card-prop">${getColorStripIcon('weather')} ${escapeHtml(wsName)}</span>
|
||||
<span class="stream-card-prop${wsLink}" title="${t('color_strip.weather.source')}">${ICON_LINK_SOURCE} ${escapeHtml(wsName)}</span>
|
||||
<span class="stream-card-prop">⏩ ${speedVal}x</span>
|
||||
<span class="stream-card-prop">🌡 ${tempInfl}</span>
|
||||
${clockBadge}
|
||||
|
||||
Reference in New Issue
Block a user