mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 18:56:22 +00:00
add user management for planet setting modal
This commit is contained in:
@@ -220,6 +220,24 @@ module.exports = React.createClass({
|
||||
return
|
||||
}
|
||||
|
||||
if (res.status === 'userRemoved') {
|
||||
var user = res.data
|
||||
if (user == null) {
|
||||
return null
|
||||
}
|
||||
this.state.currentPlanet.Users.some(function (_user, index) {
|
||||
if (user.id === _user.id) {
|
||||
this.state.currentPlanet.Users.splice(index, 1)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}.bind(this))
|
||||
this.setState({currentPlanet: this.state.currentPlanet}, function () {
|
||||
if (this.state.isAddUserModalOpen) {this.closeAddUserModal()}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (res.status === 'nameChanged') {
|
||||
var params = Object.assign({}, this.props.params)
|
||||
params.planetName = res.data.name
|
||||
|
||||
Reference in New Issue
Block a user