diff --git a/lib/persona.js b/lib/persona.js index 14530bf..b41eeeb 100644 --- a/lib/persona.js +++ b/lib/persona.js @@ -51,7 +51,13 @@ $(document).ready(function() { $.getJSON(config.relative_path + '/api/user/' + utils.slugify(data.options.title), function(user) { var el = $('#taskbar [data-uuid="' + data.uuid + '"] a'); el.find('i').remove(); - el.css('background-image', 'url(' + user.picture + ')'); + if (user.picture) { + el.css('background-image', 'url(' + user.picture + ')'); + } else { + el .css('background-color', user['icon:bgColor']) + .text(user['icon:text']) + .addClass('user-icon'); + } }); } diff --git a/modules/taskbar.less b/modules/taskbar.less index 1fa4479..9580229 100644 --- a/modules/taskbar.less +++ b/modules/taskbar.less @@ -84,6 +84,9 @@ &.taskbar-chat { a, a:hover, a:focus, a:active { + .user-icon-style(50px, 2.4rem, 50%) !important; + padding: 0; + color: white; background: none; background-size: cover;