1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Move globalize to lib

This commit is contained in:
Bill Thornton 2024-08-14 13:31:34 -04:00
parent 0ea5349422
commit 056d802c56
240 changed files with 328 additions and 258 deletions

View file

@ -1,5 +1,5 @@
import React, { FunctionComponent } from 'react';
import globalize from '../scripts/globalize';
import globalize from '../lib/globalize';
const createButtonElement = ({ type, id, className, title, leftIcon, rightIcon }: IProps) => ({
__html: `<button

View file

@ -1,6 +1,6 @@
import escapeHTML from 'escape-html';
import React, { type FC } from 'react';
import globalize from '../scripts/globalize';
import globalize from '../lib/globalize';
const createCheckBoxElement = ({
labelClassName,

View file

@ -1,5 +1,5 @@
import React, { FunctionComponent } from 'react';
import globalize from '../scripts/globalize';
import globalize from '../lib/globalize';
type IProps = {
is?: string;

View file

@ -1,6 +1,6 @@
import React, { type FC, useCallback, useEffect, useMemo, useRef } from 'react';
import globalize from '../scripts/globalize';
import globalize from '../lib/globalize';
interface CreateInputElementParams {
type?: string

View file

@ -1,5 +1,5 @@
import React, { FunctionComponent } from 'react';
import globalize from '../scripts/globalize';
import globalize from '../lib/globalize';
const createLinkElement = ({ className, title, href }: { className?: string, title?: string, href?: string }) => ({
__html: `<a

View file

@ -1,5 +1,5 @@
import React, { FunctionComponent } from 'react';
import globalize from '../scripts/globalize';
import globalize from '../lib/globalize';
const createSelectElement = ({ name, id, required, label, option }: { name?: string, id?: string, required?: string, label?: string, option?: React.ReactNode }) => ({
__html: `<select

View file

@ -10,7 +10,7 @@ import CircularProgress, {
import Typography from '@mui/material/Typography';
import Box from '@mui/material/Box';
import { toPercent } from 'utils/number';
import { getCurrentDateTimeLocale } from 'scripts/globalize';
import { getCurrentDateTimeLocale } from 'lib/globalize';
import type { ItemDto } from 'types/base/models/item-dto';
function CircularProgressWithLabel(

View file

@ -4,7 +4,7 @@ import React, { type FC, useCallback } from 'react';
import CheckIcon from '@mui/icons-material/Check';
import { IconButton } from '@mui/material';
import classNames from 'classnames';
import globalize from 'scripts/globalize';
import globalize from 'lib/globalize';
import { useTogglePlayedMutation } from 'hooks/useFetchItems';
interface PlayedButtonProps {

View file

@ -1,5 +1,5 @@
import serverNotifications from '../../scripts/serverNotifications';
import globalize from '../../scripts/globalize';
import globalize from '../../lib/globalize';
import Events from '../../utils/events.ts';
import EmbyButtonPrototype from '../../elements/emby-button/emby-button';
import ServerConnections from '../../components/ServerConnections';

View file

@ -1,7 +1,7 @@
import './emby-progressring.scss';
import 'webcomponents.js/webcomponents-lite';
import template from './emby-progressring.template.html';
import { getCurrentDateTimeLocale } from '../../scripts/globalize';
import { getCurrentDateTimeLocale } from '../../lib/globalize';
import { toPercent } from '../../utils/number.ts';
const EmbyProgressRing = Object.create(HTMLDivElement.prototype);

View file

@ -4,7 +4,7 @@ import FavoriteIcon from '@mui/icons-material/Favorite';
import { IconButton } from '@mui/material';
import classNames from 'classnames';
import { useToggleFavoriteMutation } from 'hooks/useFetchItems';
import globalize from 'scripts/globalize';
import globalize from 'lib/globalize';
interface FavoriteButtonProps {
className?: string;

View file

@ -1,5 +1,5 @@
import serverNotifications from '../../scripts/serverNotifications';
import globalize from '../../scripts/globalize';
import globalize from '../../lib/globalize';
import Events from '../../utils/events.ts';
import EmbyButtonPrototype from '../emby-button/emby-button';
import ServerConnections from '../../components/ServerConnections';

View file

@ -1,6 +1,6 @@
import React, { type FC, useCallback, useEffect, useRef, useState } from 'react';
import scrollerFactory from 'lib/scroller';
import globalize from '../../scripts/globalize';
import globalize from '../../lib/globalize';
import IconButton from '../emby-button/IconButton';
import './emby-scrollbuttons.scss';
import { ScrollDirection, scrollerItemSlideIntoView } from './utils';

View file

@ -1,7 +1,7 @@
import './emby-scrollbuttons.scss';
import 'webcomponents.js/webcomponents-lite';
import '../emby-button/paper-icon-button-light';
import globalize from '../../scripts/globalize';
import globalize from '../../lib/globalize';
import { scrollerItemSlideIntoView } from './utils';
const EmbyScrollButtonsPrototype = Object.create(HTMLDivElement.prototype);

View file

@ -1,5 +1,5 @@
import ScrollerFactory from 'lib/scroller';
import globalize from 'scripts/globalize';
import globalize from 'lib/globalize';
export enum ScrollDirection {
RIGHT = 'right',

View file

@ -7,7 +7,7 @@ import keyboardnavigation from '../../scripts/keyboardNavigation';
import './emby-slider.scss';
import 'webcomponents.js/webcomponents-lite';
import '../emby-input/emby-input';
import globalize from '../../scripts/globalize';
import globalize from '../../lib/globalize';
import { decimalCount } from '../../utils/number';
const EmbySliderPrototype = Object.create(HTMLInputElement.prototype);