Add size for when downloaded
This commit is contained in:
@@ -81,10 +81,10 @@ export default function VersionInfo () {
|
|||||||
<FontAwesomeIcon icon={faCode} color='lightgray' />
|
<FontAwesomeIcon icon={faCode} color='lightgray' />
|
||||||
<p>Developer: {gameInfo?.developer}</p>
|
<p>Developer: {gameInfo?.developer}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className='entry-info-item'>
|
<div className='entry-info-item' hidden={versionSize === null}>
|
||||||
<FontAwesomeIcon icon={faHardDrive} color='lightgray' />
|
<FontAwesomeIcon icon={faHardDrive} color='lightgray' />
|
||||||
<p>
|
<p>
|
||||||
Size:{' '}
|
Size on disk:{' '}
|
||||||
{versionSize !== null
|
{versionSize !== null
|
||||||
? prettyBytes(versionSize, {
|
? prettyBytes(versionSize, {
|
||||||
minimumFractionDigits: 2,
|
minimumFractionDigits: 2,
|
||||||
@@ -93,6 +93,18 @@ export default function VersionInfo () {
|
|||||||
: 'Loading...'}
|
: 'Loading...'}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div className='entry-info-item' hidden={!versionInfo}>
|
||||||
|
<FontAwesomeIcon icon={faHardDrive} color='lightgray' />
|
||||||
|
<p>
|
||||||
|
Size when downloaded (zipped):{' '}
|
||||||
|
{versionInfo
|
||||||
|
? prettyBytes(versionInfo.size, {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2
|
||||||
|
})
|
||||||
|
: 'Loading...'}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ export interface GameVersion {
|
|||||||
downloadUrl: string
|
downloadUrl: string
|
||||||
executable: string
|
executable: string
|
||||||
sha512sum: string
|
sha512sum: string
|
||||||
|
size: number
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user