iobroker.mywebui 1.37.69 → 1.37.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/io-package.json
CHANGED
package/package.json
CHANGED
|
@@ -1036,7 +1036,18 @@ export class IobrokerWebuiAppShell extends BaseCustomWebComponentConstructorAppe
|
|
|
1036
1036
|
const addBtn = document.createElement('button');
|
|
1037
1037
|
addBtn.textContent = '+ Add Animation';
|
|
1038
1038
|
addBtn.style.cssText = 'width:100%;margin-top:6px;padding:5px;font-size:12px;cursor:pointer;border:1px solid #5a9;border-radius:4px;background:#e8f8f0;color:#2a7a5a;font-weight:600;';
|
|
1039
|
-
addBtn.onclick = () => {
|
|
1039
|
+
addBtn.onclick = () => {
|
|
1040
|
+
// Collect currently valid animations from UI
|
|
1041
|
+
const existing = cfgList
|
|
1042
|
+
.filter(c => c._collect)
|
|
1043
|
+
.map(c => c._collect())
|
|
1044
|
+
.filter(c => c.effect || Object.keys(c).some(k => k.endsWith('_bind')));
|
|
1045
|
+
// Add new empty animation with a default effect so it survives save/reload
|
|
1046
|
+
existing.push({ effect: 'opacity', duration: 1, ease: 'power1.inOut', repeat: 0 });
|
|
1047
|
+
const val = existing.length === 1 ? existing[0] : existing;
|
|
1048
|
+
designItem.setAttribute('data-animation', JSON.stringify(val));
|
|
1049
|
+
this._updateAnimationsPanel();
|
|
1050
|
+
};
|
|
1040
1051
|
content.appendChild(addBtn);
|
|
1041
1052
|
}
|
|
1042
1053
|
|