Merge branch 'master' into migrate-to-ES6-52
This commit is contained in:
commit
5ba3a57479
89 changed files with 833 additions and 1936 deletions
|
@ -152,13 +152,13 @@ var Dashboard = {
|
|||
processPluginConfigurationUpdateResult: function () {
|
||||
require(['loading', 'toast'], function (loading, toast) {
|
||||
loading.hide();
|
||||
toast(Globalize.translate('MessageSettingsSaved'));
|
||||
toast.default(Globalize.translate('MessageSettingsSaved'));
|
||||
});
|
||||
},
|
||||
processServerConfigurationUpdateResult: function (result) {
|
||||
require(['loading', 'toast'], function (loading, toast) {
|
||||
loading.hide();
|
||||
toast(Globalize.translate('MessageSettingsSaved'));
|
||||
toast.default(Globalize.translate('MessageSettingsSaved'));
|
||||
});
|
||||
},
|
||||
processErrorResponse: function (response) {
|
||||
|
@ -180,7 +180,7 @@ var Dashboard = {
|
|||
alert: function (options) {
|
||||
if (typeof options == 'string') {
|
||||
return void require(['toast'], function (toast) {
|
||||
toast({
|
||||
toast.default({
|
||||
text: options
|
||||
});
|
||||
});
|
||||
|
@ -477,36 +477,30 @@ function initClient() {
|
|||
|
||||
function loadPlugins(appHost, browser, shell) {
|
||||
console.debug('loading installed plugins');
|
||||
var list = [
|
||||
'plugins/playAccessValidation/plugin',
|
||||
'plugins/experimentalWarnings/plugin',
|
||||
'plugins/htmlAudioPlayer/plugin',
|
||||
'plugins/htmlVideoPlayer/plugin',
|
||||
'plugins/photoPlayer/plugin',
|
||||
'plugins/bookPlayer/plugin',
|
||||
'plugins/youtubePlayer/plugin',
|
||||
'plugins/backdropScreensaver/plugin',
|
||||
'plugins/logoScreensaver/plugin'
|
||||
];
|
||||
|
||||
if (appHost.supports('remotecontrol')) {
|
||||
list.push('plugins/sessionPlayer/plugin');
|
||||
|
||||
if (browser.chrome || browser.edgeChromium || browser.opera) {
|
||||
list.push('plugins/chromecastPlayer/plugin');
|
||||
}
|
||||
}
|
||||
|
||||
if (window.NativeShell) {
|
||||
list = list.concat(window.NativeShell.getPlugins());
|
||||
}
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
Promise.all(list.map(loadPlugin)).then(function () {
|
||||
require(['packageManager'], function (packageManager) {
|
||||
packageManager.init().then(resolve, reject);
|
||||
require(['webSettings'], function (webSettings) {
|
||||
webSettings.getPlugins().then(function (list) {
|
||||
// these two plugins are dependent on features
|
||||
if (!appHost.supports('remotecontrol')) {
|
||||
list.splice(list.indexOf('sessionPlayer'), 1);
|
||||
|
||||
if (!browser.chrome && !browser.opera) {
|
||||
list.splice(list.indexOf('chromecastPlayer', 1));
|
||||
}
|
||||
}
|
||||
|
||||
// add any native plugins
|
||||
if (window.NativeShell) {
|
||||
list = list.concat(window.NativeShell.getPlugins());
|
||||
}
|
||||
|
||||
Promise.all(list.map(loadPlugin)).then(function () {
|
||||
require(['packageManager'], function (packageManager) {
|
||||
packageManager.init().then(resolve, reject);
|
||||
});
|
||||
}, reject);
|
||||
});
|
||||
}, reject);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -532,7 +526,7 @@ function initClient() {
|
|||
|
||||
window.Emby.Page = appRouter;
|
||||
|
||||
require(['emby-button', 'scripts/themeLoader', 'libraryMenu', 'scripts/routes'], function () {
|
||||
require(['emby-button', 'scripts/autoThemes', 'libraryMenu', 'scripts/routes'], function () {
|
||||
Emby.Page.start({
|
||||
click: false,
|
||||
hashbang: true
|
||||
|
@ -653,8 +647,7 @@ function initClient() {
|
|||
nowPlayingHelper: componentsPath + '/playback/nowplayinghelper',
|
||||
pluginManager: componentsPath + '/pluginManager',
|
||||
packageManager: componentsPath + '/packageManager',
|
||||
screensaverManager: componentsPath + '/screensavermanager',
|
||||
chromecastHelper: 'plugins/chromecastPlayer/chromecastHelpers'
|
||||
screensaverManager: componentsPath + '/screensavermanager'
|
||||
};
|
||||
|
||||
requirejs.onError = onRequireJsError;
|
||||
|
@ -848,7 +841,7 @@ function initClient() {
|
|||
define('viewContainer', [componentsPath + '/viewContainer'], returnFirstDependency);
|
||||
define('dialogHelper', [componentsPath + '/dialogHelper/dialogHelper'], returnFirstDependency);
|
||||
define('serverNotifications', [scriptsPath + '/serverNotifications'], returnFirstDependency);
|
||||
define('skinManager', [componentsPath + '/skinManager'], returnFirstDependency);
|
||||
define('skinManager', [scriptsPath + '/themeManager'], returnFirstDependency);
|
||||
define('keyboardnavigation', [scriptsPath + '/keyboardNavigation'], returnFirstDependency);
|
||||
define('mouseManager', [scriptsPath + '/mouseManager'], returnFirstDependency);
|
||||
define('scrollManager', [componentsPath + '/scrollManager'], returnFirstDependency);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue