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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "mywebui",
4
- "version": "1.37.69",
4
+ "version": "1.37.70",
5
5
  "titleLang": {
6
6
  "en": "mywebui",
7
7
  "de": "mywebui",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.mywebui",
3
- "version": "1.37.69",
3
+ "version": "1.37.70",
4
4
  "description": "ioBroker mywebui - Custom edited mywebui by gokturk413",
5
5
  "type": "module",
6
6
  "main": "dist/backend/main.js",
@@ -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 = () => { cfgList.push({}); this._updateAnimationsPanel(); };
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