open-vault/ui/app/components/shamir-progress.js
2018-04-03 09:16:57 -05:00

15 lines
397 B
JavaScript

import Ember from 'ember';
export default Ember.Component.extend({
threshold: null,
progress: null,
classNames: ['shamir-progress'],
progressPercent: Ember.computed('threshold', 'progress', function() {
const { threshold, progress } = this.getProperties('threshold', 'progress');
if (threshold && progress) {
return progress / threshold * 100;
}
return 0;
}),
});