mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add constructor capitalization rule
This commit is contained in:
parent
8e2ea6812a
commit
ec0adb895b
43 changed files with 103 additions and 94 deletions
|
@ -13,8 +13,8 @@ import confirm from '../../components/confirm/confirm';
|
|||
import cardBuilder from '../../components/cardbuilder/cardBuilder';
|
||||
|
||||
function addVirtualFolder(page) {
|
||||
import('../../components/mediaLibraryCreator/mediaLibraryCreator').then(({ default: medialibrarycreator }) => {
|
||||
new medialibrarycreator({
|
||||
import('../../components/mediaLibraryCreator/mediaLibraryCreator').then(({ default: MediaLibraryCreator }) => {
|
||||
new MediaLibraryCreator({
|
||||
collectionTypeOptions: getCollectionTypeOptions().filter(function (f) {
|
||||
return !f.hidden;
|
||||
}),
|
||||
|
@ -28,8 +28,8 @@ function addVirtualFolder(page) {
|
|||
}
|
||||
|
||||
function editVirtualFolder(page, virtualFolder) {
|
||||
import('../../components/mediaLibraryEditor/mediaLibraryEditor').then(({ default: medialibraryeditor }) => {
|
||||
new medialibraryeditor({
|
||||
import('../../components/mediaLibraryEditor/mediaLibraryEditor').then(({ default: MediaLibraryEditor }) => {
|
||||
new MediaLibraryEditor({
|
||||
refresh: shouldRefreshLibraryAfterChanges(page),
|
||||
library: virtualFolder
|
||||
}).then(function (hasChanges) {
|
||||
|
@ -62,8 +62,8 @@ function deleteVirtualFolder(page, virtualFolder) {
|
|||
}
|
||||
|
||||
function refreshVirtualFolder(page, virtualFolder) {
|
||||
import('../../components/refreshdialog/refreshdialog').then(({ default: refreshDialog }) => {
|
||||
new refreshDialog({
|
||||
import('../../components/refreshdialog/refreshdialog').then(({ default: RefreshDialog }) => {
|
||||
new RefreshDialog({
|
||||
itemIds: [virtualFolder.ItemId],
|
||||
serverId: ApiClient.serverId(),
|
||||
mode: 'scan'
|
||||
|
|
|
@ -49,11 +49,11 @@ class HomeView extends TabbedView {
|
|||
}
|
||||
|
||||
const instance = this;
|
||||
return import(/* webpackChunkName: "[request]" */ `../controllers/${depends}`).then(({ default: controllerFactory }) => {
|
||||
return import(/* webpackChunkName: "[request]" */ `../controllers/${depends}`).then(({ default: ControllerFactory }) => {
|
||||
let controller = instance.tabControllers[index];
|
||||
|
||||
if (!controller) {
|
||||
controller = new controllerFactory(instance.view.querySelector(".tabContent[data-index='" + index + "']"), instance.params);
|
||||
controller = new ControllerFactory(instance.view.querySelector(".tabContent[data-index='" + index + "']"), instance.params);
|
||||
instance.tabControllers[index] = controller;
|
||||
}
|
||||
|
||||
|
|
|
@ -691,8 +691,8 @@ function showRecordingFields(instance, page, item, user) {
|
|||
const recordingFieldsElement = page.querySelector('.recordingFields');
|
||||
|
||||
if (item.Type == 'Program' && user.Policy.EnableLiveTvManagement) {
|
||||
import('../../components/recordingcreator/recordingfields').then(({ default: recordingFields }) => {
|
||||
instance.currentRecordingFields = new recordingFields({
|
||||
import('../../components/recordingcreator/recordingfields').then(({ default: RecordingFields }) => {
|
||||
instance.currentRecordingFields = new RecordingFields({
|
||||
parent: recordingFieldsElement,
|
||||
programId: item.Id,
|
||||
serverId: item.ServerId
|
||||
|
@ -1826,7 +1826,7 @@ function renderCast(page, item) {
|
|||
});
|
||||
}
|
||||
|
||||
function itemDetailPage() {
|
||||
function ItemDetailPage() {
|
||||
const self = this;
|
||||
self.setInitialCollapsibleState = setInitialCollapsibleState;
|
||||
self.renderDetails = renderDetails;
|
||||
|
@ -1846,7 +1846,7 @@ function onTrackSelectionsSubmit(e) {
|
|||
return false;
|
||||
}
|
||||
|
||||
window.ItemDetailPage = new itemDetailPage();
|
||||
window.ItemDetailPage = new ItemDetailPage();
|
||||
|
||||
export default function (view, params) {
|
||||
function getApiClient() {
|
||||
|
|
|
@ -399,8 +399,8 @@ function showSortMenu() {
|
|||
function onNewItemClick() {
|
||||
const instance = this;
|
||||
|
||||
import('../components/playlisteditor/playlisteditor').then(({ default: playlistEditor }) => {
|
||||
new playlistEditor({
|
||||
import('../components/playlisteditor/playlisteditor').then(({ default: PlaylistEditor }) => {
|
||||
new PlaylistEditor({
|
||||
items: [],
|
||||
serverId: instance.params.serverId
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import tvguide from '../../components/guide/guide';
|
||||
import Guide from '../../components/guide/guide';
|
||||
|
||||
export default function (view, params, tabContent) {
|
||||
let guideInstance;
|
||||
|
@ -6,7 +6,7 @@ export default function (view, params, tabContent) {
|
|||
|
||||
self.renderTab = function () {
|
||||
if (!guideInstance) {
|
||||
guideInstance = new tvguide({
|
||||
guideInstance = new Guide({
|
||||
element: tabContent,
|
||||
serverId: ApiClient.serverId()
|
||||
});
|
||||
|
|
|
@ -274,7 +274,7 @@ export default function (view, params) {
|
|||
break;
|
||||
}
|
||||
|
||||
import(`../livetv/${depends}`).then(({ default: controllerFactory }) => {
|
||||
import(`../livetv/${depends}`).then(({ default: ControllerFactory }) => {
|
||||
let tabContent;
|
||||
|
||||
if (index === 0) {
|
||||
|
@ -290,7 +290,7 @@ export default function (view, params) {
|
|||
if (index === 0) {
|
||||
controller = self;
|
||||
} else {
|
||||
controller = new controllerFactory(view, params, tabContent);
|
||||
controller = new ControllerFactory(view, params, tabContent);
|
||||
}
|
||||
|
||||
tabControllers[index] = controller;
|
||||
|
|
|
@ -9,8 +9,8 @@ function onListingsSubmitted() {
|
|||
}
|
||||
|
||||
function init(page, type, providerId) {
|
||||
import(`../components/tvproviders/${type}`).then(({ default: factory }) => {
|
||||
const instance = new factory(page, providerId, {});
|
||||
import(`../components/tvproviders/${type}`).then(({ default: ProviderFactory }) => {
|
||||
const instance = new ProviderFactory(page, providerId, {});
|
||||
Events.on(instance, 'submitted', onListingsSubmitted);
|
||||
instance.init();
|
||||
});
|
||||
|
|
|
@ -165,8 +165,8 @@ function showProviderOptions(page, providerId, button) {
|
|||
}
|
||||
|
||||
function mapChannels(page, providerId) {
|
||||
import('../components/channelMapper/channelMapper').then(({ default: channelMapper }) => {
|
||||
new channelMapper({
|
||||
import('../components/channelMapper/channelMapper').then(({ default: ChannelMapper }) => {
|
||||
new ChannelMapper({
|
||||
serverId: ApiClient.serverInfo().Id,
|
||||
providerId: providerId
|
||||
}).show();
|
||||
|
|
|
@ -106,8 +106,8 @@ function submitForm(page) {
|
|||
}
|
||||
|
||||
function getDetectedDevice() {
|
||||
return import('../components/tunerPicker').then(({ default: tunerPicker }) => {
|
||||
return new tunerPicker().show({
|
||||
return import('../components/tunerPicker').then(({ default: TunerPicker }) => {
|
||||
return new TunerPicker().show({
|
||||
serverId: ApiClient.serverId()
|
||||
});
|
||||
});
|
||||
|
|
|
@ -289,8 +289,8 @@ export default function (view, params, tabContent, options) {
|
|||
query = userSettings.loadQuerySettings(savedQueryKey, query);
|
||||
|
||||
this.showFilterMenu = function () {
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: filterDialogFactory }) => {
|
||||
const filterDialog = new filterDialogFactory({
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: FilterDialog }) => {
|
||||
const filterDialog = new FilterDialog({
|
||||
query: query,
|
||||
mode: 'movies',
|
||||
serverId: ApiClient.serverId()
|
||||
|
|
|
@ -314,7 +314,7 @@ export default function (view, params) {
|
|||
break;
|
||||
}
|
||||
|
||||
import(`../movies/${depends}`).then(({ default: controllerFactory }) => {
|
||||
import(`../movies/${depends}`).then(({ default: ControllerFactory }) => {
|
||||
let tabContent;
|
||||
|
||||
if (index === suggestionsTabIndex) {
|
||||
|
@ -330,11 +330,11 @@ export default function (view, params) {
|
|||
if (index === suggestionsTabIndex) {
|
||||
controller = this;
|
||||
} else if (index == 0 || index == 3) {
|
||||
controller = new controllerFactory(view, params, tabContent, {
|
||||
controller = new ControllerFactory(view, params, tabContent, {
|
||||
mode: index ? 'favorites' : 'movies'
|
||||
});
|
||||
} else {
|
||||
controller = new controllerFactory(view, params, tabContent);
|
||||
controller = new ControllerFactory(view, params, tabContent);
|
||||
}
|
||||
|
||||
tabControllers[index] = controller;
|
||||
|
|
|
@ -182,8 +182,8 @@ export default function (view, params, tabContent) {
|
|||
let isLoading = false;
|
||||
|
||||
this.showFilterMenu = function () {
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: filterDialogFactory }) => {
|
||||
const filterDialog = new filterDialogFactory({
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: FilterDialog }) => {
|
||||
const filterDialog = new FilterDialog({
|
||||
query: getQuery(),
|
||||
mode: 'movies',
|
||||
serverId: ApiClient.serverId()
|
||||
|
|
|
@ -189,8 +189,8 @@ export default function (view, params, tabContent) {
|
|||
let isLoading = false;
|
||||
|
||||
this.showFilterMenu = function () {
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: filterDialogFactory }) => {
|
||||
const filterDialog = new filterDialogFactory({
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: FilterDialog }) => {
|
||||
const filterDialog = new FilterDialog({
|
||||
query: getQuery(),
|
||||
mode: 'albums',
|
||||
serverId: ApiClient.serverId()
|
||||
|
|
|
@ -170,8 +170,8 @@ export default function (view, params, tabContent) {
|
|||
let isLoading = false;
|
||||
|
||||
this.showFilterMenu = function () {
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: filterDialogFactory }) => {
|
||||
const filterDialog = new filterDialogFactory({
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: FilterDialog }) => {
|
||||
const filterDialog = new FilterDialog({
|
||||
query: getQuery(tabContent),
|
||||
mode: this.mode,
|
||||
serverId: ApiClient.serverId()
|
||||
|
|
|
@ -290,7 +290,7 @@ export default function (view, params) {
|
|||
break;
|
||||
}
|
||||
|
||||
import(`../music/${depends}`).then(({ default: controllerFactory }) => {
|
||||
import(`../music/${depends}`).then(({ default: ControllerFactory }) => {
|
||||
let tabContent;
|
||||
|
||||
if (index == 1) {
|
||||
|
@ -306,7 +306,7 @@ export default function (view, params) {
|
|||
if (index === 1) {
|
||||
controller = this;
|
||||
} else {
|
||||
controller = new controllerFactory(view, params, tabContent);
|
||||
controller = new ControllerFactory(view, params, tabContent);
|
||||
}
|
||||
|
||||
if (index == 2) {
|
||||
|
|
|
@ -135,8 +135,8 @@ export default function (view, params, tabContent) {
|
|||
let isLoading = false;
|
||||
|
||||
self.showFilterMenu = function () {
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: filterDialogFactory }) => {
|
||||
const filterDialog = new filterDialogFactory({
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: FilterDialog }) => {
|
||||
const filterDialog = new FilterDialog({
|
||||
query: getQuery(tabContent),
|
||||
mode: 'songs',
|
||||
serverId: ApiClient.serverId()
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import remotecontrolFactory from '../../../components/remotecontrol/remotecontrol';
|
||||
import RemoteControl from '../../../components/remotecontrol/remotecontrol';
|
||||
import libraryMenu from '../../../scripts/libraryMenu';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
|
||||
export default function (view) {
|
||||
const remoteControl = new remotecontrolFactory();
|
||||
const remoteControl = new RemoteControl();
|
||||
remoteControl.init(view, view.querySelector('.remoteControlContent'));
|
||||
view.addEventListener('viewshow', function () {
|
||||
libraryMenu.setTransparentMenu(true);
|
||||
|
|
|
@ -171,8 +171,8 @@ export default function (view, params, tabContent) {
|
|||
let isLoading = false;
|
||||
|
||||
self.showFilterMenu = function () {
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: filterDialogFactory }) => {
|
||||
const filterDialog = new filterDialogFactory({
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: FilterDialog }) => {
|
||||
const filterDialog = new FilterDialog({
|
||||
query: getQuery(tabContent),
|
||||
mode: 'episodes',
|
||||
serverId: ApiClient.serverId()
|
||||
|
|
|
@ -268,7 +268,7 @@ export default function (view, params) {
|
|||
break;
|
||||
}
|
||||
|
||||
import(`../shows/${depends}`).then(({ default: controllerFactory }) => {
|
||||
import(`../shows/${depends}`).then(({ default: ControllerFactory }) => {
|
||||
let tabContent;
|
||||
|
||||
if (index === 1) {
|
||||
|
@ -284,7 +284,7 @@ export default function (view, params) {
|
|||
if (index === 1) {
|
||||
controller = self;
|
||||
} else {
|
||||
controller = new controllerFactory(view, params, tabContent);
|
||||
controller = new ControllerFactory(view, params, tabContent);
|
||||
}
|
||||
|
||||
tabControllers[index] = controller;
|
||||
|
|
|
@ -199,8 +199,8 @@ export default function (view, params, tabContent) {
|
|||
let isLoading = false;
|
||||
|
||||
this.showFilterMenu = function () {
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: filterDialogFactory }) => {
|
||||
const filterDialog = new filterDialogFactory({
|
||||
import('../../components/filterdialog/filterdialog').then(({ default: FilterDialog }) => {
|
||||
const filterDialog = new FilterDialog({
|
||||
query: getQuery(tabContent),
|
||||
mode: 'series',
|
||||
serverId: ApiClient.serverId()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue