iobroker.mywebui 1.37.72 → 1.37.73

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.72",
4
+ "version": "1.37.73",
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.72",
3
+ "version": "1.37.73",
4
4
  "description": "ioBroker mywebui - Custom edited mywebui by gokturk413",
5
5
  "type": "module",
6
6
  "main": "dist/backend/main.js",
@@ -866,18 +866,39 @@ export class IobrokerWebuiAppShell extends BaseCustomWebComponentConstructorAppe
866
866
  const block = document.createElement('div');
867
867
  block.style.cssText = 'border:2px solid #c8d6e0;border-radius:5px;padding:8px;margin-bottom:10px;background:#f7fafc;';
868
868
 
869
- // Header: "Animation #N" + delete button
869
+ // Collapsible body collapsed by default
870
+ const body = document.createElement('div');
871
+ body.style.display = 'none';
872
+
873
+ // Header: toggle arrow + "Animation #N (effect)" + delete button
870
874
  const hdr = document.createElement('div');
871
- hdr.style.cssText = 'display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;';
875
+ hdr.style.cssText = 'display:flex;justify-content:space-between;align-items:center;cursor:pointer;user-select:none;';
876
+ const hdrLeft = document.createElement('div');
877
+ hdrLeft.style.cssText = 'display:flex;align-items:center;gap:5px;';
878
+ const arrow = document.createElement('span');
879
+ arrow.textContent = '▶';
880
+ arrow.style.cssText = 'font-size:9px;color:#3a6a8a;transition:transform 0.15s;';
872
881
  const hdrTitle = document.createElement('span');
873
- hdrTitle.textContent = `Animation #${index + 1}`;
882
+ const effectLabel = cfg.effect || 'none';
883
+ hdrTitle.textContent = `#${index + 1} — ${effectLabel}`;
874
884
  hdrTitle.style.cssText = 'font-size:12px;font-weight:700;color:#3a6a8a;';
885
+ hdrLeft.appendChild(arrow); hdrLeft.appendChild(hdrTitle);
875
886
  const delBtn = document.createElement('button');
876
- delBtn.textContent = '✕ Remove';
877
- delBtn.style.cssText = 'font-size:10px;padding:2px 6px;cursor:pointer;border:1px solid #c66;border-radius:3px;background:#fff;color:#c33;';
878
- delBtn.onclick = () => { cfgList.splice(index, 1); saveAndRefresh(); };
879
- hdr.appendChild(hdrTitle); hdr.appendChild(delBtn);
887
+ delBtn.textContent = '✕';
888
+ delBtn.title = 'Remove animation';
889
+ delBtn.style.cssText = 'font-size:10px;padding:1px 5px;cursor:pointer;border:1px solid #c66;border-radius:3px;background:#fff;color:#c33;';
890
+ delBtn.onclick = (e) => { e.stopPropagation(); cfgList.splice(index, 1); saveAndRefresh(); };
891
+ hdr.appendChild(hdrLeft); hdr.appendChild(delBtn);
892
+
893
+ hdr.onclick = () => {
894
+ const collapsed = body.style.display === 'none';
895
+ body.style.display = collapsed ? '' : 'none';
896
+ arrow.style.transform = collapsed ? 'rotate(90deg)' : '';
897
+ hdr.style.marginBottom = collapsed ? '8px' : '0';
898
+ };
899
+
880
900
  block.appendChild(hdr);
901
+ block.appendChild(body);
881
902
 
882
903
  const sec = (title) => {
883
904
  const d = document.createElement('div');
@@ -966,24 +987,24 @@ export class IobrokerWebuiAppShell extends BaseCustomWebComponentConstructorAppe
966
987
  return out;
967
988
  };
968
989
 
969
- // Build block DOM
970
- block.appendChild(sec('Effect'));
971
- block.appendChild(mkField('Type', 'effect', effectSel, cfg));
990
+ // ── All content goes into collapsible body ──
991
+ body.appendChild(sec('Effect'));
992
+ body.appendChild(mkField('Type', 'effect', effectSel, cfg));
972
993
 
973
994
  const svgAttrRow = mkField('SVG Attr', 'svgAttr', svgAttrSel, cfg);
974
995
  svgAttrRow.style.display = cfg.effect === 'svg' ? '' : 'none';
