Active player list

This commit is contained in:
2023-10-04 04:09:01 -06:00
parent 4a4563ba85
commit b63db82a99
27 changed files with 544 additions and 136 deletions

View File

@@ -4,7 +4,7 @@ import { Content } from "../../components/Content.tsx";
import { SERVER_STATE } from "../../state/serverState.ts";
export const handler: Handlers = {
async POST(req, _ctx) {
POST(req, _ctx) {
const url = new URL(req.url);
SERVER_STATE.acceptEULA();
return Response.redirect(url.origin + '/setup/start');

View File

@@ -1,27 +0,0 @@
import { Handlers } from "$fresh/server.ts";
import { Content } from "../../components/Content.tsx";
import { Terminal } from "../../islands/terminal.tsx";
import { SERVER_STATE } from "../../state/serverState.ts";
export const handler: Handlers = {
async GET(req,ctx) {
if (!SERVER_STATE.eulaAccepted) {
const url = new URL(req.url);
return Response.redirect(`${url.origin}/setup/eula`)
}
const res = await ctx.render();
return res;
}
}
export default function StartFabric() {
SERVER_STATE.startMCServer();
return (
<div class="container p-8">
<Content>
<Terminal channelId={SERVER_STATE.channelId} />
</Content>
</div>
);
}