import React, { Fragment, useContext } from "react";
import { Button, Card, Divider, Form, Image, Input, Space, Typography } from "antd";
import LockOutlined from "@ant-design/icons/LockOutlined";
import logo from "../images/logo.png";
import ControlContext from "./ControlContext";
const { Paragraph } = Typography;
function TokenAuth(props) {
return <>
If you have generated an authentication token from the master server, use that here.
}
type="password"
placeholder="Authentication Token"
/>
>;
}
export default function LoginForm(props) {
let plugins = useContext(ControlContext).plugins;
let loginForms = [];
for (let plugin of plugins.values()) {
loginForms.push(...plugin.loginForms);
}
loginForms.push({
name: "core.token",
title: "Token",
Component: TokenAuth,
});
return
Clusterio
Log in to the cluster using one of the methods below.
{loginForms.map(form => {form.title})}
;
}