Merge pull request #2089 from Sir3lit/changedatabases

Database page edits, Shows message x of x databases when limit > 0, removes create button once limit is reached.
This commit is contained in:
Dane Everitt 2020-06-23 19:27:00 -07:00 committed by GitHub
commit 173b75d44d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,6 +36,11 @@ export default () => {
return (
<PageContentBlock>
<FlashMessageRender byKey={'databases'} className={'mb-4'}/>
{featureLimits.databases !== 0 &&
<p className="text-center text-md text-neutral-400">
You are currently using {databases.length} of {featureLimits.databases} databases.
</p>
}
{(!databases.length && loading) ?
<Spinner size={'large'} centered={true}/>
:
@ -59,7 +64,7 @@ export default () => {
</p>
}
<Can action={'database.create'}>
{featureLimits.databases > 0 &&
{featureLimits.databases > 0 && featureLimits.databases !== databases.length &&
<div className={'mt-6 flex justify-end'}>
<CreateDatabaseButton/>
</div>