Show danger alert to front end user

This commit is contained in:
Lance Pioch 2022-11-08 21:14:25 -05:00
parent 032e4f2e31
commit b623902c19

View file

@ -20,6 +20,7 @@ const ServerConsoleContainer = () => {
const isTransferring = ServerContext.useStoreState((state) => state.server.data!.isTransferring);
const eggFeatures = ServerContext.useStoreState((state) => state.server.data!.eggFeatures, isEqual);
const isNodeUnderMaintenance = ServerContext.useStoreState((state) => state.server.data!.isNodeUnderMaintenance);
const isSuspended = ServerContext.useStoreState((state) => state.server.data!.status === 'suspended');
return (
<ServerContentBlock title={'Console'}>
@ -32,6 +33,11 @@ const ServerConsoleContainer = () => {
: 'This server is currently being transferred to another node and all actions are unavailable.'}
</Alert>
)}
{isSuspended && (
<Alert type={'danger'} className={'mb-4'}>
This server is currently suspended.
</Alert>
)}
<div className={'grid grid-cols-4 gap-4 mb-4'}>
<div className={'hidden sm:block sm:col-span-2 lg:col-span-3 pr-4'}>
<h1 className={'font-header text-2xl text-gray-50 leading-relaxed line-clamp-1'}>{name}</h1>