equal
deleted
inserted
replaced
|
1 import Ember from 'ember'; |
|
2 |
|
3 export default Ember.Component.extend({ |
|
4 |
|
5 player: Ember.inject.service(), |
|
6 |
|
7 classNames: ['notice-component'], |
|
8 |
|
9 item: Ember.computed('player.model', function() { |
|
10 return this.get('player').get('model'); |
|
11 }), |
|
12 |
|
13 participants: Ember.computed('player.model.contributors', function() { |
|
14 var participants = []; |
|
15 if(this.get('player').get('model')) { |
|
16 this.get('player').get('model').get('contributors').forEach(function(contributor) { |
|
17 if(contributor.name) { |
|
18 participants.push({ name: contributor.name, role: contributor.role.split('/').pop() }); |
|
19 } |
|
20 }); |
|
21 } |
|
22 return participants; |
|
23 }), |
|
24 |
|
25 location: Ember.computed('player.model.geoInfo', function() { |
|
26 var location = ''; |
|
27 if(this.get('player').get('model')) { |
|
28 var meta = this.get('player').get('model').get('geoInfo').notes.find(element => element.lang); |
|
29 if(meta) { |
|
30 location = meta.value; |
|
31 } |
|
32 } |
|
33 return location; |
|
34 }) |
|
35 |
|
36 }); |