File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
resources/scripts/components/server/backups Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { ServerContext } from '@/state/server';
1212import PageContentBlock from '@/components/elements/PageContentBlock' ;
1313
1414export default ( ) => {
15- const { uuid } = useServer ( ) ;
15+ const { uuid, featureLimits } = useServer ( ) ;
1616 const { addError, clearFlashes } = useFlash ( ) ;
1717 const [ loading , setLoading ] = useState ( true ) ;
1818
@@ -37,6 +37,11 @@ export default () => {
3737 return (
3838 < PageContentBlock >
3939 < FlashMessageRender byKey = { 'backups' } className = { 'mb-4' } />
40+ { featureLimits . backups !== 0 &&
41+ < p className = "text-center text-md text-neutral-400" >
42+ You are currently using { backups . length } of { featureLimits . backups } backups.
43+ </ p >
44+ }
4045 { ! backups . length ?
4146 < p className = "text-center text-sm text-neutral-400" >
4247 There are no backups stored for this server.
@@ -50,10 +55,17 @@ export default () => {
5055 /> ) }
5156 </ div >
5257 }
58+ { featureLimits . backups === 0 &&
59+ < p className = "text-center text-sm text-neutral-400" >
60+ Backups cannot be created for this server.
61+ </ p >
62+ }
5363 < Can action = { 'backup.create' } >
64+ { featureLimits . backups > 0 && featureLimits . backups !== backups . length &&
5465 < div className = { 'mt-6 flex justify-end' } >
5566 < CreateBackupButton />
5667 </ div >
68+ }
5769 </ Can >
5870 </ PageContentBlock >
5971 ) ;
You can’t perform that action at this time.
0 commit comments