Add a widget setting for the user's avatar size

This commit is contained in:
Robin Ward 2016-08-12 11:09:36 -04:00
parent 7db2083d45
commit 705ab88173

View file

@ -21,11 +21,17 @@ const dropdown = {
};
createWidget('header-notifications', {
settings: {
avatarSize: 'medium'
},
html(attrs) {
const { currentUser } = this;
const contents = [ avatarImg('medium', { template: currentUser.get('avatar_template'),
username: currentUser.get('username') }) ];
const contents = [ avatarImg(this.settings.avatarSize, {
template: currentUser.get('avatar_template'),
username: currentUser.get('username')
}) ];
const unreadNotifications = currentUser.get('unread_notifications');
if (!!unreadNotifications) {