Skip to content

Commit 5287cf3

Browse files
authored
Update fast-search-card.js
1 parent c52e2a9 commit 5287cf3

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

dist/fast-search-card.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9849,8 +9849,10 @@ class FastSearchCard extends HTMLElement {
98499849
const timeUntil = this.formatTimeUntil(nextExecution);
98509850
const action = this.getTimerAction(timer);
98519851

9852-
// Timer Icon (🕐 für alle Timer)
9853-
const timerIcon = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor"><circle cx="12" cy="12" r="10"></circle><polyline points="12,6 12,12 16,14"></polyline></svg>`;
9852+
9853+
// Timer Icon basierend auf Action
9854+
const timerIcon = this.getTimerIconForAction(action);
9855+
98549856

98559857
return `
98569858
<div class="timeline-event timer-timeline-event" data-timer-id="${timer.schedule_id}">
@@ -9937,6 +9939,21 @@ class FastSearchCard extends HTMLElement {
99379939

99389940
}
99399941

9942+
9943+
getTimerIconForAction(action) {
9944+
// Bestimme Icon basierend auf Action-Text
9945+
if (action.includes('Einschalten') || action.includes('Ein')) {
9946+
return `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor"><path d="M9 12l2 2 4-4"></path><circle cx="12" cy="12" r="9"></circle></svg>`;
9947+
} else if (action.includes('Ausschalten') || action.includes('Aus')) {
9948+
return `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>`;
9949+
} else if (action.includes('30%') || action.includes('Dimmen')) {
9950+
return `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line></svg>`;
9951+
} else {
9952+
// Fallback: generisches Timer-Icon
9953+
return `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor"><circle cx="12" cy="12" r="10"></circle><polyline points="12,6 12,12 16,14"></polyline></svg>`;
9954+
}
9955+
}
9956+
99409957
getNextExecution(timer) {
99419958
// Zuerst prüfen ob next_execution Attribut vorhanden ist
99429959
if (timer.next_execution) {

0 commit comments

Comments
 (0)