Fix linting errors
This commit is contained in:
@@ -1,27 +1,12 @@
|
||||
import Component from '@ember/component';
|
||||
import { and, notEmpty } from '@ember/object/computed';
|
||||
import { inject as injectService } from '@ember/service';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
|
||||
export default Component.extend({
|
||||
kredits: injectService(),
|
||||
kredits: service(),
|
||||
|
||||
// Default attributes used by reset
|
||||
attributes: {
|
||||
account: null,
|
||||
name: null,
|
||||
kind: 'person',
|
||||
url: null,
|
||||
github_username: null,
|
||||
github_uid: null,
|
||||
wiki_username: null,
|
||||
isCore: false,
|
||||
},
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
this.reset();
|
||||
},
|
||||
attributes: null,
|
||||
|
||||
// TODO: add proper address validation
|
||||
isValidAccount: notEmpty('account'),
|
||||
@@ -36,6 +21,27 @@ export default Component.extend({
|
||||
'isValidGithubUID'
|
||||
),
|
||||
|
||||
init () {
|
||||
this._super(...arguments);
|
||||
|
||||
// Default attributes used by reset
|
||||
this.set('attributes', {
|
||||
account: null,
|
||||
name: null,
|
||||
kind: 'person',
|
||||
url: null,
|
||||
github_username: null,
|
||||
github_uid: null,
|
||||
wiki_username: null,
|
||||
isCore: false
|
||||
});
|
||||
},
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
this.reset();
|
||||
},
|
||||
|
||||
reset: function() {
|
||||
this.setProperties(this.attributes);
|
||||
},
|
||||
@@ -61,4 +67,5 @@ export default Component.extend({
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -3,21 +3,9 @@ import { computed } from '@ember/object';
|
||||
import { and, notEmpty } from '@ember/object/computed';
|
||||
|
||||
export default Component.extend({
|
||||
// Default attributes used by reset
|
||||
attributes: {
|
||||
contributorId: null,
|
||||
kind: 'community',
|
||||
amount: null,
|
||||
description: null,
|
||||
url: null,
|
||||
},
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
this.reset();
|
||||
},
|
||||
|
||||
contributors: [],
|
||||
attributes: null,
|
||||
contributors: null,
|
||||
|
||||
isValidContributor: notEmpty('contributorId'),
|
||||
isValidAmount: computed('amount', function() {
|
||||
@@ -29,6 +17,26 @@ export default Component.extend({
|
||||
'isValidAmount',
|
||||
'isValidDescription'),
|
||||
|
||||
init () {
|
||||
this._super(...arguments);
|
||||
|
||||
// Default attributes used by reset
|
||||
this.set('attributes', {
|
||||
contributorId: null,
|
||||
kind: 'community',
|
||||
amount: null,
|
||||
description: null,
|
||||
url: null,
|
||||
});
|
||||
|
||||
this.set('contributors', []);
|
||||
},
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
this.reset();
|
||||
},
|
||||
|
||||
reset: function() {
|
||||
this.setProperties(this.attributes);
|
||||
},
|
||||
@@ -54,4 +62,5 @@ export default Component.extend({
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -12,6 +12,11 @@ let categoryColors = {
|
||||
export default Component.extend({
|
||||
|
||||
contributions: null,
|
||||
chartOptions: Object.freeze({
|
||||
legend: {
|
||||
display: false
|
||||
}
|
||||
}),
|
||||
|
||||
chartData: computed('contributions', function() {
|
||||
let kredits = this.contributions
|
||||
@@ -52,12 +57,6 @@ export default Component.extend({
|
||||
'Documentation'
|
||||
],
|
||||
}
|
||||
}),
|
||||
|
||||
chartOptions: {
|
||||
legend: {
|
||||
display: false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user