mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
display program data path and bookmark in the dashboard
This commit is contained in:
parent
040643b20d
commit
3875ea65c4
2 changed files with 26 additions and 1 deletions
|
@ -15,7 +15,6 @@
|
||||||
<p>
|
<p>
|
||||||
Version <span id="appVersionNumber"></span>
|
Version <span id="appVersionNumber"></span>
|
||||||
</p>
|
</p>
|
||||||
<p id="ports"></p>
|
|
||||||
<p id="pUpToDate" style="display: none;">
|
<p id="pUpToDate" style="display: none;">
|
||||||
<img src="css/images/checkmarkgreen.png" style="height: 20px; margin-right: 3px; position: relative; top: 4px;" />
|
<img src="css/images/checkmarkgreen.png" style="height: 20px; margin-right: 3px; position: relative; top: 4px;" />
|
||||||
Media Browser Server is up to date
|
Media Browser Server is up to date
|
||||||
|
@ -25,6 +24,9 @@
|
||||||
<p id="newVersionNumber"></p>
|
<p id="newVersionNumber"></p>
|
||||||
<button id="btnUpdateApplication" type="button" data-icon="download" data-theme="b" onclick="DashboardPage.updateApplication();">Update Now</button>
|
<button id="btnUpdateApplication" type="button" data-icon="download" data-theme="b" onclick="DashboardPage.updateApplication();">Update Now</button>
|
||||||
</div>
|
</div>
|
||||||
|
<p id="ports"></p>
|
||||||
|
<p>Program data path: <span id="programDataPath"></span></p>
|
||||||
|
<p>Bookmark url: <a id="bookmarkUrl" href="#" data-ajax="false" onclick="return !DashboardPage.bookmarkPageIfSupported(this.href);"></a></p>
|
||||||
<div id="pPluginUpdates"></div>
|
<div id="pPluginUpdates"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -273,6 +273,21 @@
|
||||||
$('#divRunningTasks', page).html(html).trigger('create');
|
$('#divRunningTasks', page).html(html).trigger('create');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
bookmarkPageIfSupported: function (url) {
|
||||||
|
|
||||||
|
if (window.sidebar && window.sidebar.addPanel) { // Mozilla Firefox Bookmark
|
||||||
|
window.sidebar.addPanel("Media Browser", url, '');
|
||||||
|
|
||||||
|
} else if (window.external && window.external.AddFavorite) { // IE Favorite
|
||||||
|
window.external.AddFavorite(url, "Media Browser");
|
||||||
|
|
||||||
|
} else { // webkit - safari/chrome
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
renderSystemInfo: function (dashboardInfo) {
|
renderSystemInfo: function (dashboardInfo) {
|
||||||
|
|
||||||
Dashboard.updateSystemInfo(dashboardInfo.SystemInfo);
|
Dashboard.updateSystemInfo(dashboardInfo.SystemInfo);
|
||||||
|
@ -289,6 +304,14 @@
|
||||||
$('#ports', page).html('Running on ports <b>' + port + '</b> and <b>' + dashboardInfo.SystemInfo.WebSocketPortNumber + '</b>');
|
$('#ports', page).html('Running on ports <b>' + port + '</b> and <b>' + dashboardInfo.SystemInfo.WebSocketPortNumber + '</b>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('#programDataPath', page).html(dashboardInfo.SystemInfo.ProgramDataPath);
|
||||||
|
|
||||||
|
var host = ApiClient.serverHostName();
|
||||||
|
|
||||||
|
var url = "http://" + host + ":" + port + "/mediabrowser";
|
||||||
|
|
||||||
|
$('#bookmarkUrl', page).html(url).attr("href", url);
|
||||||
|
|
||||||
if (dashboardInfo.RunningTasks.filter(function (task) {
|
if (dashboardInfo.RunningTasks.filter(function (task) {
|
||||||
|
|
||||||
return task.Id == dashboardInfo.ApplicationUpdateTaskId;
|
return task.Id == dashboardInfo.ApplicationUpdateTaskId;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue