mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
Improve creation UI for pages.
This commit is contained in:
@ -60,7 +60,7 @@ class UserListPage extends React.Component {
|
||||
}
|
||||
|
||||
newUser() {
|
||||
var randomName = Math.random().toString(36).slice(-6)
|
||||
const randomName = Setting.getRandomName();
|
||||
return {
|
||||
owner: "built-in", // this.props.account.username,
|
||||
name: `user_${randomName}`,
|
||||
@ -81,6 +81,7 @@ class UserListPage extends React.Component {
|
||||
IsForbidden: false,
|
||||
isDeleted: false,
|
||||
properties: {},
|
||||
signupApplication: "app-built-in",
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,6 +94,7 @@ class UserListPage extends React.Component {
|
||||
users: Setting.prependRow(this.state.users, newUser),
|
||||
total: this.state.total + 1
|
||||
});
|
||||
this.props.history.push(`/users/${newUser.owner}/${newUser.name}`);
|
||||
}
|
||||
)
|
||||
.catch(error => {
|
||||
|
Reference in New Issue
Block a user