mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
display additional users in dashboard
This commit is contained in:
parent
2957a40d8d
commit
1b1feb66cc
1 changed files with 18 additions and 8 deletions
|
@ -123,9 +123,7 @@
|
||||||
html += '</td>';
|
html += '</td>';
|
||||||
|
|
||||||
html += '<td class="username">';
|
html += '<td class="username">';
|
||||||
if (connection.UserId) {
|
html += DashboardPage.getUsersHtml(connection);
|
||||||
html += '<a href="useredit.html?userid=' + connection.UserId + '">' + connection.UserName + '</a>';
|
|
||||||
}
|
|
||||||
html += '</td>';
|
html += '</td>';
|
||||||
|
|
||||||
var nowPlayingItem = connection.NowPlayingItem;
|
var nowPlayingItem = connection.NowPlayingItem;
|
||||||
|
@ -147,15 +145,27 @@
|
||||||
$('.deadSession', table).remove();
|
$('.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) {
|
updateSession: function (row, session) {
|
||||||
|
|
||||||
row.removeClass('deadSession');
|
row.removeClass('deadSession');
|
||||||
|
|
||||||
if (session.UserId) {
|
$('.username', row).html(DashboardPage.getUsersHtml(session)).trigger('create');
|
||||||
$('.username', row).html('<a href="useredit.html?userid=' + session.UserId + '">' + session.UserName + '</a>').trigger('create');
|
|
||||||
} else {
|
|
||||||
$('.username', row).html('');
|
|
||||||
}
|
|
||||||
|
|
||||||
var nowPlayingItem = session.NowPlayingItem;
|
var nowPlayingItem = session.NowPlayingItem;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue