1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

refactor: fix by standardjs

This commit is contained in:
sota1235
2017-01-11 23:17:32 +09:00
parent 0d004b2f0a
commit ed9ddee5f1
30 changed files with 69 additions and 72 deletions

View File

@@ -91,10 +91,10 @@ NoteItem.propTypes = {
type: PropTypes.string.isRequired, type: PropTypes.string.isRequired,
title: PropTypes.string.isrequired, title: PropTypes.string.isrequired,
tags: PropTypes.array, tags: PropTypes.array,
isStarred: PropTypes.bool.isRequired, isStarred: PropTypes.bool.isRequired
}), }),
handleNoteClick: PropTypes.func.isRequired, handleNoteClick: PropTypes.func.isRequired,
handleNoteContextMenu: PropTypes.func.isRequired, handleNoteContextMenu: PropTypes.func.isRequired
} }
export default CSSModules(NoteItem, styles) export default CSSModules(NoteItem, styles)

View File

@@ -40,10 +40,10 @@ NoteItemSimple.propTypes = {
storage: PropTypes.string.isRequired, storage: PropTypes.string.isRequired,
key: PropTypes.string.isRequired, key: PropTypes.string.isRequired,
type: PropTypes.string.isRequired, type: PropTypes.string.isRequired,
title: PropTypes.string.isrequired, title: PropTypes.string.isrequired
}), }),
handleNoteClick: PropTypes.func.isRequired, handleNoteClick: PropTypes.func.isRequired,
handleNoteContextMenu: PropTypes.func.isRequired, handleNoteContextMenu: PropTypes.func.isRequired
} }
export default CSSModules(NoteItemSimple, styles) export default CSSModules(NoteItemSimple, styles)

View File

@@ -12,7 +12,7 @@ export default class ProfileImage extends React.Component {
className={className} className={className}
width={this.props.size} width={this.props.size}
height={this.props.size} height={this.props.size}
src={src}/> src={src} />
) )
} }
} }

View File

@@ -17,17 +17,17 @@ const SideNavFilter = ({
isFolded, isHomeActive, handleAllNotesButtonClick, isFolded, isHomeActive, handleAllNotesButtonClick,
isStarredActive, handleStarredButtonClick isStarredActive, handleStarredButtonClick
}) => ( }) => (
<div styleName={ isFolded ? 'menu--folded' : 'menu' }> <div styleName={isFolded ? 'menu--folded' : 'menu'}>
<button styleName={isHomeActive ? 'menu-button--active' : 'menu-button'} <button styleName={isHomeActive ? 'menu-button--active' : 'menu-button'}
onClick={handleAllNotesButtonClick} onClick={handleAllNotesButtonClick}
> >
<i className='fa fa-book fa-fw'/> <i className='fa fa-book fa-fw' />
<span styleName='menu-button-label'>All Notes</span> <span styleName='menu-button-label'>All Notes</span>
</button> </button>
<button styleName={isStarredActive ? 'menu-button--active' : 'menu-button'} <button styleName={isStarredActive ? 'menu-button--active' : 'menu-button'}
onClick={handleStarredButtonClick} onClick={handleStarredButtonClick}
> >
<i className='fa fa-star fa-fw'/> <i className='fa fa-star fa-fw' />
<span styleName='menu-button-label'>Starred</span> <span styleName='menu-button-label'>Starred</span>
</button> </button>
</div> </div>
@@ -38,7 +38,7 @@ SideNavFilter.propTypes = {
isHomeActive: PropTypes.bool.isRequired, isHomeActive: PropTypes.bool.isRequired,
handleAllNotesButtonClick: PropTypes.func.isRequired, handleAllNotesButtonClick: PropTypes.func.isRequired,
isStarredActive: PropTypes.bool.isRequired, isStarredActive: PropTypes.bool.isRequired,
handleStarredButtonClick: PropTypes.func.isRequired, handleStarredButtonClick: PropTypes.func.isRequired
} }
export default CSSModules(SideNavFilter, styles) export default CSSModules(SideNavFilter, styles)

