mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add library to front page
This commit is contained in:
parent
dc6dbcf469
commit
655c9cb48f
11 changed files with 102 additions and 28 deletions
|
@ -32,6 +32,18 @@
|
|||
|
||||
DashboardPage.reloadSystemInfo(page);
|
||||
DashboardPage.reloadNews(page);
|
||||
|
||||
DashboardPage.sessionUpdateTimer = setInterval(DashboardPage.refreshSessionsLocally, 60000);
|
||||
},
|
||||
|
||||
refreshSessionsLocally: function () {
|
||||
|
||||
var list = DashboardPage.sessionsList;
|
||||
|
||||
if (list) {
|
||||
console.log('refreshSessionsLocally');
|
||||
DashboardPage.renderActiveConnections($.mobile.activePage, list);
|
||||
}
|
||||
},
|
||||
|
||||
reloadSystemInfo: function (page) {
|
||||
|
@ -122,6 +134,10 @@
|
|||
|
||||
$(ApiClient).off("websocketmessage", DashboardPage.onWebSocketMessage).off("websocketopen", DashboardPage.onWebSocketConnectionChange).off("websocketerror", DashboardPage.onWebSocketConnectionChange).off("websocketclose", DashboardPage.onWebSocketConnectionChange);
|
||||
DashboardPage.stopInterval();
|
||||
|
||||
if (DashboardPage.sessionUpdateTimer) {
|
||||
clearInterval(DashboardPage.sessionUpdateTimer);
|
||||
}
|
||||
},
|
||||
|
||||
startInterval: function () {
|
||||
|
@ -190,6 +206,8 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
DashboardPage.sessionsList = sessions;
|
||||
|
||||
var parentElement = $('.activeDevices', page);
|
||||
|
||||
$('.activeSession', parentElement).addClass('deadSession');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue