mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
start a dashboard folder
This commit is contained in:
parent
bcd2bd0f52
commit
c043164de5
26 changed files with 182 additions and 95 deletions
|
@ -692,7 +692,7 @@ var Dashboard = {
|
|||
// The native app can handle a little bit more than safari
|
||||
if (AppInfo.isNativeApp) {
|
||||
|
||||
quality -= 5;
|
||||
quality -= 10;
|
||||
} else {
|
||||
quality -= 20;
|
||||
}
|
||||
|
@ -1127,10 +1127,6 @@ var AppInfo = {};
|
|||
elem.classList.add('supporterMembershipDisabled');
|
||||
}
|
||||
|
||||
if (AppInfo.isNativeApp) {
|
||||
elem.classList.add('nativeApp');
|
||||
}
|
||||
|
||||
if (!AppInfo.enableHomeFavorites) {
|
||||
elem.classList.add('homeFavoritesDisabled');
|
||||
}
|
||||
|
@ -1255,15 +1251,6 @@ var AppInfo = {};
|
|||
webAnimations: bowerPath + '/web-animations-js/web-animations-next-lite.min'
|
||||
};
|
||||
|
||||
if (navigator.webkitPersistentStorage) {
|
||||
paths.imageFetcher = embyWebComponentsBowerPath + "/images/persistentimagefetcher";
|
||||
paths.imageFetcher = embyWebComponentsBowerPath + "/images/basicimagefetcher";
|
||||
} else if (Dashboard.isRunningInCordova()) {
|
||||
paths.imageFetcher = 'cordova/imagestore';
|
||||
} else {
|
||||
paths.imageFetcher = embyWebComponentsBowerPath + "/images/basicimagefetcher";
|
||||
}
|
||||
|
||||
paths.hlsjs = bowerPath + "/hls.js/dist/hls.min";
|
||||
|
||||
if ((window.chrome && window.chrome.sockets) || Dashboard.isRunningInCordova()) {
|
||||
|
@ -1690,6 +1677,12 @@ var AppInfo = {};
|
|||
|
||||
var embyWebComponentsBowerPath = bowerPath + '/emby-webcomponents';
|
||||
|
||||
if (Dashboard.isRunningInCordova() && browser.safari) {
|
||||
define("imageFetcher", ['cordova/ios/imagestore'], returnFirstDependency);
|
||||
} else {
|
||||
define("imageFetcher", [embyWebComponentsBowerPath + "/images/basicimagefetcher"], returnFirstDependency);
|
||||
}
|
||||
|
||||
var preferNativeAlerts = browser.mobile || browser.tv || browser.xboxOne;
|
||||
// use native alerts if preferred and supported (not supported in opera tv)
|
||||
if (preferNativeAlerts && window.alert) {
|
||||
|
@ -1737,9 +1730,9 @@ var AppInfo = {};
|
|||
if (Dashboard.isRunningInCordova() && browserInfo.android) {
|
||||
|
||||
if (MainActivity.getChromeVersion() >= 48) {
|
||||
define("audiorenderer", ["scripts/htmlmediarenderer"]);
|
||||
//window.VlcAudio = true;
|
||||
//define("audiorenderer", ["cordova/android/vlcplayer"]);
|
||||
//define("audiorenderer", ["scripts/htmlmediarenderer"]);
|
||||
window.VlcAudio = true;
|
||||
define("audiorenderer", ["cordova/android/vlcplayer"]);
|
||||
} else {
|
||||
window.VlcAudio = true;
|
||||
define("audiorenderer", ["cordova/android/vlcplayer"]);
|
||||
|
@ -1892,7 +1885,7 @@ var AppInfo = {};
|
|||
path: '/about.html',
|
||||
dependencies: [],
|
||||
autoFocus: false,
|
||||
controller: 'scripts/aboutpage',
|
||||
controller: 'dashboard/aboutpage',
|
||||
roles: 'admin'
|
||||
});
|
||||
|
||||
|
@ -1913,14 +1906,14 @@ var AppInfo = {};
|
|||
defineRoute({
|
||||
path: '/autoorganizelog.html',
|
||||
dependencies: ['scripts/taskbutton', 'autoorganizetablecss'],
|
||||
controller: 'scripts/autoorganizelog',
|
||||
controller: 'dashboard/autoorganizelog',
|
||||
roles: 'admin'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
path: '/autoorganizesmart.html',
|
||||
dependencies: ['emby-button'],
|
||||
controller: 'scripts/autoorganizesmart',
|
||||
controller: 'dashboard/autoorganizesmart',
|
||||
autoFocus: false,
|
||||
roles: 'admin'
|
||||
});
|
||||
|
@ -1928,7 +1921,7 @@ var AppInfo = {};
|
|||
defineRoute({
|
||||
path: '/autoorganizetv.html',
|
||||
dependencies: ['emby-checkbox', 'emby-input', 'emby-button', 'emby-select', 'emby-collapse'],
|
||||
controller: 'scripts/autoorganizetv',
|
||||
controller: 'dashboard/autoorganizetv',
|
||||
autoFocus: false,
|
||||
roles: 'admin'
|
||||
});
|
||||
|
@ -1980,7 +1973,7 @@ var AppInfo = {};
|
|||
defineRoute({
|
||||
path: '/dashboardgeneral.html',
|
||||
dependencies: ['emby-collapse', 'emby-textarea', 'emby-input', 'paper-checkbox'],
|
||||
controller: 'scripts/dashboardgeneral',
|
||||
controller: 'dashboard/dashboardgeneral',
|
||||
autoFocus: false,
|
||||
roles: 'admin'
|
||||
});
|
||||
|
@ -1990,7 +1983,7 @@ var AppInfo = {};
|
|||
dependencies: ['paper-checkbox', 'emby-input', 'emby-button'],
|
||||
autoFocus: false,
|
||||
roles: 'admin',
|
||||
controller: 'scripts/dashboardhosting'
|
||||
controller: 'dashboard/dashboardhosting'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
@ -2156,7 +2149,7 @@ var AppInfo = {};
|
|||
dependencies: ['emby-button', 'paper-checkbox'],
|
||||
autoFocus: false,
|
||||
roles: 'admin',
|
||||
controller: 'scripts/librarydisplay'
|
||||
controller: 'dashboard/librarydisplay'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
@ -2171,7 +2164,7 @@ var AppInfo = {};
|
|||
dependencies: ['emby-collapse', 'emby-input', 'paper-checkbox', 'emby-button', 'emby-select'],
|
||||
autoFocus: false,
|
||||
roles: 'admin',
|
||||
controller: 'scripts/librarysettings'
|
||||
controller: 'dashboard/librarysettings'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
@ -2240,14 +2233,14 @@ var AppInfo = {};
|
|||
dependencies: ['emby-input', 'paper-checkbox'],
|
||||
autoFocus: false,
|
||||
roles: 'admin',
|
||||
controller: 'scripts/livetvtunerprovider-satip'
|
||||
controller: 'dashboard/livetvtunerprovider-satip'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
path: '/log.html',
|
||||
dependencies: ['emby-checkbox'],
|
||||
roles: 'admin',
|
||||
controller: 'scripts/logpage'
|
||||
controller: 'dashboard/logpage'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
@ -2356,6 +2349,14 @@ var AppInfo = {};
|
|||
controller: 'scripts/mysync'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
path: '/camerauploadsettings.html',
|
||||
dependencies: [],
|
||||
autoFocus: false,
|
||||
transition: 'fade',
|
||||
controller: 'scripts/camerauploadsettings'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
path: '/mysyncjob.html',
|
||||
dependencies: [],
|
||||
|
@ -2596,7 +2597,7 @@ var AppInfo = {};
|
|||
dependencies: ['dashboardcss', 'emby-button', 'emby-input', 'emby-select'],
|
||||
autoFocus: false,
|
||||
anonymous: true,
|
||||
controller: 'scripts/wizardcomponents'
|
||||
controller: 'dashboard/wizardcomponents'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
@ -2604,7 +2605,7 @@ var AppInfo = {};
|
|||
dependencies: ['emby-button', 'dashboardcss'],
|
||||
autoFocus: false,
|
||||
anonymous: true,
|
||||
controller: 'scripts/wizardfinishpage'
|
||||
controller: 'dashboard/wizardfinishpage'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
@ -2707,7 +2708,6 @@ var AppInfo = {};
|
|||
|
||||
if (browserInfo.android) {
|
||||
deps.push('cordova/android/androidcredentials');
|
||||
deps.push('cordova/android/links');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2781,14 +2781,8 @@ var AppInfo = {};
|
|||
postInitDependencies.push('bower_components/emby-webcomponents/input/api');
|
||||
|
||||
if (!browserInfo.tv) {
|
||||
if (navigator.serviceWorker) {
|
||||
try {
|
||||
navigator.serviceWorker.register('serviceworker.js');
|
||||
} catch (err) {
|
||||
console.log('Error registering serviceWorker: ' + err);
|
||||
}
|
||||
}
|
||||
|
||||
registerServiceWorker();
|
||||
if (window.Notification) {
|
||||
postInitDependencies.push('bower_components/emby-webcomponents/notifications/notifications');
|
||||
}
|
||||
|
@ -2800,6 +2794,24 @@ var AppInfo = {};
|
|||
});
|
||||
}
|
||||
|
||||
function registerServiceWorker() {
|
||||
|
||||
if (navigator.serviceWorker) {
|
||||
try {
|
||||
navigator.serviceWorker.register('serviceworker.js').then(function () {
|
||||
return navigator.serviceWorker.ready;
|
||||
}).then(function (reg) {
|
||||
|
||||
// https://github.com/WICG/BackgroundSync/blob/master/explainer.md
|
||||
return reg.sync.register('emby-sync');
|
||||
});
|
||||
|
||||
} catch (err) {
|
||||
console.log('Error registering serviceWorker: ' + err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function upgradeLayouts() {
|
||||
if (!AppInfo.enableAppLayouts) {
|
||||
Dashboard.getPluginSecurityInfo().then(function (info) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue