update to latest js api client

pull/702/head
LukePulverenti 12 years ago
parent 3de31da5c3
commit db20e9e3ea

File diff suppressed because it is too large Load Diff

@ -114,31 +114,37 @@
getClientType: function (connection) { getClientType: function (connection) {
if (connection.Client.toLowerCase() == "dashboard") { var clientLowered = connection.Client.toLowerCase();
if (clientLowered == "dashboard") {
return "<img src='css/images/clients/html5.png' alt='Dashboard' title='Dashboard' />"; return "<img src='css/images/clients/html5.png' alt='Dashboard' title='Dashboard' />";
} }
if (connection.Client.toLowerCase() == "mediabrowsertheater") { if (clientLowered == "media browser classic") {
return "<img src='css/images/clients/mb.png' alt='Media Browser Classic' title='Media Browser Classic' />";
}
if (clientLowered == "media browser theater") {
return "<img src='css/images/clients/mb.png' alt='Media Browser Theater' title='Media Browser Theater' />"; return "<img src='css/images/clients/mb.png' alt='Media Browser Theater' title='Media Browser Theater' />";
} }
if (connection.Client.toLowerCase() == "android") { if (clientLowered == "android") {
return "<img src='css/images/clients/android.png' alt='Android' title='Android' />"; return "<img src='css/images/clients/android.png' alt='Android' title='Android' />";
} }
if (connection.Client.toLowerCase() == "ios") { if (clientLowered == "ios") {
return "<img src='css/images/clients/ios.png' alt='iOS' title='iOS' />"; return "<img src='css/images/clients/ios.png' alt='iOS' title='iOS' />";
} }
if (connection.Client.toLowerCase() == "windowsrt") { if (clientLowered == "windows rt") {
return "<img src='css/images/clients/windowsrt.png' alt='Windows RT' title='Windows RT' />"; return "<img src='css/images/clients/windowsrt.png' alt='Windows RT' title='Windows RT' />";
} }
if (connection.Client.toLowerCase() == "windowsphone") { if (clientLowered == "windows phone") {
return "<img src='css/images/clients/windowsphone.png' alt='Windows Phone' title='Windows Phone' />"; return "<img src='css/images/clients/windowsphone.png' alt='Windows Phone' title='Windows Phone' />";
} }
if (connection.Client.toLowerCase() == "dlna") { if (clientLowered == "dlna") {
return "<img src='css/images/clients/dlna.png' alt='Dlna' title='Dlna' />"; return "<img src='css/images/clients/dlna.png' alt='Dlna' title='Dlna' />";
} }

@ -81,14 +81,14 @@ var Dashboard = {
setCurrentUser: function (userId) { setCurrentUser: function (userId) {
localStorage.setItem("userId", userId); localStorage.setItem("userId", userId);
ApiClient.currentUserId = userId; ApiClient.currentUserId(userId);
Dashboard.getUserPromise = null; Dashboard.getUserPromise = null;
}, },
logout: function () { logout: function () {
localStorage.removeItem("userId"); localStorage.removeItem("userId");
Dashboard.getUserPromise = null; Dashboard.getUserPromise = null;
ApiClient.currentUserId = null; ApiClient.currentUserId(null);
window.location = "login.html"; window.location = "login.html";
}, },
@ -857,7 +857,7 @@ var Dashboard = {
systemInfo = systemInfo || Dashboard.lastSystemInfo; systemInfo = systemInfo || Dashboard.lastSystemInfo;
var url = "ws://" + ApiClient.serverHostName + ":" + systemInfo.WebSocketPortNumber + "/mediabrowser"; var url = "ws://" + ApiClient.serverHostName() + ":" + systemInfo.WebSocketPortNumber + "/mediabrowser";
var ws = new WebSocket(url); var ws = new WebSocket(url);
@ -1171,6 +1171,8 @@ var Dashboard = {
}; };
var ApiClient = MediaBrowser.ApiClient.create("Dashboard");
$(function () { $(function () {
var footerHtml = '<div id="footer" class="ui-bar-a">'; var footerHtml = '<div id="footer" class="ui-bar-a">';
@ -1211,7 +1213,7 @@ $(document).on('pagebeforeshow', ".page", function () {
var page = $(this); var page = $(this);
var userId = Dashboard.getCurrentUserId(); var userId = Dashboard.getCurrentUserId();
ApiClient.currentUserId = userId; ApiClient.currentUserId(userId);
if (!userId) { if (!userId) {

@ -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.48" targetFramework="net45" /> <package id="MediaBrowser.ApiClient.Javascript" version="3.0.49" targetFramework="net45" />
<package id="ServiceStack" version="3.9.40" targetFramework="net45" /> <package id="ServiceStack" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.40" targetFramework="net45" /> <package id="ServiceStack.Common" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.OrmLite.SqlServer" version="3.9.41" targetFramework="net45" /> <package id="ServiceStack.OrmLite.SqlServer" version="3.9.41" targetFramework="net45" />

Loading…
Cancel
Save