mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
add name change for planet & fix minor bugs
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
var React = require('react/addons')
|
||||
var Select = require('react-select')
|
||||
|
||||
var Catalyst = require('../Mixins/Catalyst')
|
||||
|
||||
var PlanetActions = require('../Actions/PlanetActions')
|
||||
|
||||
module.exports = React.createClass({
|
||||
mixins: [Catalyst.LinkedStateMixin],
|
||||
propTypes: {
|
||||
@@ -22,6 +25,10 @@ module.exports = React.createClass({
|
||||
activeManageMember: function () {
|
||||
this.setState({currentTab: 'manageMember'})
|
||||
},
|
||||
saveProfile: function () {
|
||||
var currentPlanet = this.props.currentPlanet
|
||||
PlanetActions.changeName(currentPlanet.userName, currentPlanet.name, this.state.planetName)
|
||||
},
|
||||
doubleCheckDeletePlanet: function () {
|
||||
if (this.state.isDeletePlanetChecked) {
|
||||
console.log('delete it')
|
||||
@@ -44,7 +51,7 @@ module.exports = React.createClass({
|
||||
<div className='planetProfileForm'>
|
||||
<label>Planet name </label>
|
||||
<input valueLink={this.linkState('planetName')} className='inline-input'/>
|
||||
<button className='saveButton btn-primary'>Save</button>
|
||||
<button onClick={this.saveProfile} className='saveButton btn-primary'>Save</button>
|
||||
</div>
|
||||
|
||||
<div className='planetDeleteForm'>
|
||||
|
||||
Reference in New Issue
Block a user