, 'type'> {
+ autoComplete: string
+ initiallyRevealed?: boolean
+}
+
+export function PasswordInput({ autoComplete, initiallyRevealed = false, ...inputProps }: PasswordInputProps) {
+ const [revealed, setRevealed] = useState(initiallyRevealed)
+ return (
+
+
+
+
+ )
+}
diff --git a/web/src/auth.tsx b/web/src/auth.tsx
index 5278b57..d52e1f9 100644
--- a/web/src/auth.tsx
+++ b/web/src/auth.tsx
@@ -1,5 +1,6 @@
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react'
import type { ReactNode } from 'react'
+import { PasswordInput } from './PasswordInput'
export type AuthRole = 'viewer' | 'engineer' | 'admin'
@@ -153,7 +154,7 @@ export function LoginScreen() {
知识治理平台
登录后所有操作将记录到你名下
-
+
{error ? {error}
: null}
@@ -185,9 +186,9 @@ export function MustChangePasswordScreen() {