Skip to content

feat(webui): add login password field with show/hide toggle#71

Open
no-ai-world wants to merge 1 commit into
Resinat:masterfrom
no-ai-world:feat/login-password-field
Open

feat(webui): add login password field with show/hide toggle#71
no-ai-world wants to merge 1 commit into
Resinat:masterfrom
no-ai-world:feat/login-password-field

Conversation

@no-ai-world

Copy link
Copy Markdown

改动内容

登录页 Admin Token 输入框从 text 改为 password 类型,并在输入框右侧增加显示/隐藏切换按钮。

具体变更

webui/src/features/auth/LoginPage.tsx

  • 引入 Eye / EyeOff 图标
  • 新增 isPasswordVisible 状态(默认 false,密码遮蔽)
  • Input 组件传入 type={isPasswordVisible ? "text" : "password"}
  • .input-with-icon 容器内追加 Button,点击切换 isPasswordVisible,图标在 Eye / EyeOff 间切换

webui/src/i18n/translations.ts

  • 新增 "显示" → "Show""隐藏" → "Hide" 翻译条目

webui/src/styles/theme.css

  • .login-form .input-with-icon 设为 position: relative
  • .login-form .input-with-icon .input 右侧留 padding-right: 46px,防止文字与按钮重叠
  • 新增 .password-visibility-toggle:绝对定位,垂直居中于输入框右侧

@no-ai-world

Copy link
Copy Markdown
Author

@Resinat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant