You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-29 05:21:38 +02:00
feat(web): improved server stats (#1870)
* feat(web): improved server stats
* fix(web): don't log unauthorized errors
* Revert "fix(web): don't log unauthorized errors"
This reverts commit 7fc2987a77
.
This commit is contained in:
@ -38,8 +38,7 @@ export function getBytesWithUnit(bytes: number, maxPrecision = 1): [number, stri
|
||||
* @param maxPrecision maximum number of decimal places, default is `1`
|
||||
* @returns localized bytes with unit as string
|
||||
*/
|
||||
export function asByteUnitString(bytes: number, maxPrecision = 1): string {
|
||||
const locale = Array.from(navigator.languages);
|
||||
export function asByteUnitString(bytes: number, locale?: string, maxPrecision = 1): string {
|
||||
const [size, unit] = getBytesWithUnit(bytes, maxPrecision);
|
||||
return `${size.toLocaleString(locale)} ${unit}`;
|
||||
}
|
||||
|
Reference in New Issue
Block a user