You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by "lhui (via GitHub)" <gi...@apache.org> on 2025/01/15 16:12:46 UTC
[PR] feat: add password hide show logic for init server [answer]
lhui opened a new pull request, #1234:
URL: https://github.com/apache/answer/pull/1234
Hi team,
I have implemented the eye icon (👀) feature that allows users to toggle password visibility during the installation process. Please review the changes. Thank you.
link issue #1228
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add password hide show logic for init server [answer]
Posted by "shuashuai (via GitHub)" <gi...@apache.org>.
shuashuai commented on code in PR #1234:
URL: https://github.com/apache/answer/pull/1234#discussion_r1919700464
##########
ui/package.json:
##########
@@ -39,6 +39,7 @@
"qs": "^6.11.0",
"react": "^18.2.0",
"react-bootstrap": "^2.10.0",
+ "react-bootstrap-icons": "^1.11.5",
Review Comment:
No need to add this library, we have introduced bootstrap-icons globally; just use our built-in [Icon component](https://github.com/apache/answer/tree/main/ui/src/components/Icon) to use icons
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add password hide show logic for init server [answer]
Posted by "lhui (via GitHub)" <gi...@apache.org>.
lhui commented on PR #1234:
URL: https://github.com/apache/answer/pull/1234#issuecomment-2599766135
Hi @shuashuai I will try to fix above. thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add password hide show logic for init server [answer]
Posted by "lhui (via GitHub)" <gi...@apache.org>.
lhui commented on PR #1234:
URL: https://github.com/apache/answer/pull/1234#issuecomment-2602698804
Hi @shuashuai I have refactored and tested the above code. Please review the changes. Thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add password hide show logic for init server [answer]
Posted by "shuashuai (via GitHub)" <gi...@apache.org>.
shuashuai commented on code in PR #1234:
URL: https://github.com/apache/answer/pull/1234#discussion_r1919727414
##########
ui/src/pages/Install/components/FourthStep/index.tsx:
##########
@@ -295,21 +298,42 @@ const Index: FC<Props> = ({ visible, data, changeCallback, nextCallback }) => {
<Form.Group controlId="password" className="mb-3">
<Form.Label>{t('admin_password.label')}</Form.Label>
- <Form.Control
- required
- type="password"
- value={data.password.value}
- isInvalid={data.password.isInvalid}
- onChange={(e) => {
- changeCallback({
- password: {
- value: e.target.value,
- isInvalid: false,
- errorMsg: '',
- },
- });
- }}
- />
+ <div className="position-relative">
+ <Form.Control
+ required
+ type={showPassword ? 'text' : 'password'}
+ value={data.password.value}
+ isInvalid={data.password.isInvalid}
+ style={{ paddingRight: '45px' }}
+ onChange={(e) => {
+ changeCallback({
+ password: {
+ value: e.target.value,
+ isInvalid: false,
+ errorMsg: '',
+ },
+ });
+ }}
+ />
+ <button
+ type="button"
+ className="position-absolute top-50 translate-middle-y bg-transparent border-0"
+ style={{
+ cursor: 'pointer',
+ right: '12px',
+ padding: '4px',
+ }}
Review Comment:
1. `padding: '4px'` can be replaced by class p-1
2. `cursor: 'pointer'` can be removed, the hover effect of button is curosr
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add password hide show logic for init server [answer]
Posted by "shuashuai (via GitHub)" <gi...@apache.org>.
shuashuai merged PR #1234:
URL: https://github.com/apache/answer/pull/1234
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org