diff --git a/ui/v2.5/src/components/Changelog/Changelog.tsx b/ui/v2.5/src/components/Changelog/Changelog.tsx
index 250ba2534..1d8d321e8 100644
--- a/ui/v2.5/src/components/Changelog/Changelog.tsx
+++ b/ui/v2.5/src/components/Changelog/Changelog.tsx
@@ -50,7 +50,6 @@ const Changelog: React.FC = () => {
date="2020-11-24"
openState={openState}
setOpenState={setVersionOpenState}
- defaultOpen
>
-
@@ -36,7 +41,12 @@ export const Stats: React.FC = () => {
-
diff --git a/ui/v2.5/src/utils/text.ts b/ui/v2.5/src/utils/text.ts index 4d2182c8e..3a919b6be 100644 --- a/ui/v2.5/src/utils/text.ts +++ b/ui/v2.5/src/utils/text.ts @@ -40,6 +40,16 @@ const formatFileSizeUnit = (u: Unit) => { return shortUnits[i]; }; +// returns the number of fractional digits to use when displaying file sizes +// returns 0 for MB and under, 1 for GB and over. +const fileSizeFractionalDigits = (unit: Unit) => { + if (Units.indexOf(unit) >= 3) { + return 1; + } + + return 0; +}; + const secondsToTimestamp = (seconds: number) => { let ret = new Date(seconds * 1000).toISOString().substr(11, 8); @@ -163,6 +173,7 @@ const formatDate = (intl: IntlShape, date?: string) => { const TextUtils = { fileSize, formatFileSizeUnit, + fileSizeFractionalDigits, secondsToTimestamp, fileNameFromPath, age: getAge,