975
- block.appendChild(svgAttrRow);
996
+ body.appendChild(svgAttrRow);
976
997
  effectSel.addEventListener('change', () => { svgAttrRow.style.display = effectSel.value === 'svg' ? '' : 'none'; });
977
998
 
978
- block.appendChild(mkField('Value From', 'valueFrom', valueFromInp, cfg));
979
- block.appendChild(mkField('Value To', 'valueTo', valueToInp, cfg));
999
+ body.appendChild(mkField('Value From', 'valueFrom', valueFromInp, cfg));
1000
+ body.appendChild(mkField('Value To', 'valueTo', valueToInp, cfg));
980
1001
 
981
1002
  const colorRows = document.createElement('div');
982
1003
  const isColorEffect = e => ['fill','color','backgroundColor','svg'].includes(e);
983
1004
  colorRows.style.display = isColorEffect(cfg.effect) ? '' : 'none';
984
1005
  colorRows.appendChild(mkField('Color From', 'fillColorFrom', fillFromInp, cfg));
985
1006
  colorRows.appendChild(mkField('Color To', 'fillColorTo', fillToInp, cfg));
986
- block.appendChild(colorRows);
1007
+ body.appendChild(colorRows);
987
1008
  effectSel.addEventListener('change', () => { colorRows.style.display = isColorEffect(effectSel.value) ? '' : 'none'; });
988
1009
 
989
1010
  const motionRows = document.createElement('div');
@@ -991,27 +1012,27 @@ export class IobrokerWebuiAppShell extends BaseCustomWebComponentConstructorAppe
991
1012
  motionRows.appendChild(mkField('Path ID', 'pathId', pathIdInp, cfg));
992
1013
  motionRows.appendChild(alignToPathChk);
993
1014
  motionRows.appendChild(orientToPathChk);
994
- block.appendChild(motionRows);
1015
+ body.appendChild(motionRows);
995
1016
  effectSel.addEventListener('change', () => { motionRows.style.display = effectSel.value === 'motionPath' ? '' : 'none'; });
996
1017
 
997
- block.appendChild(sec('Timing'));
998
- block.appendChild(mkField('Duration (s)', 'duration', durationInp, cfg));
999
- block.appendChild(mkField('Ease', 'ease', easeSel, cfg));
1000
- block.appendChild(mkField('Repeat', 'repeat', repeatInp, cfg));
1001
- block.appendChild(yoyoChk);
1018
+ body.appendChild(sec('Timing'));
1019
+ body.appendChild(mkField('Duration (s)', 'duration', durationInp, cfg));
1020
+ body.appendChild(mkField('Ease', 'ease', easeSel, cfg));
1021
+ body.appendChild(mkField('Repeat', 'repeat', repeatInp, cfg));
1022
+ body.appendChild(yoyoChk);
1002
1023
 
1003
1024
  const originRows = document.createElement('div');
1004
1025
  originRows.style.display = (cfg.effect === 'rotation' || cfg.effect === 'scale') ? '' : 'none';
1005
1026
  originRows.appendChild(sec('Transform Origin'));
1006
1027
  originRows.appendChild(mkField('Origin X (%)', 'transformOriginX', originXInp, cfg));
1007
1028
  originRows.appendChild(mkField('Origin Y (%)', 'transformOriginY', originYInp, cfg));
1008
- block.appendChild(originRows);
1029
+ body.appendChild(originRows);
1009
1030
  effectSel.addEventListener('change', () => { originRows.style.display = (effectSel.value === 'rotation' || effectSel.value === 'scale') ? '' : 'none'; });
1010
1031
 
1011
- block.appendChild(sec('Controls (OID triggers)'));
1012
- block.appendChild(playCtrl); block.appendChild(pauseCtrl);
1013
- block.appendChild(resumeCtrl); block.appendChild(stopCtrl);
1014
- block.appendChild(reverseCtrl);
1032
+ body.appendChild(sec('Controls (OID triggers)'));
1033
+ body.appendChild(playCtrl); body.appendChild(pauseCtrl);
1034
+ body.appendChild(resumeCtrl); body.appendChild(stopCtrl);
1035
+ body.appendChild(reverseCtrl);
1015
1036
 
1016
1037
  return block;
1017
1038
  };