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
|
@ -9,7 +9,7 @@ function render() {
|
|||
return elem;
|
||||
}
|
||||
|
||||
class appFooter {
|
||||
class AppFooter {
|
||||
constructor() {
|
||||
const self = this;
|
||||
|
||||
|
@ -33,4 +33,4 @@ class appFooter {
|
|||
}
|
||||
}
|
||||
|
||||
export default new appFooter();
|
||||
export default new AppFooter();
|
||||
|
|
|
@ -12,7 +12,7 @@ import 'material-design-icons-iconfont';
|
|||
import '../formdialog.scss';
|
||||
import ServerConnections from '../ServerConnections';
|
||||
|
||||
export default class channelMapper {
|
||||
export default class ChannelMapper {
|
||||
constructor(options) {
|
||||
function mapChannel(button, channelId, providerChannelId) {
|
||||
loading.show();
|
||||
|
|
|
@ -345,8 +345,8 @@ function executeCommand(item, id, options) {
|
|||
});
|
||||
break;
|
||||
case 'addtoplaylist':
|
||||
import('./playlisteditor/playlisteditor').then(({ default: playlistEditor }) => {
|
||||
new playlistEditor({
|
||||
import('./playlisteditor/playlisteditor').then(({ default: PlaylistEditor }) => {
|
||||
new PlaylistEditor({
|
||||
items: [itemId],
|
||||
serverId: serverId
|
||||
}).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
|
||||
|
@ -630,8 +630,8 @@ function deleteItem(apiClient, item) {
|
|||
}
|
||||
|
||||
function refresh(apiClient, item) {
|
||||
import('./refreshdialog/refreshdialog').then(({ default: refreshDialog }) => {
|
||||
new refreshDialog({
|
||||
import('./refreshdialog/refreshdialog').then(({ default: RefreshDialog }) => {
|
||||
new RefreshDialog({
|
||||
itemIds: [item.Id],
|
||||
serverId: apiClient.serverInfo().Id,
|
||||
mode: item.Type === 'CollectionFolder' ? 'scan' : null
|
||||
|
|
|
@ -188,7 +188,7 @@ function initLibraryOptions(dlg) {
|
|||
});
|
||||
}
|
||||
|
||||
export class showEditor {
|
||||
export class MediaLibraryCreator {
|
||||
constructor(options) {
|
||||
return new Promise((resolve) => {
|
||||
currentOptions = options;
|
||||
|
@ -224,4 +224,4 @@ let currentOptions;
|
|||
let hasChanges = false;
|
||||
let isCreating = false;
|
||||
|
||||
export default showEditor;
|
||||
export default MediaLibraryCreator;
|
||||
|
|
|
@ -197,7 +197,7 @@ function onDialogClosed() {
|
|||
currentDeferred.resolveWith(null, [hasChanges]);
|
||||
}
|
||||
|
||||
export class showEditor {
|
||||
export class MediaLibraryEditor {
|
||||
constructor(options) {
|
||||
const deferred = jQuery.Deferred();
|
||||
currentOptions = options;
|
||||
|
@ -231,4 +231,4 @@ let currentOptions;
|
|||
let hasChanges = false;
|
||||
let isCreating = false;
|
||||
|
||||
export default showEditor;
|
||||
export default MediaLibraryEditor;
|
||||
|
|
|
@ -6,7 +6,7 @@ import dom from '../../scripts/dom';
|
|||
import './multiSelect.scss';
|
||||
import ServerConnections from '../ServerConnections';
|
||||
import alert from '../alert';
|
||||
import playlistEditor from '../playlisteditor/playlisteditor';
|
||||
import PlaylistEditor from '../playlisteditor/playlisteditor';
|
||||
import confirm from '../confirm/confirm';
|
||||
import itemHelper from '../itemHelper';
|
||||
import datetime from '../../scripts/datetime';
|
||||
|
@ -269,7 +269,7 @@ function showMenuForSelectedItems(e) {
|
|||
dispatchNeedsRefresh();
|
||||
break;
|
||||
case 'playlist':
|
||||
new playlistEditor({
|
||||
new PlaylistEditor({
|
||||
items: items,
|
||||
serverId: serverId
|
||||
});
|
||||
|
@ -299,8 +299,8 @@ function showMenuForSelectedItems(e) {
|
|||
dispatchNeedsRefresh();
|
||||
break;
|
||||
case 'refresh':
|
||||
import('../refreshdialog/refreshdialog').then(({ default: refreshDialog }) => {
|
||||
new refreshDialog({
|
||||
import('../refreshdialog/refreshdialog').then(({ default: RefreshDialog }) => {
|
||||
new RefreshDialog({
|
||||
itemIds: items,
|
||||
serverId: serverId
|
||||
}).show();
|
||||
|
|
|
@ -221,7 +221,7 @@ function centerFocus(elem, horiz, on) {
|
|||
});
|
||||
}
|
||||
|
||||
export class showEditor {
|
||||
export class PlaylistEditor {
|
||||
constructor(options) {
|
||||
const items = options.items || {};
|
||||
currentServerId = options.serverId;
|
||||
|
@ -280,4 +280,4 @@ export class showEditor {
|
|||
}
|
||||
}
|
||||
|
||||
export default showEditor;
|
||||
export default PlaylistEditor;
|
||||
|
|
|
@ -72,13 +72,13 @@ class PluginManager {
|
|||
throw new TypeError('Plugin definitions in window have to be an (async) function returning the plugin class');
|
||||
}
|
||||
|
||||
const pluginClass = await pluginDefinition();
|
||||
if (typeof pluginClass !== 'function') {
|
||||
const PluginClass = await pluginDefinition();
|
||||
if (typeof PluginClass !== 'function') {
|
||||
throw new TypeError(`Plugin definition doesn't return a class for '${pluginSpec}'`);
|
||||
}
|
||||
|
||||
// init plugin and pass basic dependencies
|
||||
plugin = new pluginClass({
|
||||
plugin = new PluginClass({
|
||||
events: Events,
|
||||
loading,
|
||||
appSettings,
|
||||
|
|
|
@ -6,7 +6,7 @@ import loading from '../loading/loading';
|
|||
import scrollHelper from '../../scripts/scrollHelper';
|
||||
import datetime from '../../scripts/datetime';
|
||||
import imageLoader from '../images/imageLoader';
|
||||
import recordingFields from './recordingfields';
|
||||
import RecordingFields from './recordingfields';
|
||||
import Events from '../../utils/events.ts';
|
||||
import '../../elements/emby-button/emby-button';
|
||||
import '../../elements/emby-button/paper-icon-button-light';
|
||||
|
@ -185,7 +185,7 @@ function showEditor(itemId, serverId) {
|
|||
|
||||
reload(dlg, itemId, serverId);
|
||||
|
||||
currentRecordingFields = new recordingFields({
|
||||
currentRecordingFields = new RecordingFields({
|
||||
parent: dlg.querySelector('.recordingFields'),
|
||||
programId: itemId,
|
||||
serverId: serverId
|
||||
|
|
|
@ -691,10 +691,10 @@ export default function () {
|
|||
}
|
||||
|
||||
function savePlaylist() {
|
||||
import('../playlisteditor/playlisteditor').then(({ default: playlistEditor }) => {
|
||||
import('../playlisteditor/playlisteditor').then(({ default: PlaylistEditor }) => {
|
||||
getSaveablePlaylistItems().then(function (items) {
|
||||
const serverId = items.length ? items[0].ServerId : ApiClient.serverId();
|
||||
new playlistEditor({
|
||||
new PlaylistEditor({
|
||||
items: items.map(function (i) {
|
||||
return i.Id;
|
||||
}),
|
||||
|
|
|
@ -270,8 +270,8 @@ function executeAction(card, target, action) {
|
|||
}
|
||||
|
||||
function addToPlaylist(item) {
|
||||
import('./playlisteditor/playlisteditor').then(({ default: playlistEditor }) => {
|
||||
new playlistEditor().show({
|
||||
import('./playlisteditor/playlisteditor').then(({ default: PlaylistEditor }) => {
|
||||
new PlaylistEditor().show({
|
||||
items: [item.Id],
|
||||
serverId: item.ServerId
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ function discoverDevices(view) {
|
|||
});
|
||||
}
|
||||
|
||||
function tunerPicker() {
|
||||
function TunerPicker() {
|
||||
this.show = function () {
|
||||
const dialogOptions = {
|
||||
removeOnClose: true,
|
||||
|
@ -182,4 +182,4 @@ function tunerPicker() {
|
|||
|
||||
let currentDevices = [];
|
||||
|
||||
export default tunerPicker;
|
||||
export default TunerPicker;
|
||||
|
|
|
@ -21,6 +21,7 @@ viewContainer.setOnBeforeChange(function (newView, isRestored, options) {
|
|||
newView.initComplete = true;
|
||||
|
||||
if (typeof options.controllerFactory === 'function') {
|
||||
// eslint-disable-next-line new-cap
|
||||
new options.controllerFactory(newView, eventDetail.detail.params);
|
||||
} else if (options.controllerFactory && typeof options.controllerFactory.default === 'function') {
|
||||
new options.controllerFactory.default(newView, eventDetail.detail.params);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue