Remove connectuser
This commit is contained in:
parent
d20b1fed68
commit
0b13b0328a
1 changed files with 1 additions and 40 deletions
|
@ -34,7 +34,6 @@ define(["events", "apiclient", "appStorage"], function (events, apiClientFactory
|
||||||
function resolveFailure(instance, resolve) {
|
function resolveFailure(instance, resolve) {
|
||||||
resolve({
|
resolve({
|
||||||
State: "Unavailable",
|
State: "Unavailable",
|
||||||
ConnectUser: instance.connectUser()
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,12 +252,6 @@ define(["events", "apiclient", "appStorage"], function (events, apiClientFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
function getImageUrl(localUser) {
|
function getImageUrl(localUser) {
|
||||||
if (connectUser && connectUser.ImageUrl) {
|
|
||||||
return {
|
|
||||||
url: connectUser.ImageUrl
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (localUser && localUser.PrimaryImageTag) {
|
if (localUser && localUser.PrimaryImageTag) {
|
||||||
return {
|
return {
|
||||||
url: self.getApiClient(localUser).getUserImageUrl(localUser.Id, {
|
url: self.getApiClient(localUser).getUserImageUrl(localUser.Id, {
|
||||||
|
@ -460,12 +453,6 @@ define(["events", "apiclient", "appStorage"], function (events, apiClientFactory
|
||||||
console.log("Begin ConnectionManager constructor");
|
console.log("Begin ConnectionManager constructor");
|
||||||
var self = this;
|
var self = this;
|
||||||
this._apiClients = [];
|
this._apiClients = [];
|
||||||
var connectUser;
|
|
||||||
|
|
||||||
self.connectUser = function () {
|
|
||||||
return connectUser;
|
|
||||||
};
|
|
||||||
|
|
||||||
self._minServerVersion = "3.2.33";
|
self._minServerVersion = "3.2.33";
|
||||||
|
|
||||||
self.appVersion = function () {
|
self.appVersion = function () {
|
||||||
|
@ -488,14 +475,6 @@ define(["events", "apiclient", "appStorage"], function (events, apiClientFactory
|
||||||
return credentialProvider;
|
return credentialProvider;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.connectUserId = function () {
|
|
||||||
return credentialProvider.credentials().ConnectUserId;
|
|
||||||
};
|
|
||||||
|
|
||||||
self.connectToken = function () {
|
|
||||||
return credentialProvider.credentials().ConnectAccessToken;
|
|
||||||
};
|
|
||||||
|
|
||||||
self.getServerInfo = function (id) {
|
self.getServerInfo = function (id) {
|
||||||
return credentialProvider.credentials().Servers.filter(function (s) {
|
return credentialProvider.credentials().Servers.filter(function (s) {
|
||||||
return s.Id === id;
|
return s.Id === id;
|
||||||
|
@ -590,10 +569,9 @@ define(["events", "apiclient", "appStorage"], function (events, apiClientFactory
|
||||||
var image = getImageUrl(localUser);
|
var image = getImageUrl(localUser);
|
||||||
resolve({
|
resolve({
|
||||||
localUser: localUser,
|
localUser: localUser,
|
||||||
name: connectUser ? connectUser.Name : localUser ? localUser.Name : null,
|
name: localUser ? localUser.Name : null,
|
||||||
imageUrl: image.url,
|
imageUrl: image.url,
|
||||||
supportsImageParams: image.supportsParams,
|
supportsImageParams: image.supportsParams,
|
||||||
connectUser: connectUser
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -641,16 +619,6 @@ define(["events", "apiclient", "appStorage"], function (events, apiClientFactory
|
||||||
server.AccessToken = null;
|
server.AccessToken = null;
|
||||||
server.ExchangeToken = null;
|
server.ExchangeToken = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
credentials.Servers = servers;
|
|
||||||
credentials.ConnectAccessToken = null;
|
|
||||||
credentials.ConnectUserId = null;
|
|
||||||
credentialProvider.credentials(credentials);
|
|
||||||
|
|
||||||
if (connectUser) {
|
|
||||||
connectUser = null;
|
|
||||||
events.trigger(self, "connectusersignedout");
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -692,12 +660,6 @@ define(["events", "apiclient", "appStorage"], function (events, apiClientFactory
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.resolve({
|
|
||||||
Servers: servers,
|
|
||||||
State: servers.length || self.connectUser() ? "ServerSelection" : "ConnectSignIn",
|
|
||||||
ConnectUser: self.connectUser()
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.connectToServer = function (server, options) {
|
self.connectToServer = function (server, options) {
|
||||||
|
@ -734,7 +696,6 @@ define(["events", "apiclient", "appStorage"], function (events, apiClientFactory
|
||||||
console.log("connectToAddress " + address + " failed");
|
console.log("connectToAddress " + address + " failed");
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
State: "Unavailable",
|
State: "Unavailable",
|
||||||
ConnectUser: instance.connectUser()
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue