mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove unused
Also stop disable the loading indicator at the end of execution
This commit is contained in:
parent
cfa70b92f5
commit
0e99b9228d
1 changed files with 3 additions and 14 deletions
|
@ -238,15 +238,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
StartIndex: DashboardPage.newsStartIndex,
|
StartIndex: DashboardPage.newsStartIndex,
|
||||||
Limit: 4
|
Limit: 4
|
||||||
};
|
};
|
||||||
ApiClient.getProductNews(query).then(function(result) {
|
|
||||||
var html = result.Items.map(function(item) {
|
|
||||||
var itemHtml = "";
|
|
||||||
itemHtml += '<a class="clearLink" href="' + item.Link + '" target="_blank">', itemHtml += '<div class="listItem listItem-border">', itemHtml += '<i class="listItemIcon md-icon">dvr</i>', itemHtml += '<div class="listItemBody two-line">', itemHtml += '<div class="listItemBodyText">', itemHtml += item.Title, itemHtml += "</div>", itemHtml += '<div class="listItemBodyText secondary">';
|
|
||||||
var date = datetime.parseISO8601Date(item.Date, !0);
|
|
||||||
return itemHtml += datetime.toLocaleDateString(date), itemHtml += "</div>", itemHtml += "</div>", itemHtml += "</div>", itemHtml += "</a>"
|
|
||||||
});
|
|
||||||
page.querySelector(".latestNewsItems").innerHTML = html.join("")
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
startInterval: function(apiClient) {
|
startInterval: function(apiClient) {
|
||||||
apiClient.sendMessage("SessionsStart", "0,1500"), apiClient.sendMessage("ScheduledTasksInfoStart", "0,1000")
|
apiClient.sendMessage("SessionsStart", "0,1500"), apiClient.sendMessage("ScheduledTasksInfoStart", "0,1000")
|
||||||
|
@ -510,19 +501,17 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
var page = this,
|
var page = this,
|
||||||
apiClient = ApiClient;
|
apiClient = ApiClient;
|
||||||
if (apiClient) {
|
if (apiClient) {
|
||||||
DashboardPage.newsStartIndex = 0, loading.show(), pollForInfo(page, apiClient), DashboardPage.startInterval(apiClient), events.on(serverNotifications, "RestartRequired", onRestartRequired), events.on(serverNotifications, "ServerShuttingDown", onServerShuttingDown), events.on(serverNotifications, "ServerRestarting", onServerRestarting), events.on(serverNotifications, "PackageInstalling", onPackageInstalling), events.on(serverNotifications, "PackageInstallationCompleted", onPackageInstallationCompleted), events.on(serverNotifications, "Sessions", onSessionsUpdate),
|
loading.show(), pollForInfo(page, apiClient), DashboardPage.startInterval(apiClient), events.on(serverNotifications, "RestartRequired", onRestartRequired), events.on(serverNotifications, "ServerShuttingDown", onServerShuttingDown), events.on(serverNotifications, "ServerRestarting", onServerRestarting), events.on(serverNotifications, "PackageInstalling", onPackageInstalling), events.on(serverNotifications, "PackageInstallationCompleted", onPackageInstallationCompleted), events.on(serverNotifications, "Sessions", onSessionsUpdate),
|
||||||
events.on(serverNotifications, "ScheduledTasksInfo", onScheduledTasksUpdate), DashboardPage.lastAppUpdateCheck = null, DashboardPage.lastPluginUpdateCheck = null, getPluginSecurityInfo().then(function(pluginSecurityInfo) {
|
events.on(serverNotifications, "ScheduledTasksInfo", onScheduledTasksUpdate), DashboardPage.lastAppUpdateCheck = null, DashboardPage.lastPluginUpdateCheck = null, getPluginSecurityInfo().then(function(pluginSecurityInfo) {
|
||||||
DashboardPage.renderSupporterIcon(page, pluginSecurityInfo)
|
DashboardPage.renderSupporterIcon(page, pluginSecurityInfo)
|
||||||
}), reloadSystemInfo(page, ApiClient), DashboardPage.reloadNews(page), page.userActivityLog || (page.userActivityLog = new ActivityLog({
|
}), reloadSystemInfo(page, ApiClient), page.userActivityLog || (page.userActivityLog = new ActivityLog({
|
||||||
serverId: ApiClient.serverId(),
|
serverId: ApiClient.serverId(),
|
||||||
element: page.querySelector(".userActivityItems")
|
element: page.querySelector(".userActivityItems")
|
||||||
})), ApiClient.isMinServerVersion("3.4.1.25") && (page.serverActivityLog || (page.serverActivityLog = new ActivityLog({
|
})), ApiClient.isMinServerVersion("3.4.1.25") && (page.serverActivityLog || (page.serverActivityLog = new ActivityLog({
|
||||||
serverId: ApiClient.serverId(),
|
serverId: ApiClient.serverId(),
|
||||||
element: page.querySelector(".serverActivityItems")
|
element: page.querySelector(".serverActivityItems")
|
||||||
})));
|
})));
|
||||||
//FIXME: There is no jellyfin swagger instance, as such this url is currently invalid
|
refreshActiveRecordings(view, apiClient), loading.hide()
|
||||||
var swaggerUrl = "http://swagger.jellyfin.media?url=" + ApiClient.getUrl("openapi");
|
|
||||||
swaggerUrl = swaggerUrl + "&api_key=" + ApiClient.accessToken(), page.querySelector(".swaggerLink").setAttribute("href", swaggerUrl), refreshActiveRecordings(view, apiClient)
|
|
||||||
}
|
}
|
||||||
}), view.addEventListener("viewbeforehide", function() {
|
}), view.addEventListener("viewbeforehide", function() {
|
||||||
var apiClient = ApiClient;
|
var apiClient = ApiClient;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue