1
0
Fork 0
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:
Luke Pulverenti 2013-06-01 23:17:10 -04:00
parent 040643b20d
commit 3875ea65c4
2 changed files with 26 additions and 1 deletions

View file

@ -15,7 +15,6 @@
<p>
Version <span id="appVersionNumber"></span>
</p>
<p id="ports"></p>
<p id="pUpToDate" style="display: none;">
<img src="css/images/checkmarkgreen.png" style="height: 20px; margin-right: 3px; position: relative; top: 4px;" />
Media Browser Server is up to date
@ -25,6 +24,9 @@
<p id="newVersionNumber"></p>
<button id="btnUpdateApplication" type="button" data-icon="download" data-theme="b" onclick="DashboardPage.updateApplication();">Update Now</button>
</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>
</div>

View file

@ -273,6 +273,21 @@
$('#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) {
Dashboard.updateSystemInfo(dashboardInfo.SystemInfo);
@ -289,6 +304,14 @@
$('#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) {
return task.Id == dashboardInfo.ApplicationUpdateTaskId;