iobroker.mywebui 1.37.98 → 1.38.0

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.98",
4
+ "version": "1.38.00",
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.98",
3
+ "version": "1.38.00",
4
4
  "description": "ioBroker mywebui - Custom edited mywebui by gokturk413",
5
5
  "type": "module",
6
6
  "main": "dist/backend/main.js",
@@ -1228,7 +1228,8 @@ export class IobrokerWebuiAppShell extends BaseCustomWebComponentConstructorAppe
1228
1228
  ['slideInLeft','Slide In Left'],['slideInRight','Slide In Right'],
1229
1229
  ['slideInTop','Slide In Top'],['slideInBottom','Slide In Bottom'],
1230
1230
  ['bounce','Bounce'],['pulse','Pulse'],['shake','Shake'],
1231
- ['glow','Glow'],['blur','Blur'],['spin','Spin'],['flip','Flip 3D']
1231
+ ['glow','Glow'],['blur','Blur'],['spin','Spin'],['flip','Flip 3D'],
1232
+ ['pulseRing','Pulse Ring']
1232
1233
  ], cfg.type || '');
1233
1234
 
1234
1235
  const triggerSel = sel([
@@ -1246,9 +1247,11 @@ export class IobrokerWebuiAppShell extends BaseCustomWebComponentConstructorAppe
1246
1247
 
1247
1248
  const condSel = sel([['equal','='],['not_equal','≠'],['less_than','<'],['greater_than','>'],['exists','exists']], cfg.condition || 'equal');
1248
1249
  const condValInp = inp(cfg.conditionValue ?? 'true');
1249
- const glowColorInp = inp(cfg.glowColor || 'yellow', 'color');
1250
- const glowSizeInp = inp(cfg.glowSize || 10, 'number');
1251
- const blurInp = inp(cfg.blurAmount || 5, 'number');
1250
+ const glowColorInp = inp(cfg.glowColor || 'yellow', 'color');
1251
+ const glowSizeInp = inp(cfg.glowSize || 10, 'number');
1252
+ const blurInp = inp(cfg.blurAmount || 5, 'number');
1253
+ const pulseScaleInp = inp(cfg.scale ?? 2.5, 'number');
1254
+ const pulseOpacityInp= inp(cfg.opacityFrom ?? 1, 'number');
1252
1255
 
1253
1256
  body.appendChild(field('Type', 'type', typeSel));
1254
1257
  body.appendChild(field('Trigger', null, triggerSel));
@@ -1289,6 +1292,14 @@ export class IobrokerWebuiAppShell extends BaseCustomWebComponentConstructorAppe
1289
1292
  body.appendChild(blurSection);
1290
1293
  typeSel.addEventListener('change', () => { blurSection.style.display = typeSel.value === 'blur' ? '' : 'none'; });
1291
1294
 
1295
+ // Pulse Ring section
1296
+ const pulseRingSection = document.createElement('div');
1297
+ pulseRingSection.style.display = cfg.type === 'pulseRing' ? '' : 'none';
1298
+ pulseRingSection.appendChild(field('Scale', 'scale', pulseScaleInp));
1299
+ pulseRingSection.appendChild(field('Opacity From', 'opacityFrom', pulseOpacityInp));
1300
+ body.appendChild(pulseRingSection);
1301
+ typeSel.addEventListener('change', () => { pulseRingSection.style.display = typeSel.value === 'pulseRing' ? '' : 'none'; });
1302
+
1292
1303
  // _collect: read current UI values back into a plain object
1293
1304
  cfg._collect = () => {
1294
1305
  const out = {};
@@ -1301,6 +1312,7 @@ export class IobrokerWebuiAppShell extends BaseCustomWebComponentConstructorAppe
1301
1312
  if (triggerSel.value === 'oid') { out.condition = condSel.value; out.conditionValue = condValInp.value; }
1302
1313
  if (typeSel.value === 'glow') { out.glowColor = glowColorInp.value; out.glowSize = parseInt(glowSizeInp.value) || 10; }
1303
1314
  if (typeSel.value === 'blur') out.blurAmount = parseInt(blurInp.value) || 5;
1315
+ if (typeSel.value === 'pulseRing') { out.scale = parseFloat(pulseScaleInp.value) || 2.5; out.opacityFrom = parseFloat(pulseOpacityInp.value) ?? 1; }
1304
1316
  for (const [k, v] of Object.entries(cfg)) { if (k.endsWith('_bind') && v) out[k] = v; }
1305
1317
  return out;
1306
1318
  };
@@ -656,9 +656,11 @@ async function _applyEffect(el, cfg) {
656
656
  case 'pulseRing': {
657
657
  const scale = parseFloat(cfg.scale) || 2.5;
658
658
  const ringEase = cfg.ease || 'power1.out';
659
+ const isLoadTrigger = !cfg.trigger || cfg.trigger === 'load';
660
+ const pulseRepeat = repeat !== 0 ? repeat : (isLoadTrigger ? -1 : 0);
659
661
  gsap.fromTo(el,
660
662
  { scale: 0, opacity: cfg.opacityFrom != null ? parseFloat(cfg.opacityFrom) : 1 },
661
- { scale, opacity: 0, duration: dur, ease: ringEase, repeat: repeat !== 0 ? repeat : -1, delay, transformOrigin: '50% 50%' }
663
+ { scale, opacity: 0, duration: dur, ease: ringEase, repeat: pulseRepeat, delay, transformOrigin: '50% 50%' }
662
664
  ); break;
663
665
  }
664
666
  }