mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Migration of general and library details to ES6 Modules
This commit is contained in:
parent
3186955376
commit
613f0024bc
3 changed files with 29 additions and 11 deletions
|
@ -131,6 +131,8 @@
|
||||||
"src/components/syncPlay/timeSyncManager.js",
|
"src/components/syncPlay/timeSyncManager.js",
|
||||||
"src/controllers/dashboard/logs.js",
|
"src/controllers/dashboard/logs.js",
|
||||||
"src/controllers/user/subtitles.js",
|
"src/controllers/user/subtitles.js",
|
||||||
|
"src/controllers/dashboard/general.js",
|
||||||
|
"src/controllers/dashboard/librarydisplay.js",
|
||||||
"src/controllers/dashboard/metadataImages.js",
|
"src/controllers/dashboard/metadataImages.js",
|
||||||
"src/controllers/dashboard/metadatanfo.js",
|
"src/controllers/dashboard/metadatanfo.js",
|
||||||
"src/controllers/dashboard/plugins/repositories.js",
|
"src/controllers/dashboard/plugins/repositories.js",
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
define(['jQuery', 'loading', 'globalize', 'emby-checkbox', 'emby-textarea', 'emby-input', 'emby-select', 'emby-button'], function ($, loading, globalize) {
|
import $ from 'jQuery';
|
||||||
'use strict';
|
import loading from 'loading';
|
||||||
|
import globalize from 'globalize';
|
||||||
|
import 'emby-checkbox';
|
||||||
|
import 'emby-textarea';
|
||||||
|
import 'emby-input';
|
||||||
|
import 'emby-select';
|
||||||
|
import 'emby-button';
|
||||||
|
|
||||||
|
/* eslint-disable indent */
|
||||||
|
|
||||||
function loadPage(page, config, languageOptions, systemInfo) {
|
function loadPage(page, config, languageOptions, systemInfo) {
|
||||||
page.querySelector('#txtServerName').value = systemInfo.ServerName;
|
page.querySelector('#txtServerName').value = systemInfo.ServerName;
|
||||||
|
@ -43,7 +51,7 @@ define(['jQuery', 'loading', 'globalize', 'emby-checkbox', 'emby-textarea', 'emb
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}, function () {
|
}, function () {
|
||||||
require(['alert'], function (alert) {
|
import('alert').then(({default: alert}) => {
|
||||||
alert(globalize.translate('DefaultErrorMessage'));
|
alert(globalize.translate('DefaultErrorMessage'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -56,9 +64,9 @@ define(['jQuery', 'loading', 'globalize', 'emby-checkbox', 'emby-textarea', 'emb
|
||||||
var currentBrandingOptions;
|
var currentBrandingOptions;
|
||||||
var currentLanguage;
|
var currentLanguage;
|
||||||
var brandingConfigKey = 'branding';
|
var brandingConfigKey = 'branding';
|
||||||
return function (view, params) {
|
export default function (view, params) {
|
||||||
$('#btnSelectCachePath', view).on('click.selectDirectory', function () {
|
$('#btnSelectCachePath', view).on('click.selectDirectory', function () {
|
||||||
require(['directorybrowser'], function (directoryBrowser) {
|
import('directorybrowser').then(({default: directoryBrowser}) => {
|
||||||
var picker = new directoryBrowser();
|
var picker = new directoryBrowser();
|
||||||
picker.show({
|
picker.show({
|
||||||
callback: function (path) {
|
callback: function (path) {
|
||||||
|
@ -75,7 +83,7 @@ define(['jQuery', 'loading', 'globalize', 'emby-checkbox', 'emby-textarea', 'emb
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$('#btnSelectMetadataPath', view).on('click.selectDirectory', function () {
|
$('#btnSelectMetadataPath', view).on('click.selectDirectory', function () {
|
||||||
require(['directorybrowser'], function (directoryBrowser) {
|
import('directorybrowser').then(({default: directoryBrowser}) => {
|
||||||
var picker = new directoryBrowser();
|
var picker = new directoryBrowser();
|
||||||
picker.show({
|
picker.show({
|
||||||
path: $('#txtMetadataPath', view).val(),
|
path: $('#txtMetadataPath', view).val(),
|
||||||
|
@ -113,4 +121,5 @@ define(['jQuery', 'loading', 'globalize', 'emby-checkbox', 'emby-textarea', 'emb
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
/* eslint-enable indent */
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
define(['globalize', 'loading', 'libraryMenu', 'emby-checkbox', 'emby-button', 'emby-button'], function(globalize, loading, libraryMenu) {
|
import globalize from 'globalize';
|
||||||
'use strict';
|
import loading from 'loading';
|
||||||
|
import libraryMenu from 'libraryMenu';
|
||||||
|
import 'emby-checkbox';
|
||||||
|
import 'emby-button';
|
||||||
|
import 'emby-button';
|
||||||
|
|
||||||
|
/* eslint-disable indent */
|
||||||
|
|
||||||
function getTabs() {
|
function getTabs() {
|
||||||
return [{
|
return [{
|
||||||
|
@ -17,7 +23,7 @@ define(['globalize', 'loading', 'libraryMenu', 'emby-checkbox', 'emby-button', '
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
return function(view, params) {
|
export default function(view, params) {
|
||||||
function loadData() {
|
function loadData() {
|
||||||
ApiClient.getServerConfiguration().then(function(config) {
|
ApiClient.getServerConfiguration().then(function(config) {
|
||||||
view.querySelector('.chkFolderView').checked = config.EnableFolderView;
|
view.querySelector('.chkFolderView').checked = config.EnableFolderView;
|
||||||
|
@ -64,4 +70,5 @@ define(['globalize', 'loading', 'libraryMenu', 'emby-checkbox', 'emby-button', '
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
/* eslint-enable indent */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue