mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Use consistent import style
This commit is contained in:
parent
3e6fdc8f04
commit
422adde900
23 changed files with 37 additions and 30 deletions
|
@ -1,6 +1,6 @@
|
||||||
import escapeHtml from 'escape-html';
|
import escapeHtml from 'escape-html';
|
||||||
import Events from '../utils/events.ts';
|
import Events from '../utils/events.ts';
|
||||||
import globalize from '../lib/globalize/index.js';
|
import globalize from '../lib/globalize';
|
||||||
import dom from '../scripts/dom';
|
import dom from '../scripts/dom';
|
||||||
import { formatRelative } from 'date-fns';
|
import { formatRelative } from 'date-fns';
|
||||||
import serverNotifications from '../scripts/serverNotifications';
|
import serverNotifications from '../scripts/serverNotifications';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { FunctionComponent } from 'react';
|
import React, { FunctionComponent } from 'react';
|
||||||
import globalize from '../../../lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
title?: string;
|
title?: string;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { FunctionComponent } from 'react';
|
import React, { FunctionComponent } from 'react';
|
||||||
import globalize from '../../../lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
activeTab: string;
|
activeTab: string;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { appHost } from './apphost';
|
import { appHost } from './apphost';
|
||||||
import globalize from '../lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
import { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type';
|
import { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type';
|
||||||
import { BaseItemKind } from '@jellyfin/sdk/lib/generated-client/models/base-item-kind';
|
import { BaseItemKind } from '@jellyfin/sdk/lib/generated-client/models/base-item-kind';
|
||||||
import { LocationType } from '@jellyfin/sdk/lib/generated-client/models/location-type';
|
import { LocationType } from '@jellyfin/sdk/lib/generated-client/models/location-type';
|
||||||
|
|
|
@ -9,7 +9,7 @@ import itemHelper from '../itemHelper';
|
||||||
import { pluginManager } from '../pluginManager';
|
import { pluginManager } from '../pluginManager';
|
||||||
import PlayQueueManager from './playqueuemanager';
|
import PlayQueueManager from './playqueuemanager';
|
||||||
import * as userSettings from '../../scripts/settings/userSettings';
|
import * as userSettings from '../../scripts/settings/userSettings';
|
||||||
import globalize from '../../lib/globalize/index.js';
|
import globalize from '../../lib/globalize';
|
||||||
import loading from '../loading/loading';
|
import loading from '../loading/loading';
|
||||||
import { appHost } from '../apphost';
|
import { appHost } from '../apphost';
|
||||||
import ServerConnections from '../ServerConnections';
|
import ServerConnections from '../ServerConnections';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import loading from '../loading/loading';
|
||||||
import { playbackManager } from '../playback/playbackmanager';
|
import { playbackManager } from '../playback/playbackmanager';
|
||||||
import { pluginManager } from '../pluginManager';
|
import { pluginManager } from '../pluginManager';
|
||||||
import { appRouter } from '../router/appRouter';
|
import { appRouter } from '../router/appRouter';
|
||||||
import globalize from '../../lib/globalize/index.js';
|
import globalize from '../../lib/globalize';
|
||||||
import { appHost } from '../apphost';
|
import { appHost } from '../apphost';
|
||||||
import { enable, isEnabled } from '../../scripts/autocast';
|
import { enable, isEnabled } from '../../scripts/autocast';
|
||||||
import '../../elements/emby-checkbox/emby-checkbox';
|
import '../../elements/emby-checkbox/emby-checkbox';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Events from '../utils/events.ts';
|
import Events from '../utils/events.ts';
|
||||||
import globalize from '../lib/globalize/index.js';
|
import globalize from '../lib/globalize';
|
||||||
import loading from './loading/loading';
|
import loading from './loading/loading';
|
||||||
import appSettings from '../scripts/settings/appSettings';
|
import appSettings from '../scripts/settings/appSettings';
|
||||||
import { playbackManager } from './playback/playbackmanager';
|
import { playbackManager } from './playback/playbackmanager';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import globalize from '../lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper for handling settings.
|
* Helper for handling settings.
|
||||||
|
|
|
@ -2,8 +2,9 @@ import { Action } from 'history';
|
||||||
import { FunctionComponent, useEffect } from 'react';
|
import { FunctionComponent, useEffect } from 'react';
|
||||||
import { useLocation, useNavigationType } from 'react-router-dom';
|
import { useLocation, useNavigationType } from 'react-router-dom';
|
||||||
|
|
||||||
import globalize from '../../lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
import type { RestoreViewFailResponse } from '../../types/viewManager';
|
import type { RestoreViewFailResponse } from 'types/viewManager';
|
||||||
|
|
||||||
import viewManager from './viewManager';
|
import viewManager from './viewManager';
|
||||||
|
|
||||||
export interface ViewManagerPageProps {
|
export interface ViewManagerPageProps {
|
||||||
|
|
|
@ -9,9 +9,9 @@ import scrollManager from 'components/scrollManager';
|
||||||
import focusManager from 'components/focusManager';
|
import focusManager from 'components/focusManager';
|
||||||
|
|
||||||
import keyboardNavigation from 'scripts/keyboardNavigation';
|
import keyboardNavigation from 'scripts/keyboardNavigation';
|
||||||
import globalize from '../lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
import LibraryMenu from '../scripts/libraryMenu';
|
import LibraryMenu from 'scripts/libraryMenu';
|
||||||
import Events from '../utils/events.ts';
|
import Events from 'utils/events';
|
||||||
|
|
||||||
import '../styles/lyrics.scss';
|
import '../styles/lyrics.scss';
|
||||||
import { AutoScroll } from './lyrics.types';
|
import { AutoScroll } from './lyrics.types';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import globalize from '../../../lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
import Dashboard from '../../../utils/dashboard';
|
import Dashboard from 'utils/dashboard';
|
||||||
|
|
||||||
function processForgotPasswordResult(result) {
|
function processForgotPasswordResult(result) {
|
||||||
if (result.Action == 'ContactAdmin') {
|
if (result.Action == 'ContactAdmin') {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import globalize from '../../../lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
import Dashboard from '../../../utils/dashboard';
|
import Dashboard from 'utils/dashboard';
|
||||||
|
|
||||||
function processForgotPasswordResult(result) {
|
function processForgotPasswordResult(result) {
|
||||||
if (result.Success) {
|
if (result.Success) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React, { FunctionComponent } from 'react';
|
import React, { FunctionComponent } from 'react';
|
||||||
import globalize from '../lib/globalize';
|
|
||||||
|
import globalize from 'lib/globalize';
|
||||||
|
|
||||||
const createButtonElement = ({ type, id, className, title, leftIcon, rightIcon }: IProps) => ({
|
const createButtonElement = ({ type, id, className, title, leftIcon, rightIcon }: IProps) => ({
|
||||||
__html: `<button
|
__html: `<button
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import escapeHTML from 'escape-html';
|
import escapeHTML from 'escape-html';
|
||||||
import React, { type FC } from 'react';
|
import React, { type FC } from 'react';
|
||||||
import globalize from '../lib/globalize';
|
|
||||||
|
import globalize from 'lib/globalize';
|
||||||
|
|
||||||
const createCheckBoxElement = ({
|
const createCheckBoxElement = ({
|
||||||
labelClassName,
|
labelClassName,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React, { FunctionComponent } from 'react';
|
import React, { FunctionComponent } from 'react';
|
||||||
import globalize from '../lib/globalize';
|
|
||||||
|
import globalize from 'lib/globalize';
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
is?: string;
|
is?: string;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { type FC, useCallback, useEffect, useMemo, useRef } from 'react';
|
import React, { type FC, useCallback, useEffect, useMemo, useRef } from 'react';
|
||||||
|
|
||||||
import globalize from '../lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
|
|
||||||
interface CreateInputElementParams {
|
interface CreateInputElementParams {
|
||||||
type?: string
|
type?: string
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React, { FunctionComponent } from 'react';
|
import React, { FunctionComponent } from 'react';
|
||||||
import globalize from '../lib/globalize';
|
|
||||||
|
import globalize from 'lib/globalize';
|
||||||
|
|
||||||
const createLinkElement = ({ className, title, href }: { className?: string, title?: string, href?: string }) => ({
|
const createLinkElement = ({ className, title, href }: { className?: string, title?: string, href?: string }) => ({
|
||||||
__html: `<a
|
__html: `<a
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React, { FunctionComponent } from 'react';
|
import React, { FunctionComponent } from 'react';
|
||||||
import globalize from '../lib/globalize';
|
|
||||||
|
import globalize from 'lib/globalize';
|
||||||
|
|
||||||
const createSelectElement = ({ name, id, required, label, option }: { name?: string, id?: string, required?: string, label?: string, option?: React.ReactNode }) => ({
|
const createSelectElement = ({ name, id, required, label, option }: { name?: string, id?: string, required?: string, label?: string, option?: React.ReactNode }) => ({
|
||||||
__html: `<select
|
__html: `<select
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { type FC, useCallback, useEffect, useRef, useState } from 'react';
|
import React, { type FC, useCallback, useEffect, useRef, useState } from 'react';
|
||||||
import scrollerFactory from 'lib/scroller';
|
import scrollerFactory from 'lib/scroller';
|
||||||
import globalize from '../../lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
import IconButton from '../emby-button/IconButton';
|
import IconButton from '../emby-button/IconButton';
|
||||||
import './emby-scrollbuttons.scss';
|
import './emby-scrollbuttons.scss';
|
||||||
import { ScrollDirection, scrollerItemSlideIntoView } from './utils';
|
import { ScrollDirection, scrollerItemSlideIntoView } from './utils';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import './emby-scrollbuttons.scss';
|
import './emby-scrollbuttons.scss';
|
||||||
import 'webcomponents.js/webcomponents-lite';
|
import 'webcomponents.js/webcomponents-lite';
|
||||||
import '../emby-button/paper-icon-button-light';
|
import '../emby-button/paper-icon-button-light';
|
||||||
import globalize from '../../lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
import { scrollerItemSlideIntoView } from './utils';
|
import { scrollerItemSlideIntoView } from './utils';
|
||||||
|
|
||||||
const EmbyScrollButtonsPrototype = Object.create(HTMLDivElement.prototype);
|
const EmbyScrollButtonsPrototype = Object.create(HTMLDivElement.prototype);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import globalize from '../lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
|
|
||||||
export function parseISO8601Date(s, toLocal) {
|
export function parseISO8601Date(s, toLocal) {
|
||||||
// parenthese matches:
|
// parenthese matches:
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import escapeHtml from 'escape-html';
|
import escapeHtml from 'escape-html';
|
||||||
import 'jquery';
|
import 'jquery';
|
||||||
import globalize from '../lib/globalize';
|
|
||||||
import 'material-design-icons-iconfont';
|
import 'material-design-icons-iconfont';
|
||||||
import Dashboard from '../utils/dashboard';
|
|
||||||
import { getParameterByName } from '../utils/url.ts';
|
import globalize from 'lib/globalize';
|
||||||
|
import Dashboard from 'utils/dashboard';
|
||||||
|
import { getParameterByName } from 'utils/url';
|
||||||
|
|
||||||
function getNode(item, folderState, selected) {
|
function getNode(item, folderState, selected) {
|
||||||
const htmlName = getNodeInnerHtml(item);
|
const htmlName = getNodeInnerHtml(item);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import globalize from '../lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
|
|
||||||
export function showLayoutMenu (button, currentLayout, views) {
|
export function showLayoutMenu (button, currentLayout, views) {
|
||||||
let dispatchEvent = true;
|
let dispatchEvent = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue