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,8 +1,10 @@
|
||||
import { Component, ComponentChildren, ContextType } from "preact";
|
||||
import { BCtx } from "./BContext.tsx";
|
||||
import { Ref, useRef, useState } from "preact/hooks";
|
||||
import type _TextField from "../server/md3/md-outlined-text-field.ts";
|
||||
import type { MdOutlinedTextField as _TextFieldE } from "../server/md3/md-outlined-text-field.ts";
|
||||
import type {
|
||||
_MdOutlinedTextField as _TextFieldE,
|
||||
MdOutlinedTextField as _TextField,
|
||||
} from "../server/md3.ts";
|
||||
import { MdOutlinedTextField } from "../server/dmodule.ts";
|
||||
import List from "preact-material-components/List";
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ 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;
|
||||
@@ -13,8 +14,10 @@ export default class CreateRootUser extends Component<Props> {
|
||||
declare context: ContextType<typeof GlobalCtx>;
|
||||
render() {
|
||||
if (!this.props.show) return null;
|
||||
if (!MdTonalButton.value) return null;
|
||||
const [username, set_username] = useState<string>();
|
||||
console.log(username);
|
||||
const [password, set_password] = useState<string>();
|
||||
const Button = MdTonalButton.value;
|
||||
return (
|
||||
<div>
|
||||
<BMd3TextField
|
||||
@@ -23,6 +26,20 @@ export default class CreateRootUser extends Component<Props> {
|
||||
value={username}
|
||||
set_value={set_username}
|
||||
/>
|
||||
<BMd3TextField
|
||||
label={t("user.password")}
|
||||
type="password"
|
||||
value={password}
|
||||
set_value={set_password}
|
||||
/>
|
||||
<Button
|
||||
disabled={false}
|
||||
onClick={() => {
|
||||
console.log("Click");
|
||||
}}
|
||||
>
|
||||
Login
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user