Merge branch 'master' into naming-conventions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import computed from 'ember-computed';
|
||||
import EmberObject from 'ember-object';
|
||||
import { computed } from '@ember/object';
|
||||
import EmberObject from '@ember/object';
|
||||
import bignumber from 'kredits-web/utils/cps/bignumber';
|
||||
|
||||
export default EmberObject.extend({
|
||||
@@ -23,7 +23,7 @@ export default EmberObject.extend({
|
||||
isCurrentUser: false,
|
||||
|
||||
avatarURL: computed('github_uid', function() {
|
||||
let github_uid = this.get('github_uid');
|
||||
let github_uid = this.github_uid;
|
||||
if (github_uid) {
|
||||
return `https://avatars2.githubusercontent.com/u/${github_uid}?v=3&s=128`;
|
||||
}
|
||||
|
||||
+2
-11
@@ -1,11 +1,8 @@
|
||||
import EmberObject from 'ember-object';
|
||||
import computed, { alias } from 'ember-computed';
|
||||
import injectService from 'ember-service/inject';
|
||||
import EmberObject from '@ember/object';
|
||||
import { alias } from '@ember/object/computed';
|
||||
import bignumber from 'kredits-web/utils/cps/bignumber';
|
||||
|
||||
export default EmberObject.extend({
|
||||
kredits: injectService(),
|
||||
|
||||
// Contract
|
||||
id: bignumber('idRaw', 'toString'),
|
||||
creatorAccount: null,
|
||||
@@ -25,10 +22,4 @@ export default EmberObject.extend({
|
||||
details: {},
|
||||
url: null,
|
||||
ipfsData: '',
|
||||
|
||||
// Relationships
|
||||
// TODO: Optimize it. We don't need to find the contributor every time we add a new one
|
||||
contributor: computed('contributorId', 'kredits.contributors.[]', function() {
|
||||
return this.get('kredits.contributors').findBy('id', this.get('contributorId'));
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user