mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge branch 'master' into trickplay-new
This commit is contained in:
commit
7f7c1be5e1
44 changed files with 548 additions and 277 deletions
|
@ -8,16 +8,22 @@
|
|||
<span class="material-icons chevron_right" aria-hidden="true"></span>
|
||||
</a>
|
||||
|
||||
<div class="paperList" style="padding: 1em;">
|
||||
<p id="serverName"></p>
|
||||
<p id="versionNumber"></p>
|
||||
<div class="serverInfo paperList">
|
||||
<div>${LabelServerName}</div>
|
||||
<div id="serverName"></div>
|
||||
<div>${LabelServerVersion}</div>
|
||||
<div id="versionNumber"></div>
|
||||
<div>${LabelWebVersion}</div>
|
||||
<div id="webVersion"></div>
|
||||
<div>${LabelBuildVersion}</div>
|
||||
<div id="buildVersion"></div>
|
||||
</div>
|
||||
|
||||
<div class="dashboardActionsContainer">
|
||||
<button is="emby-button" type="button" class="raised btnRefresh">
|
||||
<span>${ButtonScanAllLibraries}</span>
|
||||
</button>
|
||||
<button is="emby-button" type="button" id="btnRestartServer" class="raised hide" onclick="DashboardPage.restart(this);">
|
||||
<button is="emby-button" type="button" id="btnRestartServer" class="raised" onclick="DashboardPage.restart(this);">
|
||||
<span>${Restart}</span>
|
||||
</button>
|
||||
<button is="emby-button" type="button" id="btnShutdown" class="raised" onclick="DashboardPage.shutdown(this);">
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import escapeHtml from 'escape-html';
|
||||
|
||||
import datetime from '../../scripts/datetime';
|
||||
import Events from '../../utils/events.ts';
|
||||
import itemHelper from '../../components/itemHelper';
|
||||
|
@ -14,10 +15,6 @@ import imageLoader from '../../components/images/imageLoader';
|
|||
import ActivityLog from '../../components/activitylog';
|
||||
import imageHelper from '../../utils/image';
|
||||
import indicators from '../../components/indicators/indicators';
|
||||
import '../../components/listview/listview.scss';
|
||||
import '../../elements/emby-button/emby-button';
|
||||
import '../../styles/flexstyles.scss';
|
||||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import taskButton from '../../scripts/taskbutton';
|
||||
import Dashboard from '../../utils/dashboard';
|
||||
import ServerConnections from '../../components/ServerConnections';
|
||||
|
@ -25,6 +22,19 @@ import alert from '../../components/alert';
|
|||
import confirm from '../../components/confirm/confirm';
|
||||
import { getDefaultBackgroundClass } from '../../components/cardbuilder/cardBuilderUtils';
|
||||
|
||||
import { getSystemInfoQuery } from 'hooks/useSystemInfo';
|
||||
import { toApi } from 'utils/jellyfin-apiclient/compat';
|
||||
import { queryClient } from 'utils/query/queryClient';
|
||||
|
||||
import { version as WEB_VERSION } from '../../../package.json';
|
||||
|
||||
import '../../elements/emby-button/emby-button';
|
||||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
|
||||
import '../../components/listview/listview.scss';
|
||||
import '../../styles/flexstyles.scss';
|
||||
import './dashboard.scss';
|
||||
|
||||
function showPlaybackInfo(btn, session) {
|
||||
let title;
|
||||
const text = [];
|
||||
|
@ -199,22 +209,21 @@ function refreshActiveRecordings(view, apiClient) {
|
|||
}
|
||||
|
||||
function reloadSystemInfo(view, apiClient) {
|
||||
apiClient.getSystemInfo().then(function (systemInfo) {
|
||||
view.querySelector('#serverName').innerText = globalize.translate('DashboardServerName', systemInfo.ServerName);
|
||||
view.querySelector('#versionNumber').innerText = globalize.translate('DashboardVersionNumber', systemInfo.Version);
|
||||
view.querySelector('#buildVersion').innerText = __JF_BUILD_VERSION__;
|
||||
view.querySelector('#webVersion').innerText = WEB_VERSION;
|
||||
|
||||
if (systemInfo.CanSelfRestart) {
|
||||
view.querySelector('#btnRestartServer').classList.remove('hide');
|
||||
} else {
|
||||
view.querySelector('#btnRestartServer').classList.add('hide');
|
||||
}
|
||||
queryClient
|
||||
.fetchQuery(getSystemInfoQuery(toApi(apiClient)))
|
||||
.then(systemInfo => {
|
||||
view.querySelector('#serverName').innerText = systemInfo.ServerName;
|
||||
view.querySelector('#versionNumber').innerText = systemInfo.Version;
|
||||
|
||||
view.querySelector('#cachePath').innerText = systemInfo.CachePath;
|
||||
view.querySelector('#logPath').innerText = systemInfo.LogPath;
|
||||
view.querySelector('#transcodePath').innerText = systemInfo.TranscodingTempPath;
|
||||
view.querySelector('#metadataPath').innerText = systemInfo.InternalMetadataPath;
|
||||
view.querySelector('#webPath').innerText = systemInfo.WebPath;
|
||||
});
|
||||
view.querySelector('#cachePath').innerText = systemInfo.CachePath;
|
||||
view.querySelector('#logPath').innerText = systemInfo.LogPath;
|
||||
view.querySelector('#transcodePath').innerText = systemInfo.TranscodingTempPath;
|
||||
view.querySelector('#metadataPath').innerText = systemInfo.InternalMetadataPath;
|
||||
view.querySelector('#webPath').innerText = systemInfo.WebPath;
|
||||
});
|
||||
}
|
||||
|
||||
function renderInfo(view, sessions) {
|
||||
|
|
17
src/controllers/dashboard/dashboard.scss
Normal file
17
src/controllers/dashboard/dashboard.scss
Normal file
|
@ -0,0 +1,17 @@
|
|||
.serverInfo {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1em;
|
||||
padding: 1em;
|
||||
|
||||
> *:nth-child(odd) {
|
||||
flex: 1 0 20%;
|
||||
min-width: 7.5em;
|
||||
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
> *:nth-child(even) {
|
||||
flex: 1 0 70%;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue