Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Added frontend for maxplayers #75

Merged
merged 2 commits into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/src/pages/Server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ export const Server = ({id, className}: Props) => {
<TabList className={'w-full'}>
<Tab variant="plain" indicatorInset color="neutral">Console</Tab>
<Tab variant="plain" indicatorInset color="neutral">General Settings</Tab>
{/*<Tab variant="plain" indicatorInset color="neutral">Server Settings</Tab>*/}
<Tab variant="plain" indicatorInset color="neutral">Server Settings</Tab>
<Tab variant="plain" indicatorInset color="neutral">Administration</Tab>
</TabList>
<Console serv={serv} setServ={setServ} serverStatus={serverStatus}/>
<General serv={serv} setServ={setServ}/>
{/*<Settings setServ={setServ} serv={serv}></Settings>*/}
<Settings setServ={setServ} serv={serv}></Settings>
<Administration serv={serv} setServ={setServ} onServerFilesDeleted={() => CheckServerInstalled(serv.id).then((val) => setIsInstalled(val)).catch((reason) => console.error(reason))}/>
</Tabs>) : (<InstallUpdater serv={serv} setServ={setServ} onInstalled={() => setIsInstalled(true)}/>)}
</Card>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/server/Administration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function Administration({setServ, serv, onServerFilesDeleted}: Props) {


return (
<TabPanel value={2} className={'space-y-8'}>
<TabPanel value={3} className={'space-y-8'}>
<Card variant="soft" className={''}>
<Typography level="title-md">
Server Administration
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/pages/server/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ export function Settings({setServ, serv}: Props) {
<div className={'inline-block'}>
<FormLabel>Mods (e.g.: modid1,modid2,modid3)</FormLabel>
<Input className={"w-[60vw]"} value={serv?.mods} onChange={(e) => setServ((p) => ({ ...p, mods: e.target.value }))}></Input>
<FormLabel>Player limit</FormLabel>
<Input className={"w-3/12"} value={serv?.maxPlayers} type={"number"} onChange={(e) => {
if (parseInt(e.target.value) > 0) {
setServ((p) => ({...p, maxPlayers: parseInt(e.target.value)}))
}}}></Input>
</div>
</div>
</Card>
Expand Down
Loading