Fix undefined check and use consistent number formatting function names
This commit is contained in:
@@ -9,7 +9,7 @@ import CircularProgress, {
|
||||
} from '@mui/material/CircularProgress';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Box from '@mui/material/Box';
|
||||
import { toPercent } from 'utils/number';
|
||||
import { toPercentString } from 'utils/number';
|
||||
import { getCurrentDateTimeLocale } from 'lib/globalize';
|
||||
import type { ItemDto } from 'types/base/models/item-dto';
|
||||
|
||||
@@ -36,7 +36,7 @@ function CircularProgressWithLabel(
|
||||
component='div'
|
||||
color='text.secondary'
|
||||
>
|
||||
{toPercent(props.value / 100, getCurrentDateTimeLocale())}
|
||||
{toPercentString(props.value / 100, getCurrentDateTimeLocale())}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
@@ -2,7 +2,7 @@ import './emby-progressring.scss';
|
||||
import 'webcomponents.js/webcomponents-lite';
|
||||
import template from './emby-progressring.template.html';
|
||||
import { getCurrentDateTimeLocale } from '../../lib/globalize';
|
||||
import { toPercent } from '../../utils/number.ts';
|
||||
import { toPercentString } from '../../utils/number.ts';
|
||||
|
||||
const EmbyProgressRing = Object.create(HTMLDivElement.prototype);
|
||||
|
||||
@@ -71,7 +71,7 @@ EmbyProgressRing.setProgress = function (progress) {
|
||||
this.querySelector('.animate-75-100-b').style.transform = 'rotate(' + angle + 'deg)';
|
||||
}
|
||||
|
||||
this.querySelector('.progressring-text').innerHTML = toPercent(progress / 100, getCurrentDateTimeLocale());
|
||||
this.querySelector('.progressring-text').innerHTML = toPercentString(progress / 100, getCurrentDateTimeLocale());
|
||||
};
|
||||
|
||||
EmbyProgressRing.attachedCallback = function () {
|
||||
|
||||
Reference in New Issue
Block a user