mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-08 01:31:00 +08:00
Update
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { Component, ContextType } from "preact";
|
||||
import { GlobalCtx } from "./GlobalContext.tsx";
|
||||
import { MdOutlinedTextField } from "../server/dmodule.ts";
|
||||
import BMd3TextField from "./BMd3TextField.tsx";
|
||||
import t from "../server/i18n.ts";
|
||||
import { useState } from "preact/hooks";
|
||||
|
||||
type Props = {
|
||||
show: boolean;
|
||||
@@ -10,12 +12,17 @@ export default class CreateRootUser extends Component<Props> {
|
||||
static contextType = GlobalCtx;
|
||||
declare context: ContextType<typeof GlobalCtx>;
|
||||
render() {
|
||||
if (!MdOutlinedTextField.value) return null;
|
||||
if (!this.props.show) return null;
|
||||
const OutlinedTextField = MdOutlinedTextField.value;
|
||||
const [username, set_username] = useState<string>();
|
||||
console.log(username);
|
||||
return (
|
||||
<div>
|
||||
<OutlinedTextField />
|
||||
<BMd3TextField
|
||||
label={t("user.username")}
|
||||
type="text"
|
||||
value={username}
|
||||
set_value={set_username}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user