Show CustomGithubCorner in other pages.

This commit is contained in:
Gucheng Wang
2021-11-06 22:04:20 +08:00
parent 467d709b8e
commit cbf973882d
4 changed files with 63 additions and 64 deletions

View File

@ -425,9 +425,47 @@ class App extends Component {
renderContent() {
if (!Setting.isMobile()) {
return (
<div style={{display: 'flex', flex: 'auto',width:"100%",flexDirection: 'column'}}>
<Layout style={{display: 'flex', alignItems: 'stretch'}}>
return (
<div style={{display: 'flex', flex: 'auto',width:"100%",flexDirection: 'column'}}>
<Layout style={{display: 'flex', alignItems: 'stretch'}}>
<Header style={{ padding: '0', marginBottom: '3px'}}>
{
Setting.isMobile() ? null : (
<Link to={"/"}>
<div className="logo" />
</Link>
)
}
<Menu
// theme="dark"
mode={(Setting.isMobile() && this.isStartPages()) ? "inline" : "horizontal"}
selectedKeys={[`${this.state.selectedMenuKey}`]}
style={{ lineHeight: '64px'}}
>
{
this.renderMenu()
}
<div style = {{float: 'right'}}>
{
this.renderAccount()
}
<SelectLanguageBox/>
</div>
</Menu>
</Header>
<Layout style={{backgroundColor: "#f5f5f5", alignItems: 'stretch'}}>
<Card className="content-warp-card">
{
this.renderRouter()
}
</Card>
</Layout>
</Layout>
</div>
)
} else {
return(
<div>
<Header style={{ padding: '0', marginBottom: '3px'}}>
{
Setting.isMobile() ? null : (
@ -440,65 +478,26 @@ class App extends Component {
// theme="dark"
mode={(Setting.isMobile() && this.isStartPages()) ? "inline" : "horizontal"}
selectedKeys={[`${this.state.selectedMenuKey}`]}
style={{ lineHeight: '64px'}}
style={{ lineHeight: '64px' }}
>
{
this.renderMenu()
}
<div style = {{float: 'right'}}>
{
this.renderAccount()
}
<SelectLanguageBox/>
</div>
<div style = {{float: 'right'}}>
{
this.renderAccount()
}
<SelectLanguageBox/>
</div>
</Menu>
</Header>
<Layout style={{backgroundColor: "#f5f5f5", alignItems: 'stretch'}}>
<Card className="content-warp-card">
{
this.renderRouter()
}
</Card>
</Layout>
</Layout>
</div>
)
} else {
return(
<div>
<Header style={{ padding: '0', marginBottom: '3px'}}>
{
Setting.isMobile() ? null : (
<Link to={"/"}>
<div className="logo" />
</Link>
)
this.renderRouter()
}
<Menu
// theme="dark"
mode={(Setting.isMobile() && this.isStartPages()) ? "inline" : "horizontal"}
selectedKeys={[`${this.state.selectedMenuKey}`]}
style={{ lineHeight: '64px' }}
>
{
this.renderMenu()
}
<div style = {{float: 'right'}}>
{
this.renderAccount()
}
<SelectLanguageBox/>
</div>
</Menu>
</Header>
{
this.renderRouter()
}
</div>
)
</div>
)
}
}
}
renderFooter() {
// How to keep your footer where it belongs ?

View File

@ -13,21 +13,16 @@
// limitations under the License.
import React from "react";
import { Button, Col, Divider, Form, Select, Input, Row, Steps } from "antd";
import {Button, Col, Divider, Form, Select, Input, Row, Steps} from "antd";
import * as AuthBackend from "./AuthBackend";
import * as ApplicationBackend from "../backend/ApplicationBackend";
import * as Util from "./Util";
import * as Setting from "../Setting";
import i18next from "i18next";
import { CountDownInput } from "../component/CountDownInput";
import {CountDownInput} from "../component/CountDownInput";
import * as UserBackend from "../backend/UserBackend";
import {
CheckCircleOutlined,
KeyOutlined,
LockOutlined,
SolutionOutlined,
UserOutlined,
} from "@ant-design/icons";
import {CheckCircleOutlined, KeyOutlined, LockOutlined, SolutionOutlined, UserOutlined} from "@ant-design/icons";
import CustomGithubCorner from "../CustomGithubCorner";
const { Step } = Steps;
const { Option } = Select;
@ -474,7 +469,7 @@ class ForgetPage extends React.Component {
}
return (
<>
<React.Fragment>
<Divider style={{ fontSize: "28px" }}>
{i18next.t("forget:Retrieve password")}
</Divider>
@ -512,7 +507,8 @@ class ForgetPage extends React.Component {
</div>
</Col>
</Row>
</>
<CustomGithubCorner />
</React.Fragment>
);
}
}

View File

@ -34,6 +34,7 @@ import LinkedInLoginButton from "./LinkedInLoginButton";
import WeComLoginButton from "./WeComLoginButton";
import LarkLoginButton from "./LarkLoginButton";
import GitLabLoginButton from "./GitLabLoginButton";
import CustomGithubCorner from "../CustomGithubCorner";
class LoginPage extends React.Component {
constructor(props) {
@ -435,6 +436,7 @@ class LoginPage extends React.Component {
{
Setting.renderHelmet(application)
}
<CustomGithubCorner />
{
Setting.renderLogo(application)
}

View File

@ -24,6 +24,7 @@ import * as ApplicationBackend from "../backend/ApplicationBackend";
import * as UserBackend from "../backend/UserBackend";
import {CountDownInput} from "../component/CountDownInput";
import SelectRegionBox from "../SelectRegionBox";
import CustomGithubCorner from "../CustomGithubCorner";
const formItemLayout = {
labelCol: {
@ -528,6 +529,7 @@ class SignupPage extends React.Component {
return (
<div>
<CustomGithubCorner />
&nbsp;
<Row>
<Col span={24} style={{display: "flex", justifyContent: "center"}} >