1
0
mirror of https://github.com/BoostIo/Boostnote synced 2026-01-06 05:29:21 +00:00

standarded

This commit is contained in:
Rokt33r
2016-04-21 21:07:09 +09:00
parent 934e4d9607
commit 6099c91216
12 changed files with 109 additions and 110 deletions

View File

@@ -63,7 +63,7 @@ export default class FolderRow extends React.Component {
}
handleColorButtonClick (index) {
return e => {
return (e) => {
this.setState({
color: index,
isColorEditing: false
@@ -116,7 +116,7 @@ export default class FolderRow extends React.Component {
? 'active'
: null
return (
<button onClick={e => this.handleColorButtonClick(index)(e)} className={className} key={index}>
<button onClick={(e) => this.handleColorButtonClick(index)(e)} className={className} key={index}>
<FolderMark color={index}/>
</button>
)
@@ -125,7 +125,7 @@ export default class FolderRow extends React.Component {
return (
<div className='FolderRow edit'>
<div className='folderColor'>
<button onClick={e => this.handleColorSelectClick(e)} className='select'>
<button onClick={(e) => this.handleColorSelectClick(e)} className='select'>
<FolderMark color={this.state.color}/>
</button>
{this.state.isColorEditing
@@ -139,11 +139,11 @@ export default class FolderRow extends React.Component {
}
</div>
<div className='folderName'>
<input onKeyDown={e => this.handleNameInputKeyDown(e)} valueLink={this.linkState('name')} type='text'/>
<input onKeyDown={(e) => this.handleNameInputKeyDown(e)} valueLink={this.linkState('name')} type='text'/>
</div>
<div className='folderControl'>
<button onClick={e => this.handleSaveButtonClick(e)} className='primary'>Save</button>
<button onClick={e => this.handleCancelButtonClick(e)}>Cancel</button>
<button onClick={(e) => this.handleSaveButtonClick(e)} className='primary'>Save</button>
<button onClick={(e) => this.handleCancelButtonClick(e)}>Cancel</button>
</div>
</div>
)
@@ -152,8 +152,8 @@ export default class FolderRow extends React.Component {
<div className='FolderRow delete'>
<div className='folderDeleteLabel'>Are you sure to delete <strong>{folder.name}</strong> folder?</div>
<div className='folderControl'>
<button onClick={e => this.handleDeleteConfirmButtonClick(e)} className='primary'>Sure</button>
<button onClick={e => this.handleCancelButtonClick(e)}>Cancel</button>
<button onClick={(e) => this.handleDeleteConfirmButtonClick(e)} className='primary'>Sure</button>
<button onClick={(e) => this.handleCancelButtonClick(e)}>Cancel</button>
</div>
</div>
)
@@ -162,14 +162,14 @@ export default class FolderRow extends React.Component {
return (
<div className='FolderRow'>
<div className='sortBtns'>
<button onClick={e => this.handleUpClick(e)}><i className='fa fa-sort-up fa-fw'/></button>
<button onClick={e => this.handleDownClick(e)}><i className='fa fa-sort-down fa-fw'/></button>
<button onClick={(e) => this.handleUpClick(e)}><i className='fa fa-sort-up fa-fw'/></button>
<button onClick={(e) => this.handleDownClick(e)}><i className='fa fa-sort-down fa-fw'/></button>
</div>
<div className='folderColor'><FolderMark color={folder.color}/></div>
<div className='folderName'>{folder.name}</div>
<div className='folderControl'>
<button onClick={e => this.handleEditButtonClick(e)}><i className='fa fa-fw fa-edit'/></button>
<button onClick={e => this.handleDeleteButtonClick(e)}><i className='fa fa-fw fa-close'/></button>
<button onClick={(e) => this.handleEditButtonClick(e)}><i className='fa fa-fw fa-edit'/></button>
<button onClick={(e) => this.handleDeleteButtonClick(e)}><i className='fa fa-fw fa-close'/></button>
</div>
</div>
)

View File

@@ -75,10 +75,10 @@ export default class FolderSettingTab extends React.Component {
{folderElements}
<div className='newFolder'>
<div className='folderName'>
<input onKeyDown={e => this.handleNewFolderNameKeyDown(e)} valueLink={this.linkState('name')} type='text' placeholder='New Folder'/>
<input onKeyDown={(e) => this.handleNewFolderNameKeyDown(e)} valueLink={this.linkState('name')} type='text' placeholder='New Folder'/>
</div>
<div className='folderControl'>
<button onClick={e => this.handleSaveButtonClick(e)} className='primary'>Add</button>
<button onClick={(e) => this.handleSaveButtonClick(e)} className='primary'>Add</button>
</div>
</div>
{alertElement}

View File

@@ -8,7 +8,6 @@ import ContactTab from './Preference/ContactTab'
import { closeModal } from 'browser/lib/modal'
const APP = 'APP'
const HELP = 'HELP'
const FOLDER = 'FOLDER'
const CONTACT = 'CONTACT'
@@ -64,8 +63,6 @@ class Preferences extends React.Component {
let { user, folders, dispatch } = this.props
switch (this.state.currentTab) {
case HELP:
return (<HelpTab/>)
case FOLDER:
return (
<FolderSettingTab

View File

@@ -33,10 +33,10 @@ export default class Tutorial extends React.Component {
return (
<div className='Tutorial modal'>
<button onClick={e => this.handlePriorSlideClick()} className={'priorBtn' + (this.state.slideIndex === 0 ? ' hide' : '')}>
<button onClick={(e) => this.handlePriorSlideClick()} className={'priorBtn' + (this.state.slideIndex === 0 ? ' hide' : '')}>
<i className='fa fa-fw fa-angle-left'/>
</button>
<button onClick={e => this.handleNextSlideClick()} className={'nextBtn' + (this.state.slideIndex === 4 ? ' hide' : '')}>
<button onClick={(e) => this.handleNextSlideClick()} className={'nextBtn' + (this.state.slideIndex === 4 ? ' hide' : '')}>
<i className='fa fa-fw fa-angle-right'/>
</button>
{content}
@@ -80,7 +80,7 @@ export default class Tutorial extends React.Component {
Boost supports code syntax highlighting.<br/>
There are more than 100 different type of language.
<div className='code'>
<CodeEditor readOnly article={{content:code, mode: 'jsx'}}/>
<CodeEditor readOnly article={{content: code, mode: 'jsx'}}/>
</div>
</div>
</div>)
@@ -101,7 +101,7 @@ export default class Tutorial extends React.Component {
return (<div className='slide slide4'>
<div className='title'>Are you ready?</div>
<div className='content'>
<button onClick={e => this.startButtonClick(e)}>Start<br/>Boost</button>
<button onClick={(e) => this.startButtonClick(e)}>Start<br/>Boost</button>
</div>
</div>)
default: