mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2024-12-25 02:29:45 +02:00
always use server.running
as boolean
This commit is contained in:
parent
62ea775690
commit
6de3872b2b
@ -7,7 +7,6 @@ const Console = ({serverStatus}) => {
|
||||
|
||||
const [logs, setLogs] = useState([]);
|
||||
const consoleInput = useRef(null);
|
||||
const isRunning = serverStatus.status === 'running';
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@ -29,7 +28,7 @@ const Console = ({serverStatus}) => {
|
||||
<Panel
|
||||
title="Console"
|
||||
content={
|
||||
isRunning
|
||||
serverStatus.running
|
||||
? <>
|
||||
<ul>
|
||||
{logs?.map((log, i) => (<li key={i}>{log}</li>))}
|
||||
@ -52,4 +51,4 @@ const Console = ({serverStatus}) => {
|
||||
)
|
||||
}
|
||||
|
||||
export default Console;
|
||||
export default Console;
|
||||
|
@ -103,7 +103,7 @@ const Mods = ({serverStatus}) => {
|
||||
.then(fetchInstalledMods)
|
||||
}
|
||||
|
||||
let disabled = serverStatus.status !== "stopped"
|
||||
let disabled = serverStatus.running
|
||||
|
||||
return (
|
||||
<div>
|
||||
@ -179,4 +179,4 @@ const Mods = ({serverStatus}) => {
|
||||
)
|
||||
}
|
||||
|
||||
export default Mods;
|
||||
export default Mods;
|
||||
|
@ -38,7 +38,7 @@ const Saves = ({serverStatus}) => {
|
||||
title="Create Save"
|
||||
className="lg:w-1/2 lg:mr-3 mb-6 lg:mb-0"
|
||||
content={
|
||||
serverStatus.status === "running"
|
||||
serverStatus.running
|
||||
? <p className="text-red-light pt-4 pb-24">
|
||||
Create a new Save is only possible if the Factorio server is
|
||||
not running.
|
||||
@ -95,4 +95,4 @@ const Saves = ({serverStatus}) => {
|
||||
)
|
||||
}
|
||||
|
||||
export default Saves;
|
||||
export default Saves;
|
||||
|
Loading…
Reference in New Issue
Block a user