mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
improve user image resolution
This commit is contained in:
parent
4ae4c4e71a
commit
1ad8c6e955
4 changed files with 26 additions and 6 deletions
20
dashboard-ui/thirdparty/apiclient/apiclient.js
vendored
20
dashboard-ui/thirdparty/apiclient/apiclient.js
vendored
|
@ -54,6 +54,25 @@
|
|||
return serverInfo;
|
||||
};
|
||||
|
||||
var currentUser;
|
||||
/**
|
||||
* Gets or sets the current user id.
|
||||
*/
|
||||
self.getCurrentUser = function () {
|
||||
|
||||
if (currentUser != null) {
|
||||
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
deferred.resolveWith(null, [currentUser]);
|
||||
return deferred.promise();
|
||||
}
|
||||
|
||||
return self.getUser(self.getCurrentUserId()).done(function (user) {
|
||||
|
||||
currentUser = user;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets or sets the current user id.
|
||||
*/
|
||||
|
@ -69,6 +88,7 @@
|
|||
self.setCurrentUserId = function (userId, token) {
|
||||
|
||||
currentUserId = userId;
|
||||
currentUser = null;
|
||||
accessToken = token;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue