mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 13:20:19 +08:00
Improve creation UI for pages.
This commit is contained in:
@ -48,7 +48,7 @@ class ApplicationListPage extends React.Component {
|
||||
}
|
||||
|
||||
newApplication() {
|
||||
var randomName = Math.random().toString(36).slice(-6)
|
||||
const randomName = Setting.getRandomName();
|
||||
return {
|
||||
owner: "admin", // this.props.account.applicationname,
|
||||
name: `application_${randomName}`,
|
||||
@ -83,6 +83,7 @@ class ApplicationListPage extends React.Component {
|
||||
applications: Setting.prependRow(this.state.applications, newApplication),
|
||||
total: this.state.total + 1
|
||||
});
|
||||
this.props.history.push(`/applications/${newApplication.name}`);
|
||||
}
|
||||
)
|
||||
.catch(error => {
|
||||
|
Reference in New Issue
Block a user