mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
display additional users in dashboard
This commit is contained in:
parent
2957a40d8d
commit
1b1feb66cc
@ -123,9 +123,7 @@
|
||||
html += '</td>';
|
||||
|
||||
html += '<td class="username">';
|
||||
if (connection.UserId) {
|
||||
html += '<a href="useredit.html?userid=' + connection.UserId + '">' + connection.UserName + '</a>';
|
||||
}
|
||||
html += DashboardPage.getUsersHtml(connection);
|
||||
html += '</td>';
|
||||
|
||||
var nowPlayingItem = connection.NowPlayingItem;
|
||||
@ -147,15 +145,27 @@
|
||||
$('.deadSession', table).remove();
|
||||
},
|
||||
|
||||
getUsersHtml: function (session) {
|
||||
|
||||
var html = '';
|
||||
|
||||
if (session.UserId) {
|
||||
html += '<div><a href="useredit.html?userid=' + session.UserId + '">' + session.UserName + '</a><div>';
|
||||
}
|
||||
|
||||
html += session.AdditionalUsers.map(function (currentSession) {
|
||||
|
||||
return '<div><a href="useredit.html?userid=' + currentSession.UserId + '">' + currentSession.UserName + '</a><div>';
|
||||
});
|
||||
|
||||
return html;
|
||||
},
|
||||
|
||||
updateSession: function (row, session) {
|
||||
|
||||
row.removeClass('deadSession');
|
||||
|
||||
if (session.UserId) {
|
||||
$('.username', row).html('<a href="useredit.html?userid=' + session.UserId + '">' + session.UserName + '</a>').trigger('create');
|
||||
} else {
|
||||
$('.username', row).html('');
|
||||
}
|
||||
$('.username', row).html(DashboardPage.getUsersHtml(session)).trigger('create');
|
||||
|
||||
var nowPlayingItem = session.NowPlayingItem;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user