2018-04-03 14:16:57 +00:00
|
|
|
import Ember from 'ember';
|
2018-06-26 21:35:47 +00:00
|
|
|
const { computed } = Ember;
|
2018-04-03 14:16:57 +00:00
|
|
|
|
|
|
|
export default Ember.Component.extend({
|
|
|
|
threshold: null,
|
|
|
|
progress: null,
|
|
|
|
classNames: ['shamir-progress'],
|
2018-06-26 21:35:47 +00:00
|
|
|
progressDecimal: computed('threshold', 'progress', function() {
|
2018-04-03 14:16:57 +00:00
|
|
|
const { threshold, progress } = this.getProperties('threshold', 'progress');
|
|
|
|
if (threshold && progress) {
|
2018-06-26 21:35:47 +00:00
|
|
|
return progress / threshold;
|
2018-04-03 14:16:57 +00:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}),
|
|
|
|
});
|