Avatar in the user admin menu

This commit is contained in:
yflory 2017-07-10 11:16:44 +02:00
parent 8dc8aa27ab
commit f0523a0153

View file

@ -1582,8 +1582,7 @@ define([
//var $userbig = $('<span>', {'class': 'big'}).append($displayedName.clone());
var $userButton = $('<div>').append($icon);//.append($userbig);
if (account) {
$userButton = $('<div>').append(accountName.slice(0,1).toUpperCase());
$userButton = $('<div>');//.append(accountName.slice(0,1).toUpperCase());
}
/*if (account && config.displayNameCls) {
$userbig.append($('<span>', {'class': 'account-name'}).text('(' + accountName + ')'));
@ -1600,6 +1599,13 @@ define([
};
var $userAdmin = createDropdown(dropdownConfigUser);
if (account) {
var $avatar = $userAdmin.find('.buttonTitle');
var url = getStore() ? getStore().getProfile().avatar : undefined;
$avatar.html('');
common.displayAvatar($avatar, url, accountName, function ($img) {});
}
$userAdmin.find('a.logout').click(function () {
common.logout();
window.location.href = '/';