feat(webui): add login password field with show/hide toggle#71
Open
no-ai-world wants to merge 1 commit into
Open
feat(webui): add login password field with show/hide toggle#71no-ai-world wants to merge 1 commit into
no-ai-world wants to merge 1 commit into
Conversation
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动内容
登录页 Admin Token 输入框从
text改为password类型,并在输入框右侧增加显示/隐藏切换按钮。具体变更
webui/src/features/auth/LoginPage.tsxEye/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:绝对定位,垂直居中于输入框右侧