mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
restored request logging
This commit is contained in:
parent
3de46dfe40
commit
572607892a
2 changed files with 31 additions and 9 deletions
|
@ -81,12 +81,14 @@ var Dashboard = {
|
|||
|
||||
setCurrentUser: function (userId) {
|
||||
localStorage.setItem("userId", userId);
|
||||
ApiClient.currentUserId = userId;
|
||||
Dashboard.getUserPromise = null;
|
||||
},
|
||||
|
||||
logout: function () {
|
||||
localStorage.removeItem("userId");
|
||||
Dashboard.getUserPromise = null;
|
||||
ApiClient.currentUserId = null;
|
||||
window.location = "login.html";
|
||||
},
|
||||
|
||||
|
@ -1113,6 +1115,13 @@ var Dashboard = {
|
|||
tag: item.PrimaryImageTag,
|
||||
type: "Primary"
|
||||
});
|
||||
|
||||
if (!item.Id || data.icon.indexOf("undefined") != -1) {
|
||||
alert("bad image url: " + JSON.stringify(item));
|
||||
console.log("bad image url: " + JSON.stringify(item));
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
WebNotifications.show(data);
|
||||
|
@ -1200,9 +1209,11 @@ $(document).on('pagebeforeshow', ".page", function () {
|
|||
}).on('pageinit', ".page", function () {
|
||||
|
||||
var page = $(this);
|
||||
var hasLogin = Dashboard.getCurrentUserId();
|
||||
|
||||
var userId = Dashboard.getCurrentUserId();
|
||||
ApiClient.currentUserId = userId;
|
||||
|
||||
if (!hasLogin) {
|
||||
if (!userId) {
|
||||
|
||||
if (this.id !== "loginPage" && !page.hasClass('wizardPage')) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue