File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import attr from 'ember-data/attr';
4
4
import ModelBase from 'open-event-frontend/models/base' ;
5
5
import { belongsTo } from 'ember-data/relationships' ;
6
6
import { computedSegmentedLink } from 'open-event-frontend/utils/computed-helpers' ;
7
- import { socialMediaIdentifiers } from 'open-event-frontend/utils/dictionary/social-media' ;
7
+ import { socialMediaIdentifiers , socialMediaMap } from 'open-event-frontend/utils/dictionary/social-media' ;
8
8
9
9
export default ModelBase . extend ( {
10
10
name : attr ( 'string' ) ,
@@ -36,5 +36,9 @@ export default ModelBase.extend({
36
36
return ! this . isCustom ;
37
37
} ) ,
38
38
39
+ displayName : computed ( 'normalizedName' , function ( ) {
40
+ return socialMediaMap [ this . normalizedName ] ?. name ?? this . name ;
41
+ } ) ,
42
+
39
43
segmentedLink : computedSegmentedLink . bind ( this ) ( 'link' )
40
44
} ) ;
Original file line number Diff line number Diff line change 48
48
<td >
49
49
{{ #if this.data.socialLinks }}
50
50
{{ #each this.data.socialLinks as |socialLink index |~}}
51
- {{ if (not-eq index 0 ) ' ,' }} <a href =" {{ socialLink.link }} " target =" _blank" rel =" noopener noreferrer" >{{ socialLink.name }} </a >
51
+ {{ if (not-eq index 0 ) ' ,' }} <a href =" {{ socialLink.link }} " target =" _blank" rel =" noopener noreferrer" >{{ socialLink.displayName }} </a >
52
52
{{ ~/each }}
53
53
{{ else }}
54
54
{{ t ' No social links present. ' }} <a href =" {{ href-to ' events.view.edit.basic-details' }} #social-links" >{{ t ' Click here to add' }} </a >
Original file line number Diff line number Diff line change 11
11
<div class =" item" >
12
12
<i class =" fitted {{ socialLink.normalizedName }} disabled icon" ></i >
13
13
<div class =" content" >
14
- <a href =" {{ socialLink.link }} " target =" _blank" rel =" noopener nofollow" >{{ socialLink.name }} </a >
14
+ <a href =" {{ socialLink.link }} " target =" _blank" rel =" noopener nofollow" >{{ socialLink.displayName }} </a >
15
15
</div >
16
16
</div >
17
17
{{ /each }}
You can’t perform that action at this time.
0 commit comments