Fixed asset rewriting for default user images
no issue - ember-cli's asset rewriting was not picking up the asset URLs when they were directly embedded in a template string, fix is to ensure the image location is unambiguous by assigning it to a variable first
This commit is contained in:
parent
9dee8a0f31
commit
cbcf09e4fc
|
@ -34,7 +34,8 @@ export default Component.extend({
|
|||
}),
|
||||
|
||||
authorAvatar: computed('post.author.profileImage', function () {
|
||||
return this.get('post.author.profileImage') || `${this.get('ghostPaths.assetRoot')}/img/user-image.png`;
|
||||
let defaultImage = '/img/user-image.png';
|
||||
return this.get('post.author.profileImage') || `${this.get('ghostPaths.assetRoot')}${defaultImage}`;
|
||||
}),
|
||||
|
||||
authorAvatarBackground: computed('authorAvatar', function () {
|
||||
|
|
|
@ -15,7 +15,8 @@ export default Component.extend({
|
|||
user: null,
|
||||
|
||||
userDefault: computed('ghostPaths', function () {
|
||||
return `${this.get('ghostPaths.assetRoot')}/img/user-image.png`;
|
||||
let image = '/img/user-image.png';
|
||||
return `${this.get('ghostPaths.assetRoot')}${image}`;
|
||||
}),
|
||||
|
||||
userImageBackground: computed('user.profileImage', 'userDefault', function () {
|
||||
|
|
|
@ -65,7 +65,8 @@ export default Controller.extend({
|
|||
|
||||
// duplicated in gh-user-active -- find a better home and consolidate?
|
||||
userDefault: computed('ghostPaths', function () {
|
||||
return `${this.get('ghostPaths.assetRoot')}/img/user-image.png`;
|
||||
let defaultImage = '/img/user-image.png';
|
||||
return `${this.get('ghostPaths.assetRoot')}${defaultImage}`;
|
||||
}),
|
||||
|
||||
userImageBackground: computed('user.profileImage', 'userDefault', function () {
|
||||
|
@ -77,7 +78,8 @@ export default Controller.extend({
|
|||
// end duplicated
|
||||
|
||||
coverDefault: computed('ghostPaths', function () {
|
||||
return `${this.get('ghostPaths.assetRoot')}/img/user-cover.png`;
|
||||
let defaultCover = '/img/user-cover.png';
|
||||
return `${this.get('ghostPaths.assetRoot')}${defaultCover}`;
|
||||
}),
|
||||
|
||||
coverImageBackground: computed('user.coverImage', 'coverDefault', function () {
|
||||
|
|
Loading…
Reference in New Issue