Improve creation UI for pages.

This commit is contained in:
Gucheng Wang
2021-12-12 18:51:12 +08:00
parent 2f71d9743b
commit 1762d19787
12 changed files with 94 additions and 27 deletions

View File

@ -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 => {