mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
refactor and module resolution for appStorage
This commit is contained in:
parent
be505da8ac
commit
9ad29733bf
5 changed files with 53 additions and 85 deletions
|
@ -357,16 +357,6 @@ var AppInfo = {};
|
|||
return layoutManager;
|
||||
}
|
||||
|
||||
function getAppStorage(basePath) {
|
||||
try {
|
||||
localStorage.setItem("_test", "0");
|
||||
localStorage.removeItem("_test");
|
||||
return basePath + "/appstorage-localstorage";
|
||||
} catch (e) {
|
||||
return basePath + "/appstorage-memory";
|
||||
}
|
||||
}
|
||||
|
||||
function createWindowHeadroom(Headroom) {
|
||||
var headroom = new Headroom([], {});
|
||||
headroom.init();
|
||||
|
@ -858,7 +848,7 @@ var AppInfo = {};
|
|||
});
|
||||
|
||||
paths.apphost = "components/apphost";
|
||||
paths.appStorage = getAppStorage(apiClientBowerPath);
|
||||
define('appStorage', [apiClientBowerPath + '/appStorage'], returnFirstDependency);
|
||||
|
||||
requirejs.config({
|
||||
waitSeconds: 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue