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>))}
|
||||
|
@ -103,7 +103,7 @@ const Mods = ({serverStatus}) => {
|
||||
.then(fetchInstalledMods)
|
||||
}
|
||||
|
||||
let disabled = serverStatus.status !== "stopped"
|
||||
let disabled = serverStatus.running
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user