A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
Revert "feat: add password hide show logic for init server"
dashuai4232c4640d8a
diff --git a/ui/package.json b/ui/package.jsonindex da8588e6..0e645d2e 100644--- a/ui/package.json+++ b/ui/package.json@@ -39,7 +39,6 @@"qs": "^6.11.0","react": "^18.2.0","react-bootstrap": "^2.10.0",- "react-bootstrap-icons": "^1.11.5","react-dom": "^18.2.0","react-helmet-async": "^1.3.0","react-i18next": "^11.18.3",diff --git a/ui/pnpm-lock.yaml b/ui/pnpm-lock.yamlindex 8aa2dffb..32ce67e7 100644--- a/ui/pnpm-lock.yaml+++ b/ui/pnpm-lock.yaml@@ -77,9 +77,6 @@ importers:react-bootstrap:specifier: ^2.10.0- react-bootstrap-icons:- specifier: ^1.11.5- version: 1.11.5([email protected])react-dom:specifier: ^18.2.0version: 18.2.0([email protected])@@ -8179,7 +8176,7 @@ packages:dependencies:universalify: 2.0.0optionalDependencies:- graceful-fs: 4.2.11+ graceful-fs: 4.2.10resolution: {integrity: sha512-pfog5gdDxPdV4eP7Kg87M8/bHgshlZ5pybl+yKxAnCZ5O7lCIn7Ixydj03wOlnDQesky2BPyA91SQ+5Y/mNwzw==}@@ -9916,15 +9913,6 @@ packages:semver: 5.7.1dev: true- resolution: {integrity: sha512-eOhtFJMUqw98IJcfKJsSMZkFHCeNPTTwXZAe9V9d4mT22ARmbrISxPO9GmtWWuf72zQctLeZMGodX/q6wrbYYg==}- peerDependencies:- react: '>=16.8.6'- dependencies:- prop-types: 15.8.1- react: 18.2.0- dev: false-resolution: {integrity: sha512-87gRP69VAfeU2yKgp8RI3HvzhPNrnYIV2QNranYXataz3ef+k7OhvKGGdxQLQfUsQ2RTmlY66tn4pdFrZ94hNg==}peerDependencies:diff --git a/ui/src/pages/Install/components/FourthStep/index.tsx b/ui/src/pages/Install/components/FourthStep/index.tsxindex 066cd079..65ffd9d5 100644--- a/ui/src/pages/Install/components/FourthStep/index.tsx+++ b/ui/src/pages/Install/components/FourthStep/index.tsx@@ -17,9 +17,8 @@* under the License.*/-import { FC, FormEvent, useState } from 'react';+import { FC, FormEvent } from 'react';import { Form, Button } from 'react-bootstrap';-import { Eye, EyeSlash } from 'react-bootstrap-icons';import { useTranslation } from 'react-i18next';import type { FormDataType } from '@/common/interface';@@ -35,8 +34,6 @@ interface Props {const Index: FC<Props> = ({ visible, data, changeCallback, nextCallback }) => {const { t } = useTranslation('translation', { keyPrefix: 'install' });- const [showPassword, setShowPassword] = useState(false);-const checkValidated = (): boolean => {let bol = true;const { site_name, site_url, contact_email, name, password, email } = data;@@ -298,42 +295,21 @@ const Index: FC<Props> = ({ visible, data, changeCallback, nextCallback }) => {<Form.Group controlId="password" className="mb-3"><Form.Label>{t('admin_password.label')}</Form.Label>- <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',- }}- aria-label={showPassword ? t('hide_password') : t('show_password')}- onMouseDown={() => setShowPassword(true)}- onMouseUp={() => setShowPassword(false)}- onMouseLeave={() => setShowPassword(false)}>- {showPassword ? (- <Eye className="text-secondary" size={18} />- ) : (- <EyeSlash className="text-secondary" size={18} />- )}- </button>- </div>+ <Form.Control+ required+ type="password"+ value={data.password.value}+ isInvalid={data.password.isInvalid}+ onChange={(e) => {+ changeCallback({+ password: {+ value: e.target.value,+ isInvalid: false,+ errorMsg: '',+ },+ });+ }}+ /><Form.Text>{t('admin_password.text')}</Form.Text><Form.Control.Feedback type="invalid">{data.password.errorMsg}