mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
Add HomepageUrl and Description to app.
This commit is contained in:
@ -142,6 +142,26 @@ class ApplicationEditPage extends React.Component {
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={2}>
|
||||
{i18next.t("general:Homepage URL")}:
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Input prefix={<LinkOutlined/>} value={this.state.application.homepageUrl} onChange={e => {
|
||||
this.updateApplicationField('homepageUrl', e.target.value);
|
||||
}} />
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={2}>
|
||||
{i18next.t("general:Description")}:
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Input value={this.state.application.description} onChange={e => {
|
||||
this.updateApplicationField('description', e.target.value);
|
||||
}} />
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={2}>
|
||||
{i18next.t("general:Organization")}:
|
||||
|
@ -149,6 +149,20 @@ class Face extends React.Component {
|
||||
);
|
||||
}
|
||||
|
||||
renderLogo(application) {
|
||||
if (application.homepageUrl !== "") {
|
||||
return (
|
||||
<a target="_blank" href={application.homepageUrl}>
|
||||
<img width={250} src={application.logo} alt={application.displayName} style={{marginBottom: '30px'}}/>
|
||||
</a>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<img width={250} src={application.logo} alt={application.displayName} style={{marginBottom: '30px'}}/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const application = this.getApplicationObj();
|
||||
if (application === null) {
|
||||
@ -159,7 +173,9 @@ class Face extends React.Component {
|
||||
<Row>
|
||||
<Col span={24} style={{display: "flex", justifyContent: "center"}} >
|
||||
<div style={{marginTop: "80px", textAlign: "center"}}>
|
||||
<img width={250} src={application.logo} alt={application.displayName} style={{marginBottom: '30px'}}/>
|
||||
{
|
||||
this.renderLogo(application)
|
||||
}
|
||||
{
|
||||
this.renderForm(application)
|
||||
}
|
||||
|
Reference in New Issue
Block a user