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.
fix: plugin oauth ui changed
shuai1e955a3495e4
diff --git a/ui/src/pages/Admin/Plugins/Installed/index.tsx b/ui/src/pages/Admin/Plugins/Installed/index.tsxindex 7245035e..658c2530 100644--- a/ui/src/pages/Admin/Plugins/Installed/index.tsx+++ b/ui/src/pages/Admin/Plugins/Installed/index.tsx@@ -72,11 +72,11 @@ const Users: FC = () => {<Table><thead><tr>- <th style={{ width: '12%' }}>{t('name')}</th>- <th style={{ width: '20%' }}>{t('version')}</th>- <th style={{ width: '12%' }}>{t('status')}</th>+ <th>{t('name')}</th>+ <th style={{ width: '17%' }}>{t('version')}</th>+ <th style={{ width: '11%' }}>{t('status')}</th>{curFilter !== 'deleted' ? (- <th style={{ width: '8%' }} className="text-end">+ <th style={{ width: '11%' }} className="text-end">{t('action')}</th>) : null}@@ -88,9 +88,7 @@ const Users: FC = () => {<tr key={plugin.slug_name}><td><div>{plugin.name}</div>- <div className="text-muted text-small">- {plugin.description}- </div>+ <div className="fs-14">{plugin.description}</div></td><td className="text-break">{plugin.version}</td><td>diff --git a/ui/src/pages/Admin/index.tsx b/ui/src/pages/Admin/index.tsxindex b62421cc..03f2af3b 100644--- a/ui/src/pages/Admin/index.tsx+++ b/ui/src/pages/Admin/index.tsx@@ -23,6 +23,7 @@ const formPaths = ['seo','themes','css-html',+ 'github_connector',];const Index: FC = () => {diff --git a/ui/src/pages/Users/Register/components/SignUpForm/index.tsx b/ui/src/pages/Users/Register/components/SignUpForm/index.tsxindex 56c51f52..cdbc641e 100644--- a/ui/src/pages/Users/Register/components/SignUpForm/index.tsx+++ b/ui/src/pages/Users/Register/components/SignUpForm/index.tsx@@ -1,5 +1,5 @@import React, { FormEvent, MouseEvent, useEffect, useState } from 'react';-import { Form, Button, Col } from 'react-bootstrap';+import { Form, Button } from 'react-bootstrap';import { Link } from 'react-router-dom';import { Trans, useTranslation } from 'react-i18next';@@ -177,112 +177,111 @@ const Index: React.FC<Props> = ({ callback }) => {}, []);return (<>- <Col className="mx-auto" md={3}>- <Form noValidate onSubmit={handleSubmit} autoComplete="off">- <Form.Group controlId="name" className="mb-3">- <Form.Label>{t('name.label')}</Form.Label>- <Form.Control- autoComplete="off"- required- type="text"- isInvalid={formData.name.isInvalid}- value={formData.name.value}- onChange={(e) =>- handleChange({- name: {- value: e.target.value,- isInvalid: false,- errorMsg: '',- },- })- }- />- <Form.Control.Feedback type="invalid">- {formData.name.errorMsg}- </Form.Control.Feedback>- </Form.Group>- <Form.Group controlId="email" className="mb-3">- <Form.Label>{t('email.label')}</Form.Label>- <Form.Control- autoComplete="off"- required- type="e_mail"- isInvalid={formData.e_mail.isInvalid}- value={formData.e_mail.value}- onChange={(e) =>- handleChange({- e_mail: {- value: e.target.value,- isInvalid: false,- errorMsg: '',- },- })- }- />- <Form.Control.Feedback type="invalid">- {formData.e_mail.errorMsg}- </Form.Control.Feedback>- </Form.Group>+ <Form noValidate onSubmit={handleSubmit} autoComplete="off">+ <Form.Group controlId="name" className="mb-3">+ <Form.Label>{t('name.label')}</Form.Label>+ <Form.Control+ autoComplete="off"+ required+ type="text"+ isInvalid={formData.name.isInvalid}+ value={formData.name.value}+ onChange={(e) =>+ handleChange({+ name: {+ value: e.target.value,+ isInvalid: false,+ errorMsg: '',+ },+ })+ }+ />+ <Form.Control.Feedback type="invalid">+ {formData.name.errorMsg}+ </Form.Control.Feedback>+ </Form.Group>+ <Form.Group controlId="email" className="mb-3">+ <Form.Label>{t('email.label')}</Form.Label>+ <Form.Control+ autoComplete="off"+ required+ type="e_mail"+ isInvalid={formData.e_mail.isInvalid}+ value={formData.e_mail.value}+ onChange={(e) =>+ handleChange({+ e_mail: {+ value: e.target.value,+ isInvalid: false,+ errorMsg: '',+ },+ })+ }+ />+ <Form.Control.Feedback type="invalid">+ {formData.e_mail.errorMsg}+ </Form.Control.Feedback>+ </Form.Group>- <Form.Group controlId="password" className="mb-3">- <Form.Label>{t('password.label')}</Form.Label>- <Form.Control- autoComplete="off"- required- type="password"- maxLength={32}- isInvalid={formData.pass.isInvalid}- value={formData.pass.value}- onChange={(e) =>- handleChange({- pass: {- value: e.target.value,- isInvalid: false,- errorMsg: '',- },- })- }- />- <Form.Control.Feedback type="invalid">- {formData.pass.errorMsg}- </Form.Control.Feedback>- </Form.Group>+ <Form.Group controlId="password" className="mb-3">+ <Form.Label>{t('password.label')}</Form.Label>+ <Form.Control+ autoComplete="off"+ required+ type="password"+ maxLength={32}+ isInvalid={formData.pass.isInvalid}+ value={formData.pass.value}+ onChange={(e) =>+ handleChange({+ pass: {+ value: e.target.value,+ isInvalid: false,+ errorMsg: '',+ },+ })+ }+ />+ <Form.Control.Feedback type="invalid">+ {formData.pass.errorMsg}+ </Form.Control.Feedback>+ </Form.Group>- <div className="d-grid">- <Button variant="primary" type="submit">- {t('signup', { keyPrefix: 'btns' })}- </Button>- </div>- </Form>- <div className="text-center fs-14 mt-3">- <Trans i18nKey="login.agreements" ns="translation">- By registering, you agree to the- <Link- to="/privacy"- onClick={(evt) => {- argumentClick(evt, 'privacy');- }}- target="_blank">- privacy policy- </Link>- and- <Link- to="/tos"- onClick={(evt) => {- argumentClick(evt, 'tos');- }}- target="_blank">- terms of service- </Link>- .- </Trans>+ <div className="d-grid">+ <Button variant="primary" type="submit">+ {t('signup', { keyPrefix: 'btns' })}+ </Button></div>- <div className="text-center mt-5">- <Trans i18nKey="login.info_login" ns="translation">- Already have an account? <Link to="/users/login">Log in</Link>- </Trans>- </div>- </Col>+ </Form>+ <div className="text-center fs-14 mt-3">+ <Trans i18nKey="login.agreements" ns="translation">+ By registering, you agree to the+ <Link+ to="/privacy"+ onClick={(evt) => {+ argumentClick(evt, 'privacy');+ }}+ target="_blank">+ privacy policy+ </Link>+ and+ <Link+ to="/tos"+ onClick={(evt) => {+ argumentClick(evt, 'tos');+ }}+ target="_blank">+ terms of service+ </Link>+ .+ </Trans>+ </div>+ <div className="text-center mt-5">+ <Trans i18nKey="login.info_login" ns="translation">+ Already have an account? <Link to="/users/login">Log in</Link>+ </Trans>+ </div>+<PicAuthCodeModalvisible={showModal}data={{diff --git a/ui/src/pages/Users/Register/index.tsx b/ui/src/pages/Users/Register/index.tsxindex b1a90bb3..b6200e23 100644--- a/ui/src/pages/Users/Register/index.tsx+++ b/ui/src/pages/Users/Register/index.tsx@@ -1,5 +1,5 @@import React, { useState } from 'react';-import { Container } from 'react-bootstrap';+import { Container, Col } from 'react-bootstrap';import { useTranslation } from 'react-i18next';import { usePageTags } from '@/hooks';@@ -20,9 +20,12 @@ const Index: React.FC = () => {return (<Container style={{ paddingTop: '4rem', paddingBottom: '5rem' }}><WelcomeTitle />- <PluginOauth className="mb-5" />+{showForm ? (- <SignUpForm callback={onStep} />+ <Col className="mx-auto" md={3}>+ <PluginOauth className="mb-5" />+ <SignUpForm callback={onStep} />+ </Col>) : (<Unactivate visible={!showForm} />)}