mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
rework loading of appstorage
This commit is contained in:
parent
d0afade8ed
commit
3a7ed6f85f
13 changed files with 214 additions and 211 deletions
|
@ -1,4 +1,4 @@
|
|||
define(['paperdialoghelper', 'paper-fab', 'paper-item-body', 'paper-icon-item'], function (paperDialogHelper) {
|
||||
define(['paperdialoghelper', 'appStorage', 'paper-fab', 'paper-item-body', 'paper-icon-item'], function (paperDialogHelper, appStorage) {
|
||||
|
||||
var currentItem;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['browser'], function (browser) {
|
||||
define(['browser', 'appStorage'], function (browser, appStorage) {
|
||||
|
||||
require(['css!devices/ie/ie.css']);
|
||||
var browserSwitchKey = "ieswitchbrowser";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(function ($, document) {
|
||||
define(['appStorage'], function (appStorage) {
|
||||
|
||||
var pageBackgroundCreated;
|
||||
|
||||
|
@ -246,4 +246,4 @@
|
|||
clear: clearBackdrop
|
||||
};
|
||||
|
||||
})(jQuery, document);
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
define(['playlistManager', 'appSettings'], function (playlistManager, appSettings) {
|
||||
define(['playlistManager', 'appSettings', 'appStorage'], function (playlistManager, appSettings, appStorage) {
|
||||
|
||||
var libraryBrowser = (function (window, document, screen) {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['appSettings'], function (appSettings) {
|
||||
define(['appSettings', 'appStorage'], function (appSettings, appStorage) {
|
||||
|
||||
var showOverlayTimeout;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(function (window) {
|
||||
define(['appStorage'], function (appStorage) {
|
||||
|
||||
var currentDisplayInfo;
|
||||
function mirrorItem(info) {
|
||||
|
@ -1061,4 +1061,4 @@
|
|||
mirrorIfEnabled(info);
|
||||
});
|
||||
|
||||
})(this);
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
define(['appSettings', 'userSettings'], function (appSettings, userSettings) {
|
||||
define(['appSettings', 'userSettings', 'appStorage'], function (appSettings, userSettings, appStorage) {
|
||||
|
||||
function mediaPlayer() {
|
||||
|
||||
|
@ -1729,7 +1729,7 @@ define(['appSettings', 'userSettings'], function (appSettings, userSettings) {
|
|||
|
||||
window.MediaPlayer = new mediaPlayer();
|
||||
|
||||
window.MediaPlayer.init = function() {
|
||||
window.MediaPlayer.init = function () {
|
||||
window.MediaController.registerPlayer(window.MediaPlayer);
|
||||
window.MediaController.setActivePlayer(window.MediaPlayer, window.MediaPlayer.getTargetsInternal()[0]);
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['userSettings'], function (userSettings) {
|
||||
define(['userSettings', 'appStorage'], function (userSettings, appStorage) {
|
||||
|
||||
function loadForm(page, user) {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(function ($, document) {
|
||||
define(['appStorage'], function (appStorage) {
|
||||
|
||||
var data = {};
|
||||
function getPageData() {
|
||||
|
@ -197,4 +197,4 @@
|
|||
}
|
||||
};
|
||||
|
||||
})(jQuery, document);
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
(function () {
|
||||
define(['appStorage'], function (appStorage) {
|
||||
|
||||
var supporterPlaybackKey = 'lastSupporterPlaybackMessage4';
|
||||
|
||||
|
@ -297,4 +297,4 @@
|
|||
}
|
||||
};
|
||||
|
||||
})();
|
||||
});
|
|
@ -2332,6 +2332,7 @@ var AppInfo = {};
|
|||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
require(['appStorage'], function (appStorage) {
|
||||
var deviceName;
|
||||
|
||||
if (browserInfo.chrome) {
|
||||
|
@ -2385,6 +2386,7 @@ var AppInfo = {};
|
|||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getHostingAppInfo() {
|
||||
|
@ -2403,18 +2405,16 @@ var AppInfo = {};
|
|||
var initialDependencies = [];
|
||||
|
||||
initialDependencies.push('browser');
|
||||
initialDependencies.push('appStorage');
|
||||
|
||||
if (!window.Promise) {
|
||||
initialDependencies.push('native-promise-only');
|
||||
}
|
||||
|
||||
require(initialDependencies, function (browser, appStorage) {
|
||||
require(initialDependencies, function (browser) {
|
||||
|
||||
initRequireWithBrowser(browser);
|
||||
|
||||
window.browserInfo = browser;
|
||||
window.appStorage = appStorage;
|
||||
|
||||
setAppInfo();
|
||||
setDocumentClasses();
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
$.fn.taskButton = function (options) {
|
||||
define(['appStorage'], function (appStorage) {
|
||||
|
||||
$.fn.taskButton = function (options) {
|
||||
|
||||
function pollTasks(button) {
|
||||
|
||||
|
@ -172,4 +174,5 @@
|
|||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
};
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
(function (document) {
|
||||
define(['appStorage'], function (appStorage) {
|
||||
|
||||
var currentOwnerId;
|
||||
var currentThemeIds = [];
|
||||
|
@ -73,4 +73,4 @@
|
|||
}
|
||||
});
|
||||
|
||||
})(document);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue