Merge pull request #3148 from mammut53/develop

Fix displaying wrong backup number on pages
This commit is contained in:
Dane Everitt 2021-03-06 19:15:26 -08:00 committed by GitHub
commit 7e0efbdecd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,12 +65,12 @@ const BackupContainer = () => {
} }
<Can action={'backup.create'}> <Can action={'backup.create'}>
<div css={tw`mt-6 sm:flex items-center justify-end`}> <div css={tw`mt-6 sm:flex items-center justify-end`}>
{(backupLimit > 0 && backups.items.length > 0) && {(backupLimit > 0 && backups.pagination.total > 0) &&
<p css={tw`text-sm text-neutral-300 mb-4 sm:mr-6 sm:mb-0`}> <p css={tw`text-sm text-neutral-300 mb-4 sm:mr-6 sm:mb-0`}>
{backups.items.length} of {backupLimit} backups have been created for this server. {backups.pagination.total} of {backupLimit} backups have been created for this server.
</p> </p>
} }
{backupLimit > 0 && backupLimit !== backups.items.length && {backupLimit > 0 && backupLimit !== backups.pagination.total &&
<CreateBackupButton css={tw`w-full sm:w-auto`}/> <CreateBackupButton css={tw`w-full sm:w-auto`}/>
} }
</div> </div>