mockaton 10.3.7 → 10.4.1

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mockaton",
3
3
  "description": "HTTP Mock Server",
4
4
  "type": "module",
5
- "version": "10.3.7",
5
+ "version": "10.4.1",
6
6
  "main": "index.js",
7
7
  "types": "index.d.ts",
8
8
  "license": "MIT",
package/src/Dashboard.css CHANGED
@@ -642,8 +642,7 @@ table {
642
642
  background: var(--colorAccent);
643
643
  animation-name: _kfProgress;
644
644
  animation-timing-function: linear;
645
- animation-delay: 80ms;
646
- /*animation-duration: It's in JavaScript */
645
+ /* duration in JavaScript */
647
646
  }
648
647
  }
649
648
  @keyframes _kfProgress {
package/src/Dashboard.js CHANGED
@@ -277,6 +277,12 @@ function GlobalDelayField() {
277
277
  .then(parseError)
278
278
  .catch(onError)
279
279
  }
280
+ function onWheel(event) {
281
+ const val = this.valueAsNumber - event.deltaY * 10
282
+ this.valueAsNumber = Math.max(val, 0)
283
+ clearTimeout(onWheel.timer)
284
+ onWheel.timer = setTimeout(onChange.bind(this), 300)
285
+ }
280
286
  return (
281
287
  r('label', className(CSS.Field, CSS.GlobalDelayField),
282
288
  r('span', null, Strings.delay_ms),
@@ -286,7 +292,8 @@ function GlobalDelayField() {
286
292
  step: 100,
287
293
  autocomplete: 'none',
288
294
  value: delay,
289
- onChange
295
+ onChange,
296
+ onWheel
290
297
  })))
291
298
  }
292
299
 
@@ -709,7 +716,12 @@ function PayloadViewer() {
709
716
  function PayloadViewerProgressBar() {
710
717
  return (
711
718
  r('div', className(CSS.ProgressBar),
712
- r('div', { style: { animationDuration: state.delay + 'ms' } })))
719
+ r('div', {
720
+ style: {
721
+ animationDelay: 80 + 'ms',
722
+ animationDuration: -80 + state.delay + 'ms'
723
+ }
724
+ })))
713
725
  }
714
726
 
715
727
  function PayloadViewerTitle({ file, statusText }) {