diff --git a/apps/client/src/features/app-settings/panel/shutdown-panel/ShutdownPanel.tsx b/apps/client/src/features/app-settings/panel/shutdown-panel/ShutdownPanel.tsx index 21f192df4..e6b203b54 100644 --- a/apps/client/src/features/app-settings/panel/shutdown-panel/ShutdownPanel.tsx +++ b/apps/client/src/features/app-settings/panel/shutdown-panel/ShutdownPanel.tsx @@ -11,7 +11,7 @@ import { } from '@chakra-ui/react'; import { useElectronEvent } from '../../../../common/hooks/useElectronEvent'; -import { isLocalhost } from '../../../../externals'; +import { isLocalhost, isOntimeCloud } from '../../../../externals'; import * as Panel from '../../panel-utils/PanelUtils'; export default function ShutdownPanel() { @@ -24,18 +24,28 @@ export default function ShutdownPanel() { onClose(); }; + const canShutdown = isElectron || isLocalhost; + return ( <> Shutdown Ontime - - This will shutdown the Ontime server.
- The runtime state will be lost, but your project is kept for next time. -
+ {isOntimeCloud ? ( + + For security reasons, shutting down the server must be done from the Ontime Cloud dashboard. + + ) : ( + + This will shutdown the Ontime server.
+ The runtime state will be lost, but your project is kept for next time. +
+ )} - Note: Ontime can only be shutdown from the machine it is running in. + {!canShutdown && ( + Note: Ontime can only be shutdown from the machine it is running in. + )} @@ -49,7 +59,7 @@ export default function ShutdownPanel() { -