This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
import VisibilityIcon from '@mui/icons-material/Visibility';
|
import VisibilityIcon from "@mui/icons-material/Visibility";
|
||||||
import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
|
import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
CircularProgress,
|
CircularProgress,
|
||||||
@ -36,7 +36,9 @@ export function LoginRoute(): React.ReactElement {
|
|||||||
const canSubmit = username.length > 0 && password.length > 0;
|
const canSubmit = username.length > 0 && password.length > 0;
|
||||||
|
|
||||||
const [showPassword, setShowPassword] = React.useState(false);
|
const [showPassword, setShowPassword] = React.useState(false);
|
||||||
const handleClickShowPassword = () => { setShowPassword((show) => !show); };
|
const handleClickShowPassword = () => {
|
||||||
|
setShowPassword((show) => !show);
|
||||||
|
};
|
||||||
|
|
||||||
const handleMouseDownPassword = (
|
const handleMouseDownPassword = (
|
||||||
event: React.MouseEvent<HTMLButtonElement>
|
event: React.MouseEvent<HTMLButtonElement>
|
||||||
@ -105,12 +107,14 @@ export function LoginRoute(): React.ReactElement {
|
|||||||
label="Username"
|
label="Username"
|
||||||
name="username"
|
name="username"
|
||||||
value={username}
|
value={username}
|
||||||
onChange={(e) => { setUsername(e.target.value); }}
|
onChange={(e) => {
|
||||||
|
setUsername(e.target.value);
|
||||||
|
}}
|
||||||
autoComplete="username"
|
autoComplete="username"
|
||||||
autoFocus
|
autoFocus
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormControl fullWidth variant="outlined">
|
<FormControl required fullWidth variant="outlined">
|
||||||
<InputLabel htmlFor="password">Password</InputLabel>
|
<InputLabel htmlFor="password">Password</InputLabel>
|
||||||
<OutlinedInput
|
<OutlinedInput
|
||||||
required
|
required
|
||||||
@ -120,7 +124,9 @@ export function LoginRoute(): React.ReactElement {
|
|||||||
type={showPassword ? "text" : "password"}
|
type={showPassword ? "text" : "password"}
|
||||||
id="password"
|
id="password"
|
||||||
value={password}
|
value={password}
|
||||||
onChange={(e) => { setPassword(e.target.value); }}
|
onChange={(e) => {
|
||||||
|
setPassword(e.target.value);
|
||||||
|
}}
|
||||||
autoComplete="current-password"
|
autoComplete="current-password"
|
||||||
endAdornment={
|
endAdornment={
|
||||||
<InputAdornment position="end">
|
<InputAdornment position="end">
|
||||||
@ -131,7 +137,11 @@ export function LoginRoute(): React.ReactElement {
|
|||||||
onMouseDown={handleMouseDownPassword}
|
onMouseDown={handleMouseDownPassword}
|
||||||
edge="end"
|
edge="end"
|
||||||
>
|
>
|
||||||
{showPassword ? <VisibilityOffIcon /> : <VisibilityIcon />}
|
{showPassword ? (
|
||||||
|
<VisibilityOffIcon />
|
||||||
|
) : (
|
||||||
|
<VisibilityIcon />
|
||||||
|
)}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</InputAdornment>
|
</InputAdornment>
|
||||||
|
@ -25,6 +25,8 @@ export function OEMStringFormWidget(p: {
|
|||||||
p.onChange?.();
|
p.onChange?.();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!p.editable && p.vm.oem_strings.length === 0) return <></>;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EditSection
|
<EditSection
|
||||||
title="SMBIOS OEM Strings"
|
title="SMBIOS OEM Strings"
|
||||||
|
Reference in New Issue
Block a user