mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Show avatar instead of username for shared files
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
This commit is contained in:
parent
8ce5adcf70
commit
9998700e7c
2 changed files with 10 additions and 1 deletions
|
|
@ -555,6 +555,10 @@ a.action > img {
|
|||
#fileList a.action.action-share {
|
||||
padding: 17px 14px;
|
||||
}
|
||||
#fileList a.action.action-share .avatar {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#fileList a.action.action-menu {
|
||||
padding-top: 17px;
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ OC.Share = _.extend(OC.Share || {}, {
|
|||
var parts = this._REMOTE_OWNER_REGEXP.exec(remoteAddress);
|
||||
if (!parts) {
|
||||
// display as is, most likely to be a simple owner name
|
||||
return escapeHTML(remoteAddress);
|
||||
return '<div class="avatar" data-userName="' + escapeHTML(remoteAddress) + '" title="' + t('core', 'Shared by') + ' ' + escapeHTML(remoteAddress) + '"></div>';
|
||||
}
|
||||
|
||||
var userName = parts[1];
|
||||
|
|
@ -303,7 +303,12 @@ OC.Share = _.extend(OC.Share || {}, {
|
|||
message = t('core', 'Shared with {recipients}', {recipients: this._formatShareList(recipients.split(", ")).join(", ")}, 0, {escape: false});
|
||||
}
|
||||
action.html('<span> ' + message + '</span>').prepend(icon);
|
||||
|
||||
if (owner || recipients) {
|
||||
var avatarElement = action.find('.avatar');
|
||||
avatarElement.avatar(avatarElement.data('username'), 32);
|
||||
avatarElement.tooltip({placement: 'top'});
|
||||
|
||||
action.find('.remoteAddress').tooltip({placement: 'top'});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue