mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 15:04:00 +08:00
Add a widget setting for the user's avatar size
This commit is contained in:
parent
7db2083d45
commit
705ab88173
|
@ -21,11 +21,17 @@ const dropdown = {
|
||||||
};
|
};
|
||||||
|
|
||||||
createWidget('header-notifications', {
|
createWidget('header-notifications', {
|
||||||
|
settings: {
|
||||||
|
avatarSize: 'medium'
|
||||||
|
},
|
||||||
|
|
||||||
html(attrs) {
|
html(attrs) {
|
||||||
const { currentUser } = this;
|
const { currentUser } = this;
|
||||||
|
|
||||||
const contents = [ avatarImg('medium', { template: currentUser.get('avatar_template'),
|
const contents = [ avatarImg(this.settings.avatarSize, {
|
||||||
username: currentUser.get('username') }) ];
|
template: currentUser.get('avatar_template'),
|
||||||
|
username: currentUser.get('username')
|
||||||
|
}) ];
|
||||||
|
|
||||||
const unreadNotifications = currentUser.get('unread_notifications');
|
const unreadNotifications = currentUser.get('unread_notifications');
|
||||||
if (!!unreadNotifications) {
|
if (!!unreadNotifications) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user