diff --git a/app/components/progress-bar.hbs b/app/components/progress-bar.hbs index e9220e79..a60ef1db 100644 --- a/app/components/progress-bar.hbs +++ b/app/components/progress-bar.hbs @@ -12,40 +12,15 @@ step='10' {{on 'change' this.onChange}} {{on 'input' this.onInput}} - disabled={{not this.isEditable}} /> \ No newline at end of file diff --git a/app/components/progress-bar.js b/app/components/progress-bar.js index 6aea892e..356ec898 100644 --- a/app/components/progress-bar.js +++ b/app/components/progress-bar.js @@ -4,29 +4,9 @@ import { action } from '@ember/object'; import { debounce } from '@ember/runloop'; export default class ProgressBarComponent extends Component { - @tracked isEditable = false; @tracked value = this.args.value; - lastEditTime = null; - - @action turnEditModeOn() { - this.isEditable = true; - this.lastEditTime = Date.now(); - this.setEditableToFalse(); - } - - setEditableToFalse() { - setTimeout(() => { - const timeDelta = Date.now() - this.lastEditTime; - if (this.isEditable && timeDelta >= 5000) { - this.isEditable = false; - } else if (this.isEditable) { - this.setEditableToFalse(); - } - }, 5000); - } @action onInput(e) { - this.lastEditTime = Date.now(); this.value = e.target.value; if (this.args.onInput) { this.args.onInput(this.value); @@ -34,7 +14,6 @@ export default class ProgressBarComponent extends Component { } @action onChange(e) { - this.lastEditTime = Date.now(); if (this.args.onChange) { debounce(this, this.debouncedChange, e, 600); }