open-vault/ui/app/components/shamir-progress.js

16 lines
436 B
JavaScript
Raw Normal View History

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