diff --git a/resources/scripts/components/server/console/ServerDetailsBlock.tsx b/resources/scripts/components/server/console/ServerDetailsBlock.tsx index 9f0063878..da105174a 100644 --- a/resources/scripts/components/server/console/ServerDetailsBlock.tsx +++ b/resources/scripts/components/server/console/ServerDetailsBlock.tsx @@ -15,6 +15,7 @@ import UptimeDuration from '@/components/server/UptimeDuration'; import StatBlock from '@/components/server/console/StatBlock'; import useWebsocketEvent from '@/plugins/useWebsocketEvent'; import classNames from 'classnames'; +import { capitalize } from '@/lib/strings'; type Stats = Record<'memory' | 'cpu' | 'disk' | 'uptime' | 'rx' | 'tx', number>; @@ -97,7 +98,13 @@ const ServerDetailsBlock = ({ className }: { className?: string }) => { title={'Uptime'} color={getBackgroundColor(status === 'running' ? 0 : status !== 'offline' ? 9 : 10, 10)} > - {stats.uptime > 0 ? : 'Offline'} + {status === 'starting' || status === 'stopping' ? ( + capitalize(status) + ) : stats.uptime > 0 ? ( + + ) : ( + 'Offline' + )} {status === 'offline' ? (