mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-15 03:33:49 +08:00
Add prompt page.
This commit is contained in:
@ -25,6 +25,7 @@ import i18next from "i18next";
|
||||
import UrlTable from "./UrlTable";
|
||||
import ProviderTable from "./ProviderTable";
|
||||
import SignupTable from "./SignupTable";
|
||||
import PromptPage from "./auth/PromptPage";
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
@ -312,6 +313,14 @@ class ApplicationEditPage extends React.Component {
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={2}>
|
||||
{i18next.t("general:Preview")}:
|
||||
</Col>
|
||||
{
|
||||
this.renderPreview2()
|
||||
}
|
||||
</Row>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
@ -355,6 +364,25 @@ class ApplicationEditPage extends React.Component {
|
||||
)
|
||||
}
|
||||
|
||||
renderPreview2() {
|
||||
let promptUrl = `/prompt/${this.state.application.name}`;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Col span={11} >
|
||||
<a style={{marginBottom: '10px'}} target="_blank" rel="noreferrer" href={promptUrl}>
|
||||
<Button type="primary">{i18next.t("application:Test prompt page..")}</Button>
|
||||
</a>
|
||||
<br/>
|
||||
<br/>
|
||||
<div style={{width: "90%", border: "1px solid rgb(217,217,217)", boxShadow: "10px 10px 5px #888888"}}>
|
||||
<PromptPage application={this.state.application} account={this.props.account} />
|
||||
</div>
|
||||
</Col>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
|
||||
submitApplicationEdit() {
|
||||
let application = Setting.deepCopy(this.state.application);
|
||||
ApplicationBackend.updateApplication(this.state.application.owner, this.state.applicationName, application)
|
||||
|
Reference in New Issue
Block a user