mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
Display client version in the dashboard
This commit is contained in:
parent
04142091d9
commit
1200f8284d
@ -10,8 +10,9 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
|
|||||||
* @param {String} serverHostName
|
* @param {String} serverHostName
|
||||||
* @param {String} serverPortNumber
|
* @param {String} serverPortNumber
|
||||||
* @param {String} clientName
|
* @param {String} clientName
|
||||||
|
* @param {String} applicationVersion
|
||||||
*/
|
*/
|
||||||
return function (serverProtocol, serverHostName, serverPortNumber, clientName) {
|
return function (serverProtocol, serverHostName, serverPortNumber, clientName, applicationVersion) {
|
||||||
|
|
||||||
if (!serverProtocol) {
|
if (!serverProtocol) {
|
||||||
throw new Error("Must supply a serverProtocol, e.g. http:");
|
throw new Error("Must supply a serverProtocol, e.g. http:");
|
||||||
@ -120,7 +121,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
|
|||||||
|
|
||||||
if (clientName) {
|
if (clientName) {
|
||||||
|
|
||||||
var auth = 'MediaBrowser Client="' + clientName + '", Device="' + deviceName + '", DeviceId="' + deviceId + '"';
|
var auth = 'MediaBrowser Client="' + clientName + '", Device="' + deviceName + '", DeviceId="' + deviceId + '", Version="' + applicationVersion + '"';
|
||||||
|
|
||||||
if (currentUserId) {
|
if (currentUserId) {
|
||||||
auth += ', UserId="' + currentUserId + '"';
|
auth += ', UserId="' + currentUserId + '"';
|
||||||
@ -3277,11 +3278,11 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
|
|||||||
/**
|
/**
|
||||||
* Provides a friendly way to create an api client instance using information from the browser's current url
|
* Provides a friendly way to create an api client instance using information from the browser's current url
|
||||||
*/
|
*/
|
||||||
MediaBrowser.ApiClient.create = function (clientName) {
|
MediaBrowser.ApiClient.create = function (clientName, applicationVersion) {
|
||||||
|
|
||||||
var loc = window.location;
|
var loc = window.location;
|
||||||
|
|
||||||
return new MediaBrowser.ApiClient(loc.protocol, loc.hostname, loc.port, clientName);
|
return new MediaBrowser.ApiClient(loc.protocol, loc.hostname, loc.port, clientName, applicationVersion);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -94,7 +94,9 @@
|
|||||||
html += '</td>';
|
html += '</td>';
|
||||||
|
|
||||||
html += '<td>';
|
html += '<td>';
|
||||||
html += connection.DeviceName;
|
html += '<div>' + connection.Client + '</div>';
|
||||||
|
html += '<div>' + connection.ApplicationVersion + '</div>';
|
||||||
|
html += '<div>' + connection.DeviceName + '</div>';
|
||||||
html += '</td>';
|
html += '</td>';
|
||||||
|
|
||||||
html += '<td>';
|
html += '<td>';
|
||||||
|
@ -1048,7 +1048,7 @@ var Dashboard = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var ApiClient = MediaBrowser.ApiClient.create("Dashboard");
|
var ApiClient = MediaBrowser.ApiClient.create("Dashboard", window.dashboardVersion);
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.139" targetFramework="net45" />
|
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.141" targetFramework="net45" />
|
||||||
<package id="ServiceStack.Common" version="3.9.54" targetFramework="net45" />
|
<package id="ServiceStack.Common" version="3.9.54" targetFramework="net45" />
|
||||||
<package id="ServiceStack.Text" version="3.9.54" targetFramework="net45" />
|
<package id="ServiceStack.Text" version="3.9.54" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
Loading…
Reference in New Issue
Block a user