1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge branch 'master' into hadicharara/added-support-for-rtl-layouts

This commit is contained in:
Hadi Charara 2022-10-12 08:29:53 -04:00
commit 104ad71ea7
128 changed files with 1242 additions and 1454 deletions

View file

@ -6,7 +6,7 @@ import serverNotifications from '../../scripts/serverNotifications';
import dom from '../../scripts/dom';
import globalize from '../../scripts/globalize';
import { formatDistanceToNow } from 'date-fns';
import { localeWithSuffix } from '../../scripts/dfnshelper';
import { getLocaleWithSuffix } from '../../scripts/dfnshelper';
import loading from '../../components/loading/loading';
import playMethodHelper from '../../components/playback/playmethodhelper';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
@ -458,7 +458,7 @@ import confirm from '../../components/confirm/confirm';
html += ' / ';
if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
if (nowPlayingItem.RunTimeTicks) {
html += datetime.getDisplayRunningTime(nowPlayingItem.RunTimeTicks);
} else {
html += '0:00';
@ -477,7 +477,7 @@ import confirm from '../../components/confirm/confirm';
// how dates are returned by the server when the session is active and show something like 'Active now', instead of past/future sentences
if (!nowPlayingItem) {
return {
html: globalize.translate('LastSeen', formatDistanceToNow(Date.parse(session.LastActivityDate), localeWithSuffix)),
html: globalize.translate('LastSeen', formatDistanceToNow(Date.parse(session.LastActivityDate), getLocaleWithSuffix())),
image: imgUrl
};
}
@ -747,14 +747,7 @@ import confirm from '../../components/confirm/confirm';
console.debug('onServerRestarting not implemented', evt, apiClient);
}
function onPackageInstalling(evt, apiClient) {
if (apiClient.serverId() === serverId) {
pollForInfo(view, apiClient);
reloadSystemInfo(view, apiClient);
}
}
function onPackageInstallationCompleted(evt, apiClient) {
function onPackageInstall(_, apiClient) {
if (apiClient.serverId() === serverId) {
pollForInfo(view, apiClient);
reloadSystemInfo(view, apiClient);
@ -786,8 +779,8 @@ import confirm from '../../components/confirm/confirm';
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, 'PackageInstalling', onPackageInstall);
Events.on(serverNotifications, 'PackageInstallationCompleted', onPackageInstall);
Events.on(serverNotifications, 'Sessions', onSessionsUpdate);
Events.on(serverNotifications, 'ScheduledTasksInfo', onScheduledTasksUpdate);
DashboardPage.lastAppUpdateCheck = null;
@ -800,13 +793,11 @@ import confirm from '../../components/confirm/confirm';
});
}
if (ApiClient.isMinServerVersion('3.4.1.25')) {
if (!page.serverActivityLog) {
page.serverActivityLog = new ActivityLog({
serverId: ApiClient.serverId(),
element: page.querySelector('.serverActivityItems')
});
}
if (!page.serverActivityLog) {
page.serverActivityLog = new ActivityLog({
serverId: ApiClient.serverId(),
element: page.querySelector('.serverActivityItems')
});
}
refreshActiveRecordings(view, apiClient);
@ -826,8 +817,8 @@ import confirm from '../../components/confirm/confirm';
Events.off(serverNotifications, 'RestartRequired', onRestartRequired);
Events.off(serverNotifications, 'ServerShuttingDown', onServerShuttingDown);
Events.off(serverNotifications, 'ServerRestarting', onServerRestarting);
Events.off(serverNotifications, 'PackageInstalling', onPackageInstalling);
Events.off(serverNotifications, 'PackageInstallationCompleted', onPackageInstallationCompleted);
Events.off(serverNotifications, 'PackageInstalling', onPackageInstall);
Events.off(serverNotifications, 'PackageInstallationCompleted', onPackageInstall);
Events.off(serverNotifications, 'Sessions', onSessionsUpdate);
Events.off(serverNotifications, 'ScheduledTasksInfo', onScheduledTasksUpdate);