chore(xo-web/xoa/update): hide XOA build number when unknown (#4973)

This commit is contained in:
Pierre Donias 2020-05-05 14:15:44 +02:00 committed by GitHub
parent 40c37d923b
commit 4aa87f3fa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -263,7 +263,7 @@ const Updates = decorate([
.join('\n'),
proxyFormId: generateId,
xoaBuild: async () => {
const { build = 'unknown' } = await getApplianceInfo().catch(error => {
const { build } = await getApplianceInfo().catch(error => {
console.warn('getApplianceInfo', error)
return {}
})
@ -305,12 +305,17 @@ const Updates = decorate([
<p>
{xoVersion !== undefined && (
<span>
{_('currentVersion')} {xoVersion} -{' '}
{_('currentVersion')} {xoVersion}
</span>
)}
<span className='text-muted'>
{_('xoaBuild')} {state.xoaBuild}
</span>{' '}
{xoVersion !== undefined &&
state.xoaBuild !== undefined &&
' - '}
{state.xoaBuild !== undefined && (
<span className='text-muted'>
{_('xoaBuild')} {state.xoaBuild}
</span>
)}{' '}
{state.installedPackages !== undefined && (
<Button
name='showPackagesList'