feature: update to support configuration

update to support configuration

Change-Id: I9da4178175c3cc5eec9dccab24d1db543ca62821
This commit is contained in:
zhuyue 2022-01-13 18:42:23 +08:00
parent 9bfc537493
commit 937a17062b
3 changed files with 27 additions and 21 deletions

View File

@ -564,6 +564,7 @@
- ^src/styles/.*$
- ^src/locales/.*$
- ^src/asset/.*$
- ^src/layouts/.*$
# .zuul.yaml
- ^.zuul.yaml$
- skyline-console-devstack-e2etests-network:
@ -593,6 +594,7 @@
- ^src/styles/.*$
- ^src/locales/.*$
- ^src/asset/.*$
- ^src/layouts/.*$
# .zuul.yaml
- ^.zuul.yaml$
- skyline-console-devstack-e2etests-other:
@ -615,6 +617,7 @@
- ^src/styles/.*$
- ^src/locales/.*$
- ^src/asset/.*$
- ^src/layouts/.*$
# .zuul.yaml
- ^.zuul.yaml$
- skyline-console-devstack-e2etests-storage:
@ -645,6 +648,7 @@
- ^src/styles/.*$
- ^src/locales/.*$
- ^src/asset/.*$
- ^src/layouts/.*$
# .zuul.yaml
- ^.zuul.yaml$
gate:

View File

@ -22,15 +22,31 @@ import loginFullImage from 'asset/image/login-full.png';
import loginRightLogo from 'asset/image/loginRightLogo.png';
import styles from './index.less';
@inject('rootStore')
@observer
class AuthLayout extends Component {
export class AuthLayout extends Component {
constructor(props) {
super(props);
this.routes = props.route.routes;
}
renderRight() {
return (
<div className={styles.right}>
<img
alt=""
className={styles['login-full-image']}
src={loginFullImage}
/>
<div className={styles['full-image-front']} />
<img
src={loginRightLogo}
alt=""
className={styles['login-right-logo']}
/>
</div>
);
}
render() {
return (
<div className={styles.container}>
@ -47,22 +63,10 @@ class AuthLayout extends Component {
{renderRoutes(this.routes)}
</div>
</div>
<div className={styles.right}>
<img
alt=""
className={styles['login-full-image']}
src={loginFullImage}
/>
<div className={styles['full-image-front']} />
<img
src={loginRightLogo}
alt=""
className={styles['login-right-logo']}
/>
</div>
{this.renderRight()}
</div>
);
}
}
export default AuthLayout;
export default inject('rootStore')(observer(AuthLayout));

View File

@ -63,7 +63,7 @@ export class Login extends Component {
product_name: { zh = t('Cloud Platform'), en = 'Cloud Platform' } = {},
} = this.info;
const { isLocaleZh } = i18n;
return isLocaleZh ? zh : en;
return t('Welcome, {name}', { name: isLocaleZh ? zh : en });
}
get domains() {
@ -280,9 +280,7 @@ export class Login extends Component {
render() {
return (
<>
<h1 className={styles.welcome}>
{t('Welcome, {name}', { name: this.productName })}
</h1>
<h1 className={styles.welcome}>{this.productName}</h1>
<SimpleForm
formItems={this.formItems}
name="normal_login"