import { Component, ContextType } from "preact"; import { GlobalCtx } from "./GlobalContext.tsx"; import BMd3TextField from "./BMd3TextField.tsx"; import t from "../server/i18n.ts"; import { useState } from "preact/hooks"; import { MdTonalButton } from "../server/dmodule.ts"; type Props = { show: boolean; }; export default class CreateRootUser extends Component { static contextType = GlobalCtx; declare context: ContextType; render() { if (!this.props.show) return null; if (!MdTonalButton.value) return null; const [username, set_username] = useState(); const [password, set_password] = useState(); const Button = MdTonalButton.value; return (
); } }