1
0
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:
Rokt33r
2015-07-23 07:55:56 +09:00
parent cdf6ed47dd
commit 2f754bbb87
11 changed files with 91 additions and 86 deletions

View File

@@ -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'>