File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -8481,11 +8481,10 @@ class FastSearchCard extends HTMLElement {
84818481 getCoverTimerPresets() {
84828482 return `
84838483 <button class="timer-control-preset" data-action="open" title="Öffnen">
8484- <!-- Bestehender Öffnen SVG -->
8484+ ${this.getCoverActionSVG('open', item)}
84858485 </button>
8486-
84878486 <button class="timer-control-preset" data-action="close" title="Schließen">
8488- <!-- Bestehender Schließen SVG -->
8487+ ${this.getCoverActionSVG('close', item)}
84898488 </button>
84908489
84918490 <button class="timer-control-preset" data-action="set_position_50" title="50% öffnen">
@@ -8503,6 +8502,25 @@ class FastSearchCard extends HTMLElement {
85038502 </button>
85048503 `;
85058504 }
8505+
8506+ // SVG aus Cover Device Controls holen
8507+ getCoverActionSVG(action, item) {
8508+ const coverHTML = this.getCoverControlsHTML(item);
8509+ let pattern = '';
8510+
8511+ if (action === 'open') {
8512+ pattern = /data-action="open"[^>]*>(.*?)<\/button>/s;
8513+ } else if (action === 'close') {
8514+ pattern = /data-action="close"[^>]*>(.*?)<\/button>/s;
8515+ }
8516+
8517+ const match = coverHTML.match(pattern);
8518+ if (match) {
8519+ const svgMatch = match[1].match(/<svg[^>]*>.*?<\/svg>/s);
8520+ return svgMatch ? svgMatch[0] : '';
8521+ }
8522+ return '';
8523+ }
85068524
85078525 getSwitchTimerPresets() {
85088526 return `
You can’t perform that action at this time.
0 commit comments