View File

@@ -117,7 +117,7 @@ class SnippetTab extends React.Component {
<button styleName='deleteButton' <button styleName='deleteButton'
onClick={(e) => this.handleDeleteButtonClick(e)} onClick={(e) => this.handleDeleteButtonClick(e)}
> >
<i className='fa fa-times'/> <i className='fa fa-times' />
</button> </button>
} }
</div> </div>

View File

@@ -52,7 +52,7 @@ StorageItem.propTypes = {
folderName: PropTypes.string.isRequired, folderName: PropTypes.string.isRequired,
folderColor: PropTypes.string, folderColor: PropTypes.string,
isFolded: PropTypes.bool.isRequired, isFolded: PropTypes.bool.isRequired,
noteCount: PropTypes.number, noteCount: PropTypes.number
} }
export default CSSModules(StorageItem, styles) export default CSSModules(StorageItem, styles)

View File

@@ -97,9 +97,7 @@ class NoteDetail extends React.Component {
let { note, config } = this.props let { note, config } = this.props
if (note == null) { if (note == null) {
return ( return (
<div styleName='root'> <div styleName='root' />
</div>
) )
} }

View File

@@ -59,7 +59,6 @@ class NoteList extends React.Component {
let notesList = notes let notesList = notes
.slice(0, 10 + 10 * this.state.range) .slice(0, 10 + 10 * this.state.range)
.map((note, _index) => { .map((note, _index) => {
const isActive = (index === _index) const isActive = (index === _index)
const key = `${note.storage}-${note.key}` const key = `${note.storage}-${note.key}`
const dateDisplay = moment(note.updatedAt).fromNow() const dateDisplay = moment(note.updatedAt).fromNow()

View File

@@ -351,7 +351,7 @@ function refreshData () {
ReactDOM.render(( ReactDOM.render((
<Provider store={store}> <Provider store={store}>
<Finder/> <Finder />
</Provider> </Provider>
), document.getElementById('content'), function () { ), document.getElementById('content'), function () {
refreshData() refreshData()

View File

@@ -1,17 +1,17 @@
/** /**
* @fileoverview Formatting date string. * @fileoverview Formatting date string.
*/ */
import moment from 'moment'; import moment from 'moment'
/** /**
* @description Return date string. For example, 'Sep.9, 2016 12:00'. * @description Return date string. For example, 'Sep.9, 2016 12:00'.
* @param {mixed} * @param {mixed}
* @return {string} * @return {string}
*/ */
export function getLastUpdated(date) { export function getLastUpdated (date) {
const m = moment(date) const m = moment(date)
if (!m.isValid()) { if (!m.isValid()) {
throw Error('Invalid argument.'); throw Error('Invalid argument.')
} }
return m.format('MMM D, gggg H:mm') return m.format('MMM D, gggg H:mm')

View File

@@ -58,7 +58,7 @@ md.use(math, {
}) })
md.use(require('markdown-it-footnote')) md.use(require('markdown-it-footnote'))
// Override task item // Override task item
md.block.ruler.at('paragraph', function (state, startLine/*, endLine*/) { md.block.ruler.at('paragraph', function (state, startLine/*, endLine */) {
let content, terminate, i, l, token let content, terminate, i, l, token
let nextLine = startLine + 1 let nextLine = startLine + 1
let terminatorRules = state.md.block.ruler.getRules('paragraph') let terminatorRules = state.md.block.ruler.getRules('paragraph')

View File

@@ -268,7 +268,7 @@ class FolderSelect extends React.Component {
<span styleName='idle-label-name-surfix'>in {currentOption.storage.name}</span> <span styleName='idle-label-name-surfix'>in {currentOption.storage.name}</span>
</span> </span>
</div> </div>
<i styleName='idle-caret' className='fa fa-fw fa-caret-down'/> <i styleName='idle-caret' className='fa fa-fw fa-caret-down' />
</div> </div>
} }

View File

@@ -21,7 +21,7 @@ const LastUpdatedString = ({ date }) => {
} }
LastUpdatedString.propTypes = { LastUpdatedString.propTypes = {
date: PropTypes.string, date: PropTypes.string
} }
export default CSSModules(LastUpdatedString, styles) export default CSSModules(LastUpdatedString, styles)

View File

@@ -538,7 +538,7 @@ class SnippetNoteDetail extends React.Component {
<button styleName='info-right-button' <button styleName='info-right-button'
onClick={(e) => this.handleContextButtonClick(e)} onClick={(e) => this.handleContextButtonClick(e)}
> >
<i className='fa fa-ellipsis-v'/> <i className='fa fa-ellipsis-v' />
</button> </button>
</div> </div>
</div> </div>
@@ -563,7 +563,7 @@ class SnippetNoteDetail extends React.Component {
<button styleName='plusButton' <button styleName='plusButton'
onClick={(e) => this.handleTabPlusButtonClick(e)} onClick={(e) => this.handleTabPlusButtonClick(e)}
> >
<i className='fa fa-plus'/> <i className='fa fa-plus' />
</button> </button>
</div> </div>
{viewList} {viewList}
@@ -577,19 +577,19 @@ class SnippetNoteDetail extends React.Component {
? 'Select Syntax...' ? 'Select Syntax...'
: this.state.note.snippets[this.state.snippetIndex].mode : this.state.note.snippets[this.state.snippetIndex].mode
}&nbsp; }&nbsp;
<i className='fa fa-caret-down'/> <i className='fa fa-caret-down' />
</button> </button>
<button <button
onClick={(e) => this.handleIndentTypeButtonClick(e)} onClick={(e) => this.handleIndentTypeButtonClick(e)}
> >
Indent: {config.editor.indentType}&nbsp; Indent: {config.editor.indentType}&nbsp;
<i className='fa fa-caret-down'/> <i className='fa fa-caret-down' />
</button> </button>
<button <button
onClick={(e) => this.handleIndentSizeButtonClick(e)} onClick={(e) => this.handleIndentSizeButtonClick(e)}
> >
size: {config.editor.indentSize}&nbsp; size: {config.editor.indentSize}&nbsp;
<i className='fa fa-caret-down'/> <i className='fa fa-caret-down' />
</button> </button>
</div> </div>

View File

@@ -8,7 +8,7 @@ class TagSelect extends React.Component {
super(props) super(props)
this.state = { this.state = {
newTag: '', newTag: ''
} }
} }
@@ -111,7 +111,7 @@ class TagSelect extends React.Component {
<button styleName='tag-removeButton' <button styleName='tag-removeButton'
onClick={(e) => this.handleTagRemoveButtonClick(tag)(e)} onClick={(e) => this.handleTagRemoveButtonClick(tag)(e)}
> >
<i className='fa fa-times fa-fw tag-removeButton-icon'/> <i className='fa fa-times fa-fw tag-removeButton-icon' />
</button> </button>
</span> </span>
) )

View File

@@ -112,7 +112,7 @@ class Main extends React.Component {
ConfigManager.set({ navWidth }) ConfigManager.set({ navWidth })
dispatch({ dispatch({
type: 'SET_NAV_WIDTH', type: 'SET_NAV_WIDTH',
navWidth, navWidth
}) })
}) })
} }
@@ -169,7 +169,7 @@ class Main extends React.Component {
onMouseDown={(e) => this.handleLeftSlideMouseDown(e)} onMouseDown={(e) => this.handleLeftSlideMouseDown(e)}
draggable='false' draggable='false'
> >
<div styleName='slider-hitbox'/> <div styleName='slider-hitbox' />
</div> </div>
} }
<div styleName={config.isSideNavFolded ? 'body--expanded' : 'body'} <div styleName={config.isSideNavFolded ? 'body--expanded' : 'body'}

View File

@@ -376,7 +376,7 @@ class NoteList extends React.Component {
} }
onClick={(e) => this.handleListStyleButtonClick(e, 'DEFAULT')} onClick={(e) => this.handleListStyleButtonClick(e, 'DEFAULT')}
> >
<i className='fa fa-th-large'/> <i className='fa fa-th-large' />
</button> </button>
<button styleName={config.listStyle === 'SMALL' <button styleName={config.listStyle === 'SMALL'
? 'control-button--active' ? 'control-button--active'
@@ -384,7 +384,7 @@ class NoteList extends React.Component {
} }
onClick={(e) => this.handleListStyleButtonClick(e, 'SMALL')} onClick={(e) => this.handleListStyleButtonClick(e, 'SMALL')}
> >
<i className='fa fa-list-ul'/> <i className='fa fa-list-ul' />
</button> </button>
</div> </div>
<div styleName='list' <div styleName='list'

View File

@@ -181,7 +181,7 @@ class StorageItem extends React.Component {
<button styleName='header-addFolderButton' <button styleName='header-addFolderButton'
onClick={(e) => this.handleAddFolderButtonClick(e)} onClick={(e) => this.handleAddFolderButtonClick(e)}
> >
<i className='fa fa-plus'/> <i className='fa fa-plus' />
</button> </button>
} }

View File

@@ -65,7 +65,7 @@ class SideNav extends React.Component {
<button styleName='top-menu' <button styleName='top-menu'
onClick={(e) => this.handleMenuButtonClick(e)} onClick={(e) => this.handleMenuButtonClick(e)}
> >
<i className='fa fa-navicon fa-fw'/> <i className='fa fa-navicon fa-fw' />
<span styleName='top-menu-label'>Menu</span> <span styleName='top-menu-label'>Menu</span>
</button> </button>
</div> </div>
@@ -87,8 +87,8 @@ class SideNav extends React.Component {
onClick={(e) => this.handleToggleButtonClick(e)} onClick={(e) => this.handleToggleButtonClick(e)}
> >
{isFolded {isFolded
? <i className='fa fa-angle-double-right'/> ? <i className='fa fa-angle-double-right' />
: <i className='fa fa-angle-double-left'/> : <i className='fa fa-angle-double-left' />
} }
</button> </button>
</div> </div>

View File

@@ -59,9 +59,9 @@ class StatusBar extends React.Component {
</button> </button>
: null : null
} }
{/*<button styleName='help'> {/* <button styleName='help'>
<i className='fa fa-info-circle' /> <i className='fa fa-info-circle' />
</button>*/} </button> */}
<button styleName='zoom' <button styleName='zoom'
onClick={(e) => this.handleZoomButtonClick(e)} onClick={(e) => this.handleZoomButtonClick(e)}
> >

View File

@@ -262,8 +262,8 @@ class TopBar extends React.Component {
<span styleName='control-search-optionList-item-folder-surfix'>in {storage.name}</span> <span styleName='control-search-optionList-item-folder-surfix'>in {storage.name}</span>
</div> </div>
{note.type === 'SNIPPET_NOTE' {note.type === 'SNIPPET_NOTE'
? <i styleName='control-search-optionList-item-type' className='fa fa-code'/> ? <i styleName='control-search-optionList-item-type' className='fa fa-code' />
: <i styleName='control-search-optionList-item-type' className='fa fa-file-text-o'/> : <i styleName='control-search-optionList-item-type' className='fa fa-file-text-o' />
}&nbsp; }&nbsp;
{note.title} {note.title}
</div> </div>
@@ -276,7 +276,7 @@ class TopBar extends React.Component {
> >
<div styleName='control'> <div styleName='control'>
<div styleName='control-search'> <div styleName='control-search'>
<i styleName='control-search-icon' className='fa fa-search fa-fw'/> <i styleName='control-search-icon' className='fa fa-search fa-fw' />
<div styleName='control-search-input' <div styleName='control-search-input'
onFocus={(e) => this.handleSearchFocus(e)} onFocus={(e) => this.handleSearchFocus(e)}
onBlur={(e) => this.handleSearchBlur(e)} onBlur={(e) => this.handleSearchBlur(e)}
@@ -303,14 +303,14 @@ class TopBar extends React.Component {
<button styleName='left-search-clearButton' <button styleName='left-search-clearButton'
onClick={(e) => this.handleSearchClearButton(e)} onClick={(e) => this.handleSearchClearButton(e)}
> >
<i className='fa fa-times'/> <i className='fa fa-times' />
</button> </button>
} }
</div> </div>
<button styleName='control-newPostButton' <button styleName='control-newPostButton'
onClick={(e) => this.handleNewPostButtonClick(e)}> onClick={(e) => this.handleNewPostButtonClick(e)}>
<i className='fa fa-plus'/> <i className='fa fa-plus' />
<span styleName='control-newPostButton-tooltip'> <span styleName='control-newPostButton-tooltip'>
Make a Note {OSX ? '⌘' : '^'} + n Make a Note {OSX ? '⌘' : '^'} + n
</span> </span>

View File

@@ -20,10 +20,10 @@ class ModalBase extends React.Component {
render () { render () {
return ( return (
<div className={'ModalBase' + (this.state.isHidden ? ' hide' : '')}> <div className={'ModalBase' + (this.state.isHidden ? ' hide' : '')}>
<div onClick={(e) => this.close(e)} className='modalBack'/> <div onClick={(e) => this.close(e)} className='modalBack' />
{this.state.component == null ? null : ( {this.state.component == null ? null : (
<Provider store={store}> <Provider store={store}>
<this.state.component {...this.state.componentProps} close={this.close}/> <this.state.component {...this.state.componentProps} close={this.close} />
</Provider> </Provider>
)} )}
</div> </div>
@@ -33,7 +33,7 @@ class ModalBase extends React.Component {
let el = document.createElement('div') let el = document.createElement('div')
document.body.appendChild(el) document.body.appendChild(el)
let modalBase = ReactDOM.render(<ModalBase/>, el) let modalBase = ReactDOM.render(<ModalBase />, el)
export function openModal (component, props) { export function openModal (component, props) {
if (modalBase == null) { return } if (modalBase == null) { return }

View File

@@ -33,13 +33,13 @@ export default class DeleteArticleModal extends React.Component {
render () { render () {
return ( return (
<div className='DeleteArticleModal modal'> <div className='DeleteArticleModal modal'>
<div className='title'><i className='fa fa-fw fa-trash'/> Delete an article.</div> <div className='title'><i className='fa fa-fw fa-trash' /> Delete an article.</div>
<div className='message'>Do you really want to delete?</div> <div className='message'>Do you really want to delete?</div>
<div className='control'> <div className='control'>
<button ref='no' onClick={(e) => this.handleNoButtonClick(e)}><i className='fa fa-fw fa-close'/> No</button> <button ref='no' onClick={(e) => this.handleNoButtonClick(e)}><i className='fa fa-fw fa-close' /> No</button>
<button ref='yes' onClick={(e) => this.handleYesButtonClick(e)} className='danger'><i className='fa fa-fw fa-check'/> Yes</button> <button ref='yes' onClick={(e) => this.handleYesButtonClick(e)} className='danger'><i className='fa fa-fw fa-check' /> Yes</button>
</div> </div>
</div> </div>
) )

View File

@@ -197,7 +197,7 @@ class InitModal extends React.Component {
render () { render () {
if (this.state.isLoading) { if (this.state.isLoading) {
return <div styleName='root--loading'> return <div styleName='root--loading'>
<i styleName='spinner' className='fa fa-spin fa-spinner'/> <i styleName='spinner' className='fa fa-spin fa-spinner' />
<div styleName='loadingMessage'>Preparing initialization...</div> <div styleName='loadingMessage'>Preparing initialization...</div>
</div> </div>
} }
@@ -235,7 +235,7 @@ class InitModal extends React.Component {
{this.state.legacyStorageExists && {this.state.legacyStorageExists &&
<div styleName='body-migration'> <div styleName='body-migration'>
<label><input type='checkbox' checked={this.state.migrationRequested} onChange={(e) => this.handleMigrationRequestedChange(e)}/> Migrate old data from the legacy app v0.5</label> <label><input type='checkbox' checked={this.state.migrationRequested} onChange={(e) => this.handleMigrationRequestedChange(e)} /> Migrate old data from the legacy app v0.5</label>
</div> </div>
} }
@@ -247,7 +247,7 @@ class InitModal extends React.Component {
> >
{this.state.isSending {this.state.isSending
? <span> ? <span>
<i className='fa fa-spin fa-spinner'/> Loading... <i className='fa fa-spin fa-spinner' /> Loading...
</span> </span>
: 'Let\'s Go!' : 'Let\'s Go!'
} }

View File

@@ -114,8 +114,8 @@ class NewNoteModal extends React.Component {
> >
<i styleName='control-button-icon' <i styleName='control-button-icon'
className='fa fa-file-text-o' className='fa fa-file-text-o'
/><br/> /><br />
<span styleName='control-button-label'>Markdown Note</span><br/> <span styleName='control-button-label'>Markdown Note</span><br />
<span styleName='control-button-description'>It is good for any type of documents. Check List, Code block and Latex block are available.</span> <span styleName='control-button-description'>It is good for any type of documents. Check List, Code block and Latex block are available.</span>
</button> </button>
@@ -126,14 +126,14 @@ class NewNoteModal extends React.Component {
> >
<i styleName='control-button-icon' <i styleName='control-button-icon'
className='fa fa-code' className='fa fa-code'
/><br/> /><br />
<span styleName='control-button-label'>Snippet Note</span><br/> <span styleName='control-button-label'>Snippet Note</span><br />
<span styleName='control-button-description'>This format is specialized on managing snippets like Gist. Multiple snippets can be grouped as a note. <span styleName='control-button-description'>This format is specialized on managing snippets like Gist. Multiple snippets can be grouped as a note.
</span> </span>
</button> </button>
</div> </div>
<div styleName='description'><i className='fa fa-arrows-h'/> Tab to switch format</div> <div styleName='description'><i className='fa fa-arrows-h' /> Tab to switch format</div>
</div> </div>
) )

View File

@@ -150,7 +150,7 @@ class HotkeyTab extends React.Component {
} }
HotkeyTab.propTypes = { HotkeyTab.propTypes = {
dispatch: PropTypes.func, dispatch: PropTypes.func
} }
export default CSSModules(HotkeyTab, styles) export default CSSModules(HotkeyTab, styles)

View File

@@ -26,7 +26,7 @@ class InfoTab extends React.Component {
<div styleName='top'> <div styleName='top'>
<div styleName='icon-space'> <div styleName='icon-space'>
<img styleName='icon' src='../resources/app.png' width='92' height='92'/> <img styleName='icon' src='../resources/app.png' width='92' height='92' />
<div styleName='icon-right'> <div styleName='icon-right'>
<div styleName='appId'>Boostnote {appVersion}</div> <div styleName='appId'>Boostnote {appVersion}</div>
<div styleName='description'> <div styleName='description'>
@@ -34,7 +34,7 @@ class InfoTab extends React.Component {
</div> </div>
</div> </div>
</div> </div>
<div styleName='clear'></div> <div styleName='clear' />
<div styleName='madeBy'>Made by&nbsp; <div styleName='madeBy'>Made by&nbsp;
<a href='http://maisin.co/' <a href='http://maisin.co/'
onClick={(e) => this.handleLinkClick(e)} onClick={(e) => this.handleLinkClick(e)}

View File

@@ -137,7 +137,7 @@ class UnstyledFolderItem extends React.Component {
</div> </div>
: null : null
} }
<i className='fa fa-square'/> <i className='fa fa-square' />
</button> </button>
<input styleName='folderList-item-left-nameInput' <input styleName='folderList-item-left-nameInput'
value={this.state.folder.name} value={this.state.folder.name}
@@ -368,17 +368,17 @@ class StorageItem extends React.Component {
: <div styleName='header-label' : <div styleName='header-label'
onClick={(e) => this.handleLabelClick(e)} onClick={(e) => this.handleLabelClick(e)}
> >
<i className='fa fa-folder-open'/>&nbsp; <i className='fa fa-folder-open' />&nbsp;
{storage.name}&nbsp; {storage.name}&nbsp;
<span styleName='header-label-path'>({storage.path})</span>&nbsp; <span styleName='header-label-path'>({storage.path})</span>&nbsp;
<i styleName='header-label-editButton' className='fa fa-pencil'/> <i styleName='header-label-editButton' className='fa fa-pencil' />
</div> </div>
} }
<div styleName='header-control'> <div styleName='header-control'>
<button styleName='header-control-button' <button styleName='header-control-button'
onClick={(e) => this.handleNewFolderButtonClick(e)} onClick={(e) => this.handleNewFolderButtonClick(e)}
> >
<i className='fa fa-plus'/> <i className='fa fa-plus' />
<span styleName='header-control-button-tooltip' <span styleName='header-control-button-tooltip'
style={{left: -20}} style={{left: -20}}
>Add Folder</span> >Add Folder</span>
@@ -386,7 +386,7 @@ class StorageItem extends React.Component {
<button styleName='header-control-button' <button styleName='header-control-button'
onClick={(e) => this.handleExternalButtonClick(e)} onClick={(e) => this.handleExternalButtonClick(e)}
> >
<i className='fa fa-external-link'/> <i className='fa fa-external-link' />
<span styleName='header-control-button-tooltip' <span styleName='header-control-button-tooltip'
style={{left: -50}} style={{left: -50}}
>Open Storage folder</span> >Open Storage folder</span>
@@ -394,7 +394,7 @@ class StorageItem extends React.Component {
<button styleName='header-control-button' <button styleName='header-control-button'
onClick={(e) => this.handleUnlinkButtonClick(e)} onClick={(e) => this.handleUnlinkButtonClick(e)}
> >
<i className='fa fa-unlink'/> <i className='fa fa-unlink' />
<span styleName='header-control-button-tooltip' <span styleName='header-control-button-tooltip'
style={{left: -10}} style={{left: -10}}
>Unlink</span> >Unlink</span>

View File

@@ -72,7 +72,7 @@ class StoragesTab extends React.Component {
<button styleName='list-control-addStorageButton' <button styleName='list-control-addStorageButton'
onClick={(e) => this.handleAddStorageButton(e)} onClick={(e) => this.handleAddStorageButton(e)}
> >
<i className='fa fa-plus'/> Add Storage <i className='fa fa-plus' /> Add Storage
</button> </button>
</div> </div>
</div> </div>

View File

@@ -43,7 +43,7 @@ class Preferences extends React.Component {
switch (this.state.currentTab) { switch (this.state.currentTab) {
case 'INFO': case 'INFO':
return <InfoTab/> return <InfoTab />
case 'HOTKEY': case 'HOTKEY':
return ( return (
<HotkeyTab <HotkeyTab
@@ -86,9 +86,9 @@ class Preferences extends React.Component {
let tabs = [ let tabs = [
{target: 'STORAGES', label: 'Storages'}, {target: 'STORAGES', label: 'Storages'},
{target: 'HOTKEY', label: 'Hotkey'}, {target: 'HOTKEY', label: 'Hotkey'},
{target: 'UI', label: 'UI'}, {target: 'UI', label: 'UI'},
{target: 'INFO', label: 'Info'} {target: 'INFO', label: 'Info'}
] ]
let navButtons = tabs.map((tab) => { let navButtons = tabs.map((tab) => {