mirror of https://gitee.com/answerdev/answer.git
Merge remote-tracking branch 'github/feat/1.1.2/ui' into feat/1.1.2/user-center
This commit is contained in:
commit
c8cf70c112
|
@ -58,6 +58,7 @@ const Users: FC = () => {
|
|||
const { agent: ucAgent } = userCenterStore();
|
||||
const [adminUcAgent, setAdminUcAgent] = useState<AdminUcAgent>({
|
||||
user_status_agent_enabled: false,
|
||||
user_password_agent_enabled: false,
|
||||
});
|
||||
const Toast = useToast();
|
||||
const {
|
||||
|
@ -258,7 +259,8 @@ const Users: FC = () => {
|
|||
<Icon name="three-dots-vertical" />
|
||||
</Dropdown.Toggle>
|
||||
<Dropdown.Menu>
|
||||
{!ucAgent?.enabled ? (
|
||||
{!ucAgent?.enabled ||
|
||||
!adminUcAgent.user_password_agent_enabled ? (
|
||||
<Dropdown.Item
|
||||
onClick={() => handleAction('password', user)}>
|
||||
{t('set_new_password')}
|
||||
|
|
|
@ -4,8 +4,9 @@ import { Link, useSearchParams } from 'react-router-dom';
|
|||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { usePageTags } from '@/hooks';
|
||||
import { loggedUserInfoStore, siteInfoStore } from '@/stores';
|
||||
import { loggedUserInfoStore } from '@/stores';
|
||||
import { changeEmailVerify } from '@/services';
|
||||
import { WelcomeTitle } from '@/components';
|
||||
|
||||
const Index: FC = () => {
|
||||
const { t } = useTranslation('translation', { keyPrefix: 'account_result' });
|
||||
|
@ -13,7 +14,6 @@ const Index: FC = () => {
|
|||
const [step, setStep] = useState('loading');
|
||||
|
||||
const updateUser = loggedUserInfoStore((state) => state.update);
|
||||
const siteName = siteInfoStore((state) => state.siteInfo.name);
|
||||
|
||||
useEffect(() => {
|
||||
const code = searchParams.get('code');
|
||||
|
@ -39,9 +39,7 @@ const Index: FC = () => {
|
|||
<Container className="pt-4 mt-2 mb-5">
|
||||
<Row className="justify-content-center">
|
||||
<Col lg={6}>
|
||||
<h3 className="text-center mt-3 mb-5">
|
||||
{t('page_title', { site_name: siteName })}
|
||||
</h3>
|
||||
<WelcomeTitle className="mt-3 mb-5" />
|
||||
{step === 'success' && (
|
||||
<>
|
||||
<p className="text-center">{t('confirm_new_email')}</p>
|
||||
|
|
|
@ -40,6 +40,7 @@ export interface UcBranding {
|
|||
|
||||
export interface AdminUcAgent {
|
||||
user_status_agent_enabled: boolean;
|
||||
user_password_agent_enabled: boolean;
|
||||
}
|
||||
|
||||
export const getUcAgent = () => {
|
||||
|
|
Loading…
Reference in New Issue