mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
refactor: by ESLint
This commit is contained in:
@@ -157,7 +157,7 @@ class MarkdownEditor extends React.Component {
|
|||||||
this.renderPreview(this.props.value)
|
this.renderPreview(this.props.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
handleKeyDown(e) {
|
handleKeyDown (e) {
|
||||||
const keyPressed = Object.assign(this.state.keyPressed, {
|
const keyPressed = Object.assign(this.state.keyPressed, {
|
||||||
[e.key]: true
|
[e.key]: true
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ export default class MarkdownPreview extends React.Component {
|
|||||||
exportAsDocument (fileType) {
|
exportAsDocument (fileType) {
|
||||||
const options = {
|
const options = {
|
||||||
filters: [
|
filters: [
|
||||||
{ name: 'Documents', extensions: [fileType]}
|
{ name: 'Documents', extensions: [fileType] }
|
||||||
],
|
],
|
||||||
properties: ['openFile', 'createDirectory']
|
properties: ['openFile', 'createDirectory']
|
||||||
}
|
}
|
||||||
@@ -329,7 +329,7 @@ export default class MarkdownPreview extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
preventImageDroppedHandler(e) {
|
preventImageDroppedHandler (e) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class FinderMain extends React.Component {
|
|||||||
|
|
||||||
handleWindowBlur (e) {
|
handleWindowBlur (e) {
|
||||||
this.setState({
|
this.setState({
|
||||||
search: '',
|
search: ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import markdownit from 'markdown-it'
|
import markdownit from 'markdown-it'
|
||||||
import emoji from 'markdown-it-emoji'
|
import emoji from 'markdown-it-emoji'
|
||||||
import math from '@rokt33r/markdown-it-math'
|
import math from '@rokt33r/markdown-it-math'
|
||||||
import tocAndAnchor from "markdown-it-toc-and-anchor"
|
import tocAndAnchor from 'markdown-it-toc-and-anchor'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
|
||||||
const katex = window.katex
|
const katex = window.katex
|
||||||
|
|||||||
@@ -266,13 +266,13 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
<div styleName='info-right'>
|
<div styleName='info-right'>
|
||||||
{(() => {
|
{(() => {
|
||||||
const faClassName=`fa ${this.getToggleLockButton()}`
|
const faClassName = `fa ${this.getToggleLockButton()}`
|
||||||
const lockButtonComponent =
|
const lockButtonComponent =
|
||||||
<button styleName='info-right-button'
|
<button styleName='info-right-button'
|
||||||
onFocus={(e) => this.handleFocus(e)}
|
onFocus={(e) => this.handleFocus(e)}
|
||||||
onMouseDown={(e) => this.handleLockButtonMouseDown(e)}
|
onMouseDown={(e) => this.handleLockButtonMouseDown(e)}
|
||||||
>
|
>
|
||||||
<i className={faClassName}/>
|
<i className={faClassName} />
|
||||||
</button>
|
</button>
|
||||||
return (
|
return (
|
||||||
this.state.editorStatus === 'CODE' ? lockButtonComponent : ''
|
this.state.editorStatus === 'CODE' ? lockButtonComponent : ''
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ class NoteList extends React.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
alertIfSnippet() {
|
alertIfSnippet () {
|
||||||
let { location } = this.props
|
let { location } = this.props
|
||||||
const targetIndex = _.findIndex(this.notes, (note) => {
|
const targetIndex = _.findIndex(this.notes, (note) => {
|
||||||
return `${note.storage}-${note.key}` === location.query.key
|
return `${note.storage}-${note.key}` === location.query.key
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const DEFAULT_CONFIG = {
|
|||||||
listStyle: 'DEFAULT', // 'DEFAULT', 'SMALL'
|
listStyle: 'DEFAULT', // 'DEFAULT', 'SMALL'
|
||||||
hotkey: {
|
hotkey: {
|
||||||
toggleFinder: OSX ? 'Cmd + Alt + S' : 'Super + Alt + S',
|
toggleFinder: OSX ? 'Cmd + Alt + S' : 'Super + Alt + S',
|
||||||
toggleMain: OSX ? 'Cmd + Alt + L' : 'Super + Alt + E',
|
toggleMain: OSX ? 'Cmd + Alt + L' : 'Super + Alt + E'
|
||||||
},
|
},
|
||||||
ui: {
|
ui: {
|
||||||
theme: 'default',
|
theme: 'default',
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import React, { PropTypes } from 'react'
|
import React, { PropTypes } from 'react'
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom'
|
||||||
import store from '../store'
|
|
||||||
|
|
||||||
const electron = require('electron')
|
const electron = require('electron')
|
||||||
const ipc = electron.ipcRenderer
|
const ipc = electron.ipcRenderer
|
||||||
@@ -26,7 +25,6 @@ export default class DeleteArticleModal extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleYesButtonClick (e) {
|
handleYesButtonClick (e) {
|
||||||
// store.dispatch(destroyArticle(this.props.articleKey))
|
|
||||||
this.props.close()
|
this.props.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user