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

Make import paths ES6-compatible

This commit is contained in:
MrTimscampi 2020-08-14 08:46:34 +02:00 committed by vitorsemeano
parent 1a635e2f81
commit bfb8c7c1f6
245 changed files with 2073 additions and 1995 deletions

View file

@ -1,20 +1,20 @@
import loading from 'loading';
import dom from 'dom';
import globalize from 'globalize';
import * as datefns from 'date-fns';
import dfnshelper from 'dfnshelper';
import 'paper-icon-button-light';
import 'cardStyle';
import 'emby-button';
import 'indicators';
import 'flexStyles';
import loading from '../../../components/loading/loading';
import dom from '../../../scripts/dom';
import globalize from '../../../scripts/globalize';
import { formatDistanceToNow } from 'date-fns';
import { localeWithSuffix } from '../../../scripts/dfnshelper';
import '../../../elements/emby-button/paper-icon-button-light';
import '../../../components/cardbuilder/card.css';
import '../../../elements/emby-button/emby-button';
import '../../../components/indicators/indicators.css';
import '../../../assets/css/flexstyles.css';
/* eslint-disable indent */
function deleteUser(page, id) {
const msg = globalize.translate('DeleteUserConfirmation');
import('confirm').then(({default: confirm}) => {
import('../../../components/confirm/confirm').then(({default: confirm}) => {
confirm({
title: globalize.translate('DeleteUser'),
text: msg,
@ -55,7 +55,7 @@ import 'flexStyles';
icon: 'delete'
});
import('actionsheet').then(({default: actionsheet}) => {
import('../../../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
actionsheet.show({
items: menuItems,
positionTo: card,
@ -139,7 +139,7 @@ import 'flexStyles';
// how dates are returned by the server when the session is active and show something like 'Active now', instead of past/future sentences
function getLastSeenText(lastActivityDate) {
if (lastActivityDate) {
return globalize.translate('LastSeen', datefns.formatDistanceToNow(Date.parse(lastActivityDate), dfnshelper.localeWithSuffix));
return globalize.translate('LastSeen', formatDistanceToNow(Date.parse(lastActivityDate), localeWithSuffix));
}
return '';