0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Merge pull request #2807 from novaugust/ember-user-cover-default

Fix default user cover on ember settings pane
This commit is contained in:
Hannah Wolfe 2014-05-25 16:48:15 +03:00
commit 40d4cc7e55

View file

@ -1,10 +1,14 @@
/*global alert */
var SettingsUserController = Ember.Controller.extend({
coverDefault: '/shared/img/user-cover.png',
cover: function () {
// @TODO: add {{asset}} subdir path
return this.user.getWithDefault('cover', '/shared/img/user-cover.png');
}.property('user.cover'),
var cover = this.user.get('cover');
if (typeof cover !== 'string') {
cover = this.get('coverDefault');
}
return cover;
}.property('user.cover', 'coverDefault'),
coverTitle: function () {
return this.get('user.name') + '\'s Cover Image';