Merge remote-tracking branch 'origin/master'

pull/59/head
shao1121353141 2023-09-26 22:17:38 +08:00
commit 2a0407994d
10 changed files with 257 additions and 273 deletions

View File

@ -13,7 +13,7 @@
--------------------------
<div align="center">⭐️ 如果你喜欢 TopIAM请给它一个 Star您的支持将是我们前行的动力。</div>
<div align="center">⭐️ 如果你喜欢 TOPIAM请给它一个 Star您的支持将是我们前行的动力。</div>
--------------------------

View File

@ -68,7 +68,7 @@ export async function getInitialState(): Promise<{
/**
*
*/
console.log('%c欢迎使用 TopIAM 企业数字身份管控平台', 'font-size: 24px;');
console.log('%c欢迎使用 TOPIAM 企业数字身份管控平台', 'font-size: 24px;');
return {
fetchUserInfo,
currentUser: isLoginPath() ? undefined : await fetchUserInfo(),

View File

@ -22,7 +22,7 @@ import Marquee from 'react-fast-marquee';
const message = () => {
return (
<>
<span> TopIAM Star </span>
<span> TOPIAM Star </span>
<a target="_blank" rel="noopener noreferrer" href="https://github.com/topiam/eiam">
GitHub
</a>

View File

@ -121,7 +121,7 @@ const Welcome: React.FC = () => {
color: '#1A1A1A',
}}
>
使 TopIAM
使 TOPIAM
</div>
<p
style={{

View File

@ -22,7 +22,7 @@ import Marquee from 'react-fast-marquee';
const message = () => {
return (
<>
<span> TopIAM Star </span>
<span> TOPIAM Star </span>
<a target="_blank" rel="noopener noreferrer" href="https://github.com/topiam/eiam">
GitHub
</a>

View File

@ -24,7 +24,7 @@ const currentYear = new Date().getFullYear();
export default (props: FooterProps) => (
<DefaultFooter
style={{ backgroundColor: 'transparent' }}
copyright={`2020-${currentYear} TopIAM 版权所有`}
copyright={`2022-${currentYear} TOPIAM 版权所有`}
links={[
{
key: 'website',

View File

@ -20,9 +20,9 @@ import { ICON_LIST } from '@/components/IconFont/constant';
import { IDP_TYPE, RESULT_STATE, SESSION_STATUS } from '@/constants';
import { getCurrentStatus, getLoginEncryptSecret } from '@/services';
import { aesEcbEncrypt } from '@/utils/aes';
import { ProCard, ProForm, ProFormCheckbox, ProFormInstance } from '@ant-design/pro-components';
import { ProForm, ProFormCheckbox, ProFormInstance } from '@ant-design/pro-components';
import { useAsyncEffect, useRequest, useSafeState } from 'ahooks';
import { Alert, App, Avatar, Skeleton, Space, Spin, Tabs, Tooltip } from 'antd';
import { Alert, App, Avatar, Space, Spin, Tabs, Tooltip } from 'antd';
import { nanoid } from 'nanoid';
import { useRef, useState } from 'react';
import { FormattedMessage, Helmet, history, useIntl } from '@umijs/max';
@ -36,12 +36,11 @@ import { accountLogin, getLoginConfig, otpLogin } from './service';
import useStyle from './style';
import { goto } from './utils';
import queryString from 'query-string';
import Banner from '@/components/Banner';
import { omit } from 'lodash';
import { emailValidator } from '@/utils/utils';
import PageLoading from '@/components/PageLoading';
const prefixCls = 'topiam-login';
const showBanner = process.env.PREVIEW_ENV || process.env.NODE_ENV === 'development';
/**
*
@ -313,20 +312,12 @@ const Login = () => {
<Helmet>
<link rel="icon" href={'/favicon.ico'} />
</Helmet>
{showBanner && (
<div className={`${prefixCls}-banner`}>
<Banner />
</div>
)}
{statusLoading || loginConfigLoading ? (
<PageLoading />
) : (
<div className={`${prefixCls}-container`}>
<div className={`${prefixCls}-content`}>
<div className={`${prefixCls}-card`}>
{statusLoading ? (
<ProCard>
<Skeleton loading={statusLoading} paragraph={{ rows: 5 }}></Skeleton>
</ProCard>
) : (
<>
{/*登录*/}
{!status && !forgetPassword && (
<>
@ -340,9 +331,7 @@ const Login = () => {
{/*登录错误*/}
{userLoginState?.status !== RESULT_STATE.SUCCESS &&
currentProvider?.type === IDP_TYPE.ACCOUNT &&
userLoginState?.message && (
<LoginMessage content={userLoginState?.message} />
)}
userLoginState?.message && <LoginMessage content={userLoginState?.message} />}
{/*其他登录方式*/}
{loginConfig?.idps?.map((value) => {
if (
@ -395,7 +384,7 @@ const Login = () => {
},
}}
onFinish={async (values) => {
await run(values);
run(values);
return data;
}}
>
@ -584,13 +573,12 @@ const Login = () => {
}}
/>
)}
</>
)}
</div>
</div>
{/**Footer*/}
<Footer className={`${prefixCls}-footer`} />
</div>
)}
</div>
);
};

View File

@ -21,8 +21,7 @@ const useStyle = createStyles((_, props) => {
const prefixCls = `${props}`;
return {
main: {
width: '320px',
marginTop: '24px',
width: '328px',
[`.${prefixCls}`]: {
['&-success-box']: {
padding: '40px',
@ -51,7 +50,6 @@ const useStyle = createStyles((_, props) => {
['&-back']: {
width: '100%',
marginBottom: '24px',
marginTop: '24px',
},
['&-back-time']: {
display: 'flex',

View File

@ -38,12 +38,11 @@ const useStyle = createStyles(({ prefixCls, token }, props) => {
display: 'flex',
flex: 'none !important',
flexDirection: 'column',
width: '430px',
padding: '32px',
maxWidth: '100%',
minHeight: '475px',
backgroundColor: '#fff',
borderRadius: token.borderRadius,
boxShadow: '0 2px 10px 0 rgb(57 106 255 / 5%)',
boxShadow: '0px 0px 24px 0px rgba(0,0,0,0.1)',
[`${antCls}-tabs-nav-list`]: {
margin: 'auto',
fontSize: '16px',
@ -57,7 +56,6 @@ const useStyle = createStyles(({ prefixCls, token }, props) => {
},
['&-top']: {
textAlign: 'center',
padding: '39px 0 0',
},
['&-logo']: {
width: '200px',
@ -68,7 +66,7 @@ const useStyle = createStyles(({ prefixCls, token }, props) => {
verticalAlign: 'top',
},
['&-desc']: {
marginTop: '12px',
marginTop: '25px',
marginBottom: '15px',
color: token.colorTextSecondary,
fontSize: token.fontSize,

View File

@ -24,7 +24,7 @@ const Workplace: FC = () => {
return (
<PageContainer>
<Card>
<Alert banner description={'欢迎使用 TopIAM 企业数字身份管控平台'} type={'success'} />
<Alert banner description={'欢迎使用 TOPIAM 企业数字身份管控平台'} type={'success'} />
</Card>
</PageContainer>